POST
/
api
/
organizations
/
{organizationId}
/
apikeys
Add API key
curl --request POST \
  --url https://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/apikeys \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "apiKey": "<string>",
  "role": "admin"
}'
{
  "success": true,
  "error": "<string>",
  "id": 123,
  "apiKey": "<string>"
}

Authorizations

x-api-key
string
header
required

Path Parameters

organizationId
integer
required

Organization ID

Body

application/json
name
string
required

Description of the key

role
enum<string>
required
Available options:
admin,
member
apiKey
string

Optional: API key. This needs to start with ei_ and will need to be at least 32 characters long. If this field is not passed in, a new API key is generated for you.

Response

200 - application/json

OK

success
boolean
required

Whether the operation succeeded

id
integer
required

ID of the new API key

apiKey
string
required

New API Key (starts with "ei_...") - this'll be shared only once.

error
string

Optional error description (set if 'success' was false)