Skip to Content
The Ngamia platform API is in preview. Endpoints may change before general availability.

API keys

Create, list and revoke the API keys your apps use.

List API keys (admin)

GET /v1/api-keys

curl -X GET https://api.ngamia.com/v1/api-keys \ -H "Authorization: Bearer $NGAMIA_TOKEN"

Response 200 fields

FieldTypeRequiredNotes
api_keysarray of object

Responses

StatusMeaning
200Keys (secrets are never listed)

Create an API key (admin)

POST /v1/api-keys

Request body (application/json)

FieldTypeRequiredNotes
namestringyesmin length 1, max length 200
scopesarray of agents:read | agents:write | runs | knowledge:read | knowledge:writeyes
expires_in_daysintegermin 1, max 3650
curl -X POST https://api.ngamia.com/v1/api-keys \ -H "Authorization: Bearer $NGAMIA_TOKEN" \ -H 'content-type: application/json' \ -d '{"name": "web app", "scopes": []}'

Response 201 fields

FieldTypeRequiredNotes
api_keyobject
secretstring

Responses

StatusMeaning
201Created. secret is shown only here; store it in your secret manager.
400The request is invalid (invalid_request).
403The role or key scope does not allow this (forbidden).

Revoke an API key (admin)

DELETE /v1/api-keys/{id}

Parameters

ParameterInTypeNotes
idpathstring (uuid)required
curl -X DELETE https://api.ngamia.com/v1/api-keys/<id> \ -H "Authorization: Bearer $NGAMIA_TOKEN"

Responses

StatusMeaning
204Revoked; the key stops working at once
404Not found in this workspace (not_found).