Skip to content

Create Service Key

POST /service-keys

The only response in the API that carries a key. It is stored nowhere.

FieldTypeNotes
namestringrequiredmin length 1 max length 120
roleviewer | member | admin | owner | operatoroptionalDefault "member".
scopeworkspace | organization | platformoptionalDefault "workspace".
expires_atstring (date-time) | nulloptional—
request_timeout_sinteger | nulloptionalmin 1 max 3600
StatusDescriptionBody
201Successful ResponseServiceKeyWithSecret
422Validation ErrorHTTPValidationError

The body shows the fields the schema always carries. Which combination is legal is a service rule the schema cannot express, so read the description above before copying this.

Terminal window
curl -X POST https://your-deployment.example.com/service-keys \
-H "Authorization: Bearer $COBRE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'
FieldTypeNotes
keystringrequired—
service_keyServiceKeyViewrequired—