Skip to content
Ordinal
Esc
↑↓navigate↵open⌘Jpreview

Create workspace API key

Create an API key for a specific workspace. The key can be used to access workspace-specific endpoints.

POST/workspaces/{workspaceId}/api-keys
Authorization
AuthorizationBearer token · headerrequired

Company API key (starts with ord_c_)

Path parameters
workspaceIdstring<uuid>required
Request body
requiredapplication/json
namestringrequired
min length 1
Responses
200

OK

idstring<uuid>required
namestringrequired
keyHintstringrequired
keystringrequired
createdAtstring<date-time>required
400

Bad Request - Invalid input parameters

codestring
messagestring
errorsobject
401

Unauthorized - User is not authenticated

statusnumber
messagestring
404

Not Found - Resource does not exist

codestring
messagestring
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://app.tryordinal.com/api/v1/company/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/api-keys' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string"
}'
Response
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "keyHint": "string",
  "key": "string",
  "createdAt": "2019-08-24T14:15:22Z"
}