Copilot follows conventional HTTP response codes to indicate the success or failure of an API request and uses the following codes:

Error CodeMeaning
200OK — Everything worked as expected.
400Bad Request — The request was unacceptable, typically due to an invalid or missing parameter.
401Unauthorized — No valid API key provided.
404Not Found — The requested resource doesn't exist.
429Too Many Requests — Too many requests hit the API too quickly.
500Internal Server Error — There was an error with Copilot's servers. Try again later or contact Copilot support.

Error Response

Some errors that could be handled programmatically (e.g., a parameter is invalid) include an error response object that explains the error reported.

code string
Specialized identifier for this type of error in our API. Mostly returned with 4xx errors and briefly explains the error reported.

message string
Human readable error message describing the issue.

data string or object
Additional information provided about an error for 5xx response status.