Errors
api_key_scope_denied
The API key does not have the scope required for this request.
| HTTP status | Type | Code |
|---|---|---|
| 403 | permission_error | api_key_scope_denied |
What it means
The key is missing the scope this endpoint needs (for example calls:write). Create a key with the required scope or add the scope to the existing key.
How to handle it
The key or user is valid but not allowed to do this. Check the key’s access level and resources (read-only keys can only send GET), or ask a workspace manager.
Example response
{
"detail": "The API key does not have the scope required for this request.",
"error": {
"type": "permission_error",
"code": "api_key_scope_denied",
"message": "The API key does not have the scope required for this request.",
"param": null,
"docUrl": "https://docs.callmitra.ai/errors/api_key_scope_denied",
"requestId": "req_3f9c2a7d1b8e4c6a9f0e2d4b6a8c0e1f"
}
}Branch on error.code; it never changes once published. The message text can change. See Errors for the envelope.
Returned by
GET /api/v1/agency/clients— List client workspacesGET /api/v1/agents/— List agentsPOST /api/v1/agents/— Create an agentPOST /api/v1/agents/import— Import an agent from another platformDELETE /api/v1/agents/{agent_id}— Delete an agentGET /api/v1/agents/{agent_id}— Get an agentPATCH /api/v1/agents/{agent_id}— Update an agentPOST /api/v1/agents/{agent_id}/go-live— Start taking callsPOST /api/v1/agents/{agent_id}/pause— Stop taking callsPUT /api/v1/agents/{agent_id}/post-call-webhook— Set an agent's post-call webhookPOST /api/v1/agents/{agent_id}/publish— Publish the agent's draftPOST /api/v1/agents/{agent_id}/test-call— Place a test callGET /api/v1/callbacks— List scheduled callbacksGET /api/v1/calls/— List callsPOST /api/v1/calls/— Place a callGET /api/v1/calls/daily-counts— Calls per dayGET /api/v1/calls/performance— Call performanceGET /api/v1/calls/{call_id}— Get a callGET /api/v1/calls/{call_id}/recording— Download a call recordingGET /api/v1/calls/{call_id}/transcript— Get a call transcriptGET /api/v1/campaigns/— List campaignsPOST /api/v1/campaigns/— Create an empty campaignPOST /api/v1/campaigns/create-with-leads— Create a campaign with its leadsDELETE /api/v1/campaigns/{campaign_id}— Delete a campaignGET /api/v1/campaigns/{campaign_id}— Get a campaignPUT /api/v1/campaigns/{campaign_id}— Update a campaignGET /api/v1/campaigns/{campaign_id}/dial-status— Dialing statusGET /api/v1/campaigns/{campaign_id}/leads— List a campaign's leadsPUT /api/v1/campaigns/{campaign_id}/leads— Add or remove leadsPOST /api/v1/campaigns/{campaign_id}/pause-dialing— Pause automatic dialingPOST /api/v1/campaigns/{campaign_id}/resume-dialing— Resume automatic dialingPOST /api/v1/campaigns/{campaign_id}/start— Start a campaignPOST /api/v1/campaigns/{campaign_id}/stop— Stop a campaignPOST /api/v1/instant/call-now— Call a lead in a campaign nowGET /api/v1/lead-fields/catalog— List custom lead fieldsGET /api/v1/leads/— List leadsPOST /api/v1/leads/— Create a leadPOST /api/v1/leads/bulk— Act on many leadsGET /api/v1/leads/dnc— List do-not-call numbersPOST /api/v1/leads/dnc— Add numbers to do-not-callDELETE /api/v1/leads/dnc/{lead_id}— Remove a number from do-not-callDELETE /api/v1/leads/{lead_id}— Delete a leadGET /api/v1/leads/{lead_id}— Get a leadPUT /api/v1/leads/{lead_id}— Update a leadPOST /api/v1/leads/{lead_id}/call-now— Call a lead nowGET /api/v1/leads/{lead_id}/notes— List a lead's notesPOST /api/v1/leads/{lead_id}/notes— Add a noteDELETE /api/v1/leads/{lead_id}/notes/{note_id}— Delete a notePATCH /api/v1/leads/{lead_id}/notes/{note_id}— Edit a noteDELETE /api/v1/leads/{lead_id}/notes/{note_id}/pin— Unpin a notePOST /api/v1/leads/{lead_id}/notes/{note_id}/pin— Pin a noteGET /api/v1/leads/{lead_id}/timeline— Lead timelineGET /api/v1/phone-numbers/— List phone numbersGET /api/v1/phone-numbers/{phone_id}— Get a phone numberGET /api/v1/sip-trunks— List SIP trunksGET /api/v1/sip-trunks/{trunk_id}— Get a SIP trunkGET /api/v1/tickets/— List ticketsPOST /api/v1/tickets/— Create a ticketGET /api/v1/tickets/categories— List ticket categoriesGET /api/v1/tickets/teams— List ticket teamsGET /api/v1/tickets/{ticket_id}— Get a ticketPATCH /api/v1/tickets/{ticket_id}— Update a ticketGET /api/v1/tickets/{ticket_id}/activities— List ticket activitiesPOST /api/v1/tickets/{ticket_id}/activities— Add a note to a ticketPOST /api/v1/tickets/{ticket_id}/replies— Reply to the customerGET /api/v1/tools/— List toolsGET /api/v1/tools/{tool_id}— Get a toolGET /api/v1/usage— Get usage and balanceGET /api/v1/voices/— List voicesGET /api/v1/webhook-deliveries/— List webhook deliveriesGET /api/v1/webhook-deliveries/{delivery_id}— Get a webhook deliveryPOST /api/v1/webhook-deliveries/{delivery_id}/redeliver— Redeliver an eventGET /api/v1/webhook-endpoints/— List webhook endpointsPOST /api/v1/webhook-endpoints/— Create a webhook endpointDELETE /api/v1/webhook-endpoints/{endpoint_id}— Delete a webhook endpointGET /api/v1/webhook-endpoints/{endpoint_id}— Get a webhook endpointPATCH /api/v1/webhook-endpoints/{endpoint_id}— Update a webhook endpointPOST /api/v1/webhook-endpoints/{endpoint_id}/rotate-secret— Rotate an endpoint's signing secretPOST /api/v1/webhook-endpoints/{endpoint_id}/test— Send a test eventGET /api/v1/webhook-event-types/— List event typesGET /api/v1/whatsapp/message-templates— List WhatsApp templatesPOST /api/v1/whatsapp/messages— Send a WhatsApp messageGET /api/v1/whatsapp/messages/{message_id}— Get a WhatsApp messageGET /api/v1/workspace— Check an API key