/projects/{project_id}/api-keys/count
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.
Successful response
{
"count": 16
}
/projects/{project_id}/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.
page
int
Page number to retrieve.
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
.
sort_order
string
Select the order to sort by. Allowed values: asc
, desc
.
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"
}
]
}
/projects/{project_id}/api-keys
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.
{
"name": "string"
}
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"
}
/projects/{project_id}/api-keys/{api_key_id}
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.
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"
}
/projects/{project_id}/api-keys/{api_key_id}
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.
API key deleted successfully
Empty response
/projects/{project_id}/api-keys/{api_key_id}
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.
{
"name": "My project 2"
}
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?