Errors

Markdown

Composio uses conventional HTTP response codes to indicate the success or failure of an API request. In general: codes in the 2xx range indicate success, codes in the 4xx range indicate an error with the information provided, and codes in the 5xx range indicate an error with Composio's servers.

The error object

{
  "error": {
    "message": "No connected account found for this user and toolkit",
    "status": 400,
    "request_id": "req_abc123def456",
    "suggested_fix": "Connect the user to the toolkit first"
  }
}

Attributes

AttributeDescription
messageA human-readable message providing details about the error.
statusThe HTTP status code.
request_idA unique identifier for this request. Include this when contacting support.
suggested_fixWhen available, guidance on how to resolve the error.

HTTP status codes

CodeStatusDescription
200OKEverything worked as expected.
400Bad RequestThe request was unacceptable, often due to missing a required parameter.
401UnauthorizedNo valid API key provided.
403ForbiddenThe API key doesn't have permissions to perform the request.
404Not FoundThe requested resource doesn't exist.
409ConflictThe request conflicts with another request (perhaps due to using the same idempotent key).
422Unprocessable EntityThe request was valid but cannot be processed.
429Too Many RequestsToo many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504Server ErrorsSomething went wrong on Composio's end.

Error types

Authentication errors

Composio uses two types of API keys:

  • Project API key (x-api-key) — For project-level operations
  • Organization API key (x-org-api-key) — For organization-level access across projects
ErrorCause
Invalid API keyThe API key is incorrect or revoked. Verify in Settings.
No authentication providedThe request is missing the x-api-key or x-org-api-key header.
Invalid organization keyThe organization API key is incorrect or revoked. Verify in Organization Settings.
Insufficient permissionsThe API key doesn't have access to this resource.

Tool errors

Errors that occur when fetching or executing tools.

ErrorCause
Tool not foundThe tool slug doesn't exist. Tool slugs are case-sensitive and use SCREAMING_SNAKE_CASE.
No connected accountThe user hasn't connected to this toolkit yet. See Authenticating Users.
Tool execution failedThe external service returned an error. Check tool parameters and user permissions.

See Tools Troubleshooting for more help.

Connection errors

Errors related to connected accounts.

ErrorCause
Connected account not foundThe connectedAccountId doesn't exist or was deleted.
Auth refresh requiredThe OAuth token has expired. Prompt the user to re-authenticate.
Connected account deletedThe connection was removed. Create a new connection.

Trigger errors

Errors related to trigger subscriptions.

ErrorCause
Trigger not foundThe trigger slug doesn't exist for this toolkit.
Trigger instance deletedThe trigger subscription or its connected account was removed.

See Triggers Troubleshooting for more help.

Rate limiting

When you hit rate limits, you'll receive a 429 status code. See Rate Limits for details on limits by plan and best practices for handling rate limit errors.

Getting help

When contacting support, include the request_id from the error response.