Add API key

Add API key

Add an API key.

POSThttps://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/apikeys
Path parameters
organizationId*integer

Organization ID

Body
name*string

Description of the key

apiKey*string

API key. This needs to start with ei_ and will need to be at least 32 characters long.

role*enum
adminmember
Response

OK

Body
success*boolean

Whether the operation succeeded

errorstring

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

Request
const response = await fetch('https://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/apikeys', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text",
      "apiKey": "text",
      "role": "admin"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text"
}

Last updated