Searching...

API keys

get /projects/{project_id}/api-keys/count

Count API keys

This endpoint enables you to count the overall number of API keys for a specific project.

name string

Filter for API key names that contain this value. The API can return partial matches.

value string

Filter for the value of a specific API key.

project_id string required

The ID of the project you want to count API keys for.

Responses

Successful response

Response body Headers
count int

The number of API keys.

Example
16

This response does not contain any headers

Response examples

Successful response

{
  "count": 16
}
get /projects/{project_id}/api-keys

List API keys

This endpoint enables you to list all API keys in a project.

Note that the API response only contains one page of results. To navigate to another page, use the previous or next path queries provided in the respone's links object.

page_size int

Number of records per page.

Default
20
Min
1
Max
100
page int

Page number to retrieve.

Default
1
name string

Filter for API key names that contain this value. The API can return partial matches.

value string

Filter for the value of a specific API key.

sort_by string

Select a property to sort by. Allowed values: created_at , name , value .

Enum
  • created_at
  • name
  • value
sort_order string

Select the order to sort by. Allowed values: asc , desc .

Enum
  • asc
  • desc

Responses

Successful response

Response body Headers
items array
pagination object (Pagination)
page int

Returns the number of the currently active page.

page_size int

Returns the number of items per page.

item_count int

Returns the total number of items.

links array [Links]

This response does not contain any headers

Response examples

Successful response

{
  "items": [
    {
      "project_id": "project_1CCq9NurjJBRehCVCe8XQY",
      "api_key_id": "api_key_1CCq9NwWhBxwjAgHzpuZx4",
      "created_at": "2023-06-07T17:32:28Z",
      "name": "Development key",
      "value": "19Kc5nhC7...ADWwAbTuUer"
    }
  ],
  "pagination": {
    "page": 123,
    "page_size": 123,
    "item_count": 123
  },
  "links": [
    {
      "rel": "previous",
      "href": "/projects?page_size=20&name=aaa&sort_by=name&sort_order=desc&page=2"
    }
  ]
}
post /projects/{project_id}/api-keys

Create API key

This endpoint enables you to create a new API key in a specific project.

name string required

The name of the Admin API key. Also visible in the dashboard. You may set any value that fits your organization purposes.

Responses

API key created successfully

Response body Headers
project_id string

The unique ID of the project that the API key belongs to.

Example
"project_1CCq9NurjJBRehCVCe8XQY"
api_key_id string

The unique ID of an API key.

Example
"api_key_1CCq9NwWhBxwjAgHzpuZx4"
created_at string

The date when the API key was created. This field uses the ATOM date-time format: 2024-02-05T00:00:00+01:00

Format
date-time
name string

The name of the API key. Also visible in the dashboard. You may set any value that fits your organization purposes.

Example
"Development key"
value string

The actual value of the API key. Use this value to authenticate your requests to the API.

Example
"19Kc5nhC7...ADWwAbTuUer"

This response does not contain any headers

Request examples

{
  "name": "string"
}

Response examples

API key created successfully

{
  "project_id": "project_1CCq9NurjJBRehCVCe8XQY",
  "api_key_id": "api_key_1CCq9NwWhBxwjAgHzpuZx4",
  "created_at": "2023-06-07T17:32:28Z",
  "name": "Development key",
  "value": "19Kc5nhC7...ADWwAbTuUer"
}
get /projects/{project_id}/api-keys/{api_key_id}

Get API key

This endpoint enables you to retrieve a specific API key from a project.

project_id string required

The ID of the project that the API key belongs to.

api_key_id string required

The ID of the API key to retrieve.

Responses

Successful response

Response body Headers
project_id string

The unique ID of the project that the API key belongs to.

Example
"project_1CCq9NurjJBRehCVCe8XQY"
api_key_id string

The unique ID of an API key.

Example
"api_key_1CCq9NwWhBxwjAgHzpuZx4"
created_at string

The date when the API key was created. This field uses the ATOM date-time format: 2024-02-05T00:00:00+01:00

Format
date-time
name string

The name of the API key. Also visible in the dashboard. You may set any value that fits your organization purposes.

Example
"Development key"
value string

The actual value of the API key. Use this value to authenticate your requests to the API.

Example
"19Kc5nhC7...ADWwAbTuUer"

This response does not contain any headers

Response examples

Successful response

{
  "project_id": "project_1CCq9NurjJBRehCVCe8XQY",
  "api_key_id": "api_key_1CCq9NwWhBxwjAgHzpuZx4",
  "created_at": "2023-06-07T17:32:28Z",
  "name": "Development key",
  "value": "19Kc5nhC7...ADWwAbTuUer"
}
delete /projects/{project_id}/api-keys/{api_key_id}

Delete API key

This endpoint enables you to delete an API key from a specific project.

Note that deleting an API key is permanent - there is no way to retrieve an API key after you delete it.

project_id string required

The ID of the project that the API key belongs to.

api_key_id string required

The ID of the API key you want to delete.

Responses

API key deleted successfully

Response body Headers

This response is empty

This response does not contain any headers

Response examples

patch /projects/{project_id}/api-keys/{api_key_id}

Update API key

This endpoint enables you to update the name of a project that is tied to an API key.

name string

The name of the project you want to update.

Example
"My project 2"
project_id string required

The ID of the project that the API key belongs to.

api_key_id string required

The ID of the API key to update.

Responses

API key updated successfully

Response body Headers
project_id string

The unique ID of the project that the API key belongs to.

Example
"project_1CCq9NurjJBRehCVCe8XQY"
api_key_id string

The unique ID of an API key.

Example
"api_key_1CCq9NwWhBxwjAgHzpuZx4"
created_at string

The date when the API key was created. This field uses the ATOM date-time format: 2024-02-05T00:00:00+01:00

Format
date-time
name string

The name of the API key. Also visible in the dashboard. You may set any value that fits your organization purposes.

Example
"Development key"
value string

The actual value of the API key. Use this value to authenticate your requests to the API.

Example
"19Kc5nhC7...ADWwAbTuUer"

This response does not contain any headers

Request examples

{
  "name": "My project 2"
}

Response examples

API key updated successfully

{
  "project_id": "project_1CCq9NurjJBRehCVCe8XQY",
  "api_key_id": "api_key_1CCq9NwWhBxwjAgHzpuZx4",
  "created_at": "2023-06-07T17:32:28Z",
  "name": "Development key",
  "value": "19Kc5nhC7...ADWwAbTuUer"
}