import requests
url = "http://localhost:3000/v1/api_key/{id}"
payload = {
"name": "<string>",
"permissions": ["companies.delete"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"last_four_digits": "<string>",
"creator_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"restricted": true,
"permissions": [
"companies.delete"
]
}Update an API key name and/or (if restricted) its permissions.
import requests
url = "http://localhost:3000/v1/api_key/{id}"
payload = {
"name": "<string>",
"permissions": ["companies.delete"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"last_four_digits": "<string>",
"creator_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"restricted": true,
"permissions": [
"companies.delete"
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the API key to update
Nuevo nombre de la API key
Lista completa de permisos para reemplazar (solo keys restringidas).
App permissions.
companies.delete, companies.update, calls.create, calls.delete, calls.update, calls.view, messages.view, agents.view, agents.create, agents.update, agents.delete, phones.view, phones.purchase, phones.delete, phones.update, tools.view, tools.create, tools.delete, tools.update, contacts.view, contacts.delete, conversational_paths.view, conversational_paths.create, conversational_paths.delete, conversational_paths.update, knowledge_bases.view, knowledge_bases.create, knowledge_bases.delete, knowledge_bases.update, webhooks.view, webhooks.create, webhooks.delete, webhooks.update, members.view, members.create, members.delete, members.update, billing.view, billing.update, api_keys.view, api_keys.create, api_keys.delete, api_keys.update, voices.view, transcriptions.view, recordings.view, stats.view, notifications.view, notifications.update, integrations.view, integrations.create, integrations.update, integrations.delete Successful Response
The unique identifier for the API key
The name of the API key
The date and time when the API key was created
The last four digits of the API key
The ID of the user who created the API key
Whether the API key is restricted to a set of specific permissions
The permissions associated with the API key
App permissions.
companies.delete, companies.update, calls.create, calls.delete, calls.update, calls.view, messages.view, agents.view, agents.create, agents.update, agents.delete, phones.view, phones.purchase, phones.delete, phones.update, tools.view, tools.create, tools.delete, tools.update, contacts.view, contacts.delete, conversational_paths.view, conversational_paths.create, conversational_paths.delete, conversational_paths.update, knowledge_bases.view, knowledge_bases.create, knowledge_bases.delete, knowledge_bases.update, webhooks.view, webhooks.create, webhooks.delete, webhooks.update, members.view, members.create, members.delete, members.update, billing.view, billing.update, api_keys.view, api_keys.create, api_keys.delete, api_keys.update, voices.view, transcriptions.view, recordings.view, stats.view, notifications.view, notifications.update, integrations.view, integrations.create, integrations.update, integrations.delete