v1

latestOpenAPI 3.0.1Apache 2.02026-07-1398228598.3 KB
API Key

Create API Key

Creates a new API key. This endpoint allows you to generate an API key that can be used to authenticate requests to the Attention service.

post/api_keys

Request body

namestring required

The name of the API key

orgLevelboolean required

Whether the API key is organization-level or user-level

Example request

{
  "name": "Admin API Key",
  "orgLevel": true
}

Response

Successfully created API key

idstring required

The unique identifier of the API key

namestring required

The name of the API key

organizationUUIDstring required

The UUID of the organization this API key belongs to, if applicable

userUUIDstring required

The UUID of the user this API key belongs to, if applicable

valuestring required

The actual API key value

lastSeenAtstring date-time required

The last time this API key was used

Example response

{
  "id": "e5323e40-xxxx-4f6f-84f6-85eba56091ed",
  "name": "Admin API Key",
  "organizationUUID": "16b78cec-xxxx-46d2-8213-5d3bb7d2571c",
  "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30",
  "lastSeenAt": "2024-03-20T10:00:00Z"
}