Update API key
curl --request PATCH \
--url https://api.social-api.ai/v1/keys/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_ids": [
"<string>"
],
"name": "My App",
"scopes": [
"posts:write",
"inbox:read"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({brand_ids: ['<string>'], name: 'My App', scopes: ['posts:write', 'inbox:read']})
};
fetch('https://api.social-api.ai/v1/keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/keys/{id}"
payload = {
"brand_ids": ["<string>"],
"name": "My App",
"scopes": ["posts:write", "inbox:read"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"brand_ids": [
"<string>"
],
"id": "<string>",
"name": "<string>",
"scopes": [
"posts:write",
"inbox:read"
]
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}API Keys
Update API key
Edits an existing key’s name, scopes, and brand restrictions in place. The key value is unchanged (no new secret is issued). Empty scopes or brand_ids mean unrestricted. Requires a full-access key or the dashboard.
PATCH
/
keys
/
{id}
Update API key
curl --request PATCH \
--url https://api.social-api.ai/v1/keys/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_ids": [
"<string>"
],
"name": "My App",
"scopes": [
"posts:write",
"inbox:read"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({brand_ids: ['<string>'], name: 'My App', scopes: ['posts:write', 'inbox:read']})
};
fetch('https://api.social-api.ai/v1/keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/keys/{id}"
payload = {
"brand_ids": ["<string>"],
"name": "My App",
"scopes": ["posts:write", "inbox:read"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"brand_ids": [
"<string>"
],
"id": "<string>",
"name": "<string>",
"scopes": [
"posts:write",
"inbox:read"
]
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Path Parameters
API key ID
Body
application/json
New name and restrictions