Skip to Content
CallMitraDocs
Errors

api_key_scope_denied

The API key does not have the scope required for this request.

HTTP statusTypeCode
403permission_errorapi_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 workspaces
  • GET /api/v1/agents/ — List agents
  • POST /api/v1/agents/ — Create an agent
  • POST /api/v1/agents/import — Import an agent from another platform
  • DELETE /api/v1/agents/{agent_id} — Delete an agent
  • GET /api/v1/agents/{agent_id} — Get an agent
  • PATCH /api/v1/agents/{agent_id} — Update an agent
  • POST /api/v1/agents/{agent_id}/go-live — Start taking calls
  • POST /api/v1/agents/{agent_id}/pause — Stop taking calls
  • PUT /api/v1/agents/{agent_id}/post-call-webhook — Set an agent's post-call webhook
  • POST /api/v1/agents/{agent_id}/publish — Publish the agent's draft
  • POST /api/v1/agents/{agent_id}/test-call — Place a test call
  • GET /api/v1/callbacks — List scheduled callbacks
  • GET /api/v1/calls/ — List calls
  • POST /api/v1/calls/ — Place a call
  • GET /api/v1/calls/daily-counts — Calls per day
  • GET /api/v1/calls/performance — Call performance
  • GET /api/v1/calls/{call_id} — Get a call
  • GET /api/v1/calls/{call_id}/recording — Download a call recording
  • GET /api/v1/calls/{call_id}/transcript — Get a call transcript
  • GET /api/v1/campaigns/ — List campaigns
  • POST /api/v1/campaigns/ — Create an empty campaign
  • POST /api/v1/campaigns/create-with-leads — Create a campaign with its leads
  • DELETE /api/v1/campaigns/{campaign_id} — Delete a campaign
  • GET /api/v1/campaigns/{campaign_id} — Get a campaign
  • PUT /api/v1/campaigns/{campaign_id} — Update a campaign
  • GET /api/v1/campaigns/{campaign_id}/dial-status — Dialing status
  • GET /api/v1/campaigns/{campaign_id}/leads — List a campaign's leads
  • PUT /api/v1/campaigns/{campaign_id}/leads — Add or remove leads
  • POST /api/v1/campaigns/{campaign_id}/pause-dialing — Pause automatic dialing
  • POST /api/v1/campaigns/{campaign_id}/resume-dialing — Resume automatic dialing
  • POST /api/v1/campaigns/{campaign_id}/start — Start a campaign
  • POST /api/v1/campaigns/{campaign_id}/stop — Stop a campaign
  • POST /api/v1/instant/call-now — Call a lead in a campaign now
  • GET /api/v1/lead-fields/catalog — List custom lead fields
  • GET /api/v1/leads/ — List leads
  • POST /api/v1/leads/ — Create a lead
  • POST /api/v1/leads/bulk — Act on many leads
  • GET /api/v1/leads/dnc — List do-not-call numbers
  • POST /api/v1/leads/dnc — Add numbers to do-not-call
  • DELETE /api/v1/leads/dnc/{lead_id} — Remove a number from do-not-call
  • DELETE /api/v1/leads/{lead_id} — Delete a lead
  • GET /api/v1/leads/{lead_id} — Get a lead
  • PUT /api/v1/leads/{lead_id} — Update a lead
  • POST /api/v1/leads/{lead_id}/call-now — Call a lead now
  • GET /api/v1/leads/{lead_id}/notes — List a lead's notes
  • POST /api/v1/leads/{lead_id}/notes — Add a note
  • DELETE /api/v1/leads/{lead_id}/notes/{note_id} — Delete a note
  • PATCH /api/v1/leads/{lead_id}/notes/{note_id} — Edit a note
  • DELETE /api/v1/leads/{lead_id}/notes/{note_id}/pin — Unpin a note
  • POST /api/v1/leads/{lead_id}/notes/{note_id}/pin — Pin a note
  • GET /api/v1/leads/{lead_id}/timeline — Lead timeline
  • GET /api/v1/phone-numbers/ — List phone numbers
  • GET /api/v1/phone-numbers/{phone_id} — Get a phone number
  • GET /api/v1/sip-trunks — List SIP trunks
  • GET /api/v1/sip-trunks/{trunk_id} — Get a SIP trunk
  • GET /api/v1/tickets/ — List tickets
  • POST /api/v1/tickets/ — Create a ticket
  • GET /api/v1/tickets/categories — List ticket categories
  • GET /api/v1/tickets/teams — List ticket teams
  • GET /api/v1/tickets/{ticket_id} — Get a ticket
  • PATCH /api/v1/tickets/{ticket_id} — Update a ticket
  • GET /api/v1/tickets/{ticket_id}/activities — List ticket activities
  • POST /api/v1/tickets/{ticket_id}/activities — Add a note to a ticket
  • POST /api/v1/tickets/{ticket_id}/replies — Reply to the customer
  • GET /api/v1/tools/ — List tools
  • GET /api/v1/tools/{tool_id} — Get a tool
  • GET /api/v1/usage — Get usage and balance
  • GET /api/v1/voices/ — List voices
  • GET /api/v1/webhook-deliveries/ — List webhook deliveries
  • GET /api/v1/webhook-deliveries/{delivery_id} — Get a webhook delivery
  • POST /api/v1/webhook-deliveries/{delivery_id}/redeliver — Redeliver an event
  • GET /api/v1/webhook-endpoints/ — List webhook endpoints
  • POST /api/v1/webhook-endpoints/ — Create a webhook endpoint
  • DELETE /api/v1/webhook-endpoints/{endpoint_id} — Delete a webhook endpoint
  • GET /api/v1/webhook-endpoints/{endpoint_id} — Get a webhook endpoint
  • PATCH /api/v1/webhook-endpoints/{endpoint_id} — Update a webhook endpoint
  • POST /api/v1/webhook-endpoints/{endpoint_id}/rotate-secret — Rotate an endpoint's signing secret
  • POST /api/v1/webhook-endpoints/{endpoint_id}/test — Send a test event
  • GET /api/v1/webhook-event-types/ — List event types
  • GET /api/v1/whatsapp/message-templates — List WhatsApp templates
  • POST /api/v1/whatsapp/messages — Send a WhatsApp message
  • GET /api/v1/whatsapp/messages/{message_id} — Get a WhatsApp message
  • GET /api/v1/workspace — Check an API key

On this page