Members and invites
Manage the people in a workspace and invite new ones.
List members (admin)
GET /v1/members
curl -X GET https://api.ngamia.com/v1/members \
-H "Authorization: Bearer $NGAMIA_TOKEN"Response 200 fields
| Field | Type | Required | Notes |
|---|---|---|---|
members | array of object |
Responses
| Status | Meaning |
|---|---|
200 | Current members |
403 | The role or key scope does not allow this (forbidden). |
Add a member or set their role (admin; owner for admin/owner roles)
PUT /v1/members/{user_id}
Adds the person (by KIDA user ID) if they are not a member yet. A workspace always keeps at least one owner. Demoting an admin or owner below admin revokes the API keys they created.
Parameters
| Parameter | In | Type | Notes |
|---|---|---|---|
user_id | path | string | required |
Request body (application/json)
| Field | Type | Required | Notes |
|---|---|---|---|
role | owner | admin | developer | viewer | yes |
curl -X PUT https://api.ngamia.com/v1/members/<user_id> \
-H "Authorization: Bearer $NGAMIA_TOKEN" \
-H 'content-type: application/json' \
-d '{"role": "owner"}'Responses
| Status | Meaning |
|---|---|
204 | Role set |
400 | The request is invalid (invalid_request). |
403 | The role or key scope does not allow this (forbidden). |
409 | Conflicts with the current state, e.g. a stale version or a taken slug (conflict). |
Remove a member (admin)
DELETE /v1/members/{user_id}
The person loses access at once (their existing tokens stop working) and cannot sign back in until re-invited. The API keys they created are revoked.
Parameters
| Parameter | In | Type | Notes |
|---|---|---|---|
user_id | path | string | required |
curl -X DELETE https://api.ngamia.com/v1/members/<user_id> \
-H "Authorization: Bearer $NGAMIA_TOKEN"Responses
| Status | Meaning |
|---|---|
204 | Removed |
403 | The role or key scope does not allow this (forbidden). |
409 | Conflicts with the current state, e.g. a stale version or a taken slug (conflict). |
List invites (admin)
GET /v1/invites
curl -X GET https://api.ngamia.com/v1/invites \
-H "Authorization: Bearer $NGAMIA_TOKEN"Response 200 fields
| Field | Type | Required | Notes |
|---|---|---|---|
invites | array of object |
Responses
| Status | Meaning |
|---|---|
200 | Invites, newest first (codes are never listed) |
Create an invite (admin; owner for admin invites)
POST /v1/invites
Request body (application/json)
| Field | Type | Required | Notes |
|---|---|---|---|
role | admin | developer | viewer | yes | |
expires_in_hours | integer | min 1, max 720, default 72 | |
max_uses | integer | min 1, max 1000, default 1 |
curl -X POST https://api.ngamia.com/v1/invites \
-H "Authorization: Bearer $NGAMIA_TOKEN" \
-H 'content-type: application/json' \
-d '{"role": "admin"}'Response 201 fields
| Field | Type | Required | Notes |
|---|---|---|---|
invite | object | ||
code | string |
Responses
| Status | Meaning |
|---|---|
201 | Created. code is shown only here; share it privately. |
403 | The role or key scope does not allow this (forbidden). |
Revoke an invite (admin)
DELETE /v1/invites/{id}
Parameters
| Parameter | In | Type | Notes |
|---|---|---|---|
id | path | string (uuid) | required |
curl -X DELETE https://api.ngamia.com/v1/invites/<id> \
-H "Authorization: Bearer $NGAMIA_TOKEN"Responses
| Status | Meaning |
|---|---|
204 | Revoked |
404 | Not found in this workspace (not_found). |
Last updated on