API Keys
API keys are used to authenticate and authorize access to project services and resources. With API keys, users can manage content, retrieve data, and interact with various features of Type CMS programmatically.
By design, API keys can not be used to fetch or query content. This is to help reduce the risk of accidentally exposing your keys. For querying content, see the Content API and Content Tokens.
Note: The official SDKs from Type CMS do not currently include the Admin APIs.
get
Lists all API keys within a project
Required attributes
| projectId | string | Your projectId |
Optional attributes
| None |
Request
get
/api/projects/:projectId/api-keys
Response
get
Fetches a single API key based on the provided API key ID
Required attributes
| projectId | string | Your project ID |
| apiKeyId | string | Your API key ID |
Optional attributes
| None |
Request
get
/api/projects/:projectId/api-keys/:apiKeyId
Response
post
Creates a new API key in a project
Required attributes
| projectId | string | Your projectId |
| title | string | Name for your API key |
Optional attributes
| description | string | Description for your API key |
| disabled | boolean | Disable key from being used |
| roles | string[] | An array of roleIds to attach to the API key |
Request
post
/api/projects/:projectId/api-keys
Response
patch
Update attributes for an existing API key
Required attributes
| projectId | string | Your projectId |
| apiKeyId | string | Your API key ID |
Optional attributes
| title | string | Name for your API key |
| description | string | Description for your API key |
| disabled | boolean | Disable key from being used |
| roles | string[] | An array of roleIds to attach to the API key |
Request
patch
/api/projects/:projectid/api-keys/:apiKeyId
Response
delete
Deletes an API key from your project
Required attributes
| projectId | string | Your projectId |
| apiKeyId | string | Your API key ID |
Optional attributes
| None |
Request
delete
/api/projects/:projectId/api-keys/:apiKeyId
Response
Last modified 3/12/2025, 2:49:54 PM