Sign up for free
get

Count API keys

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

namestring

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

valuestring

Filter for the value of a specific API key.

Responses

Response examples

Successful response

{
  "count": 16
}
get

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_sizeint

Number of records per page.

Default
20
Min
1
Max
100
pageint

Page number to retrieve.

Default
1
namestring

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

valuestring

Filter for the value of a specific API key.

sort_bystring

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

Enum
  • created_at
  • name
  • value
sort_orderstring

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

Enum
  • asc
  • desc

Responses

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

Create API key

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

namestring

required

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

Responses

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

Get API key

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

project_idstring

required

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

api_key_idstring

required

The ID of the API key to retrieve.

Responses

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

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_idstring

required

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

api_key_idstring

required

The ID of the API key you want to delete.

Responses

Response examples

API key deleted successfully

Empty response

patch

Update API key

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

namestring

The name of the project you want to update.

Example
"My project 2"

Responses

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"
}

Was this page helpful?