Ulsav Docs

API Keys

GET
/api/v1/organizations/{organization_id}/api-keys

Path Parameters

organization_id*string

Query Parameters

limit?integer

Page size (1-100)

Formatint64
Range1 <= value <= 100
Default20
cursor?string

Opaque cursor from meta.nextCursor

includeTotal?boolean

Set false to omit meta.total

Defaulttrue

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
data*array<>|null
meta*
Example Request
curl -X GET 'https://example.com/api/v1/organizations/string/api-keys'
Example Response
{  "$schema": "https://example.com/schemas/PageAPIKey.json",  "data": [    {      "$schema": "https://example.com/schemas/APIKey.json",      "allowedOrigins": [        "string"      ],      "capabilities": [        "string"      ],      "createdAt": "2019-08-24T14:15:22Z",      "createdBy": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "id": "string",      "lastUsedAt": "2019-08-24T14:15:22Z",      "lastUsedIp": "string",      "name": "string",      "organizationId": "string",      "prefix": "string",      "revokedAt": "2019-08-24T14:15:22Z",      "scopeId": "string",      "scopeType": "string",      "status": "string",      "updatedAt": "2019-08-24T14:15:22Z",      "updatedBy": "string"    }  ],  "meta": {    "hasMore": true,    "limit": 0,    "nextCursor": "string",    "total": 0  }}
POST
/api/v1/organizations/{organization_id}/api-keys

Path Parameters

organization_id*string

Request Body

application/json
  1. body
allowedOrigins?array<string>|null
capabilities*array<string>|null
expiresAt?string
Formatdate-time
name*string
scopeId?string
scopeType?string

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
apiKey*
secret*string
Example Request
curl -X POST 'https://example.com/api/v1/organizations/string/api-keys' \  -H 'Content-Type: application/json' \  -d '{  "capabilities": [    "string"  ],  "name": "string"}'
Example Response
{  "$schema": "https://example.com/schemas/APIKeyWithSecret.json",  "apiKey": {    "$schema": "https://example.com/schemas/APIKey.json",    "allowedOrigins": [      "string"    ],    "capabilities": [      "string"    ],    "createdAt": "2019-08-24T14:15:22Z",    "createdBy": "string",    "expiresAt": "2019-08-24T14:15:22Z",    "id": "string",    "lastUsedAt": "2019-08-24T14:15:22Z",    "lastUsedIp": "string",    "name": "string",    "organizationId": "string",    "prefix": "string",    "revokedAt": "2019-08-24T14:15:22Z",    "scopeId": "string",    "scopeType": "string",    "status": "string",    "updatedAt": "2019-08-24T14:15:22Z",    "updatedBy": "string"  },  "secret": "string"}
GET
/api/v1/organizations/{organization_id}/api-keys/{api_key_id}

Path Parameters

organization_id*string
api_key_id*string

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
allowedOrigins*array<string>|null
capabilities*array<string>|null
createdAt*string
Formatdate-time
createdBy?string
expiresAt?string
Formatdate-time
id*string
lastUsedAt?string
Formatdate-time
lastUsedIp?string
name*string
organizationId*string
prefix*string
revokedAt?string
Formatdate-time
scopeId*string
scopeType*string
status*string
updatedAt*string
Formatdate-time
updatedBy?string
Example Request
curl -X GET 'https://example.com/api/v1/organizations/string/api-keys/string'
Example Response
{  "$schema": "https://example.com/schemas/APIKey.json",  "allowedOrigins": [    "string"  ],  "capabilities": [    "string"  ],  "createdAt": "2019-08-24T14:15:22Z",  "createdBy": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "id": "string",  "lastUsedAt": "2019-08-24T14:15:22Z",  "lastUsedIp": "string",  "name": "string",  "organizationId": "string",  "prefix": "string",  "revokedAt": "2019-08-24T14:15:22Z",  "scopeId": "string",  "scopeType": "string",  "status": "string",  "updatedAt": "2019-08-24T14:15:22Z",  "updatedBy": "string"}
PATCH
/api/v1/organizations/{organization_id}/api-keys/{api_key_id}

Path Parameters

organization_id*string
api_key_id*string

Request Body

application/json
  1. body
allowedOrigins?array<string>
capabilities?array<string>|null
clearExpiry?boolean
expiresAt?string
Formatdate-time
name?string
scopeId?string
scopeType?string

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
allowedOrigins*array<string>|null
capabilities*array<string>|null
createdAt*string
Formatdate-time
createdBy?string
expiresAt?string
Formatdate-time
id*string
lastUsedAt?string
Formatdate-time
lastUsedIp?string
name*string
organizationId*string
prefix*string
revokedAt?string
Formatdate-time
scopeId*string
scopeType*string
status*string
updatedAt*string
Formatdate-time
updatedBy?string
Example Request
curl -X PATCH 'https://example.com/api/v1/organizations/string/api-keys/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "$schema": "https://example.com/schemas/APIKey.json",  "allowedOrigins": [    "string"  ],  "capabilities": [    "string"  ],  "createdAt": "2019-08-24T14:15:22Z",  "createdBy": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "id": "string",  "lastUsedAt": "2019-08-24T14:15:22Z",  "lastUsedIp": "string",  "name": "string",  "organizationId": "string",  "prefix": "string",  "revokedAt": "2019-08-24T14:15:22Z",  "scopeId": "string",  "scopeType": "string",  "status": "string",  "updatedAt": "2019-08-24T14:15:22Z",  "updatedBy": "string"}
POST
/api/v1/organizations/{organization_id}/api-keys/{api_key_id}/revoke

Path Parameters

organization_id*string
api_key_id*string

Response Body

No Content

Example Request
curl -X POST 'https://example.com/api/v1/organizations/string/api-keys/string/revoke'
Example Response
Empty

Roll an API key's secret

POST
/api/v1/organizations/{organization_id}/api-keys/{api_key_id}/roll

Path Parameters

organization_id*string
api_key_id*string

Response Body

OK

application/json
  1. response
$schema?string

A URL to the JSON Schema for this object.

Formaturi
apiKey*
secret*string
Example Request
curl -X POST 'https://example.com/api/v1/organizations/string/api-keys/string/roll'
Example Response
{  "$schema": "https://example.com/schemas/APIKeyWithSecret.json",  "apiKey": {    "$schema": "https://example.com/schemas/APIKey.json",    "allowedOrigins": [      "string"    ],    "capabilities": [      "string"    ],    "createdAt": "2019-08-24T14:15:22Z",    "createdBy": "string",    "expiresAt": "2019-08-24T14:15:22Z",    "id": "string",    "lastUsedAt": "2019-08-24T14:15:22Z",    "lastUsedIp": "string",    "name": "string",    "organizationId": "string",    "prefix": "string",    "revokedAt": "2019-08-24T14:15:22Z",    "scopeId": "string",    "scopeType": "string",    "status": "string",    "updatedAt": "2019-08-24T14:15:22Z",    "updatedBy": "string"  },  "secret": "string"}