Rotate an API key
curl --request POST \
--url https://beta.creatorcore.co/api/v2/org/api-keys/{id}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'X-CreatorCore-Organization-Id: <api-key>'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-CreatorCore-Organization-Id': '<api-key>'}
};
fetch('https://beta.creatorcore.co/api/v2/org/api-keys/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/org/api-keys/{id}/rotate"
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text){
"success": true,
"apiKey": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"keyPrefix": "<string>",
"permissions": [
"<string>"
],
"enabled": true,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"rawKey": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationIdHeader": "X-CreatorCore-Organization-Id",
"firewall": {
"status": "ok",
"reason": "<string>"
}
}API keys
Rotate an API key
Issues a new secret and retires the old key. Returns the replacement key metadata and rawKey, shown only in this response. The returned apiKey.id is a new id. Also returns organizationId for the X-CreatorCore-Organization-Id header.
POST
/
api
/
v2
/
org
/
api-keys
/
{id}
/
rotate
Rotate an API key
curl --request POST \
--url https://beta.creatorcore.co/api/v2/org/api-keys/{id}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'X-CreatorCore-Organization-Id: <api-key>'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-CreatorCore-Organization-Id': '<api-key>'}
};
fetch('https://beta.creatorcore.co/api/v2/org/api-keys/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/org/api-keys/{id}/rotate"
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text){
"success": true,
"apiKey": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"keyPrefix": "<string>",
"permissions": [
"<string>"
],
"enabled": true,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"rawKey": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationIdHeader": "X-CreatorCore-Organization-Id",
"firewall": {
"status": "ok",
"reason": "<string>"
}
}Authorizations
Response
Success
Was this page helpful?