Menu
GETPOST organizations/{org_id}/api-keys/ User API

GET: list keys for an org. POST: create a new key.

URL

  • User APIhttps://auth.mattering.io/api/organizations/{org_id}/api-keys/

Path parameters

NameType
org_iduuid

Query parameters

NameDefault
app_idnone

Body keys (JSON)

KeyRequiredDefault
app_idoptional or conditionalnone
nameoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

{
  "keys": [
    {
      "id": "...",
      "name": "...",
      "key_prefix": "...",
      "key_suffix": "...",
      "app_id": "...",
      "app_slug": "...",
      "app_name": "...",
      "is_active": true,
      "created_at": "2026-01-01T00:00:00Z",
      "last_used_at": "2026-01-01T00:00:00Z",
      "expires_at": "2026-01-01T00:00:00Z",
      "request_count": 0,
      "created_by": "..."
    }
  ]
}

201 bare JSON object (no envelope)

{
  "id": "...",
  "name": "...",
  "key": "...",
  "key_prefix": "...",
  "key_suffix": "...",
  "app_id": "...",
  "app_slug": "...",
  "app_name": "...",
  "created_at": "2026-01-01T00:00:00Z"
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
400app_id is required message
400name is required message
404App not found or inactive message

Example

curl -X POST "https://auth.mattering.io/api/organizations/ORG_ID/api-keys/" \
  -H "Authorization: Bearer $MATTERING_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "app_id": "...",
  "name": "..."
}'

Source: mattering_auth/api_key_views.py (api_key_views.OrgAPIKeyListCreateView)

PATCHDELETE organizations/{org_id}/api-keys/{key_id}/ User API

PATCH: rename/deactivate. DELETE: hard-delete.

URL

  • User APIhttps://auth.mattering.io/api/organizations/{org_id}/api-keys/{key_id}/

Path parameters

NameType
org_iduuid
key_iduuid

Body keys (JSON)

KeyRequiredDefault
is_activeoptional or conditionalnone
nameoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

{
  "id": "...",
  "name": "...",
  "is_active": true
}

204 bare JSON object (no envelope)

{}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
400name cannot be empty message
404API key not found message

Example

curl -X PATCH "https://auth.mattering.io/api/organizations/ORG_ID/api-keys/KEY_ID/" \
  -H "Authorization: Bearer $MATTERING_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "is_active": "...",
  "name": "..."
}'

Source: mattering_auth/api_key_views.py (api_key_views.OrgAPIKeyDetailView)

All Auth resources
Start Free Explore our Products