> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.yoco.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.yoco.com/_mcp/server.

An error always results in a response with a 4XX or 5XX HTTP status code.

The most common HTTP status codes returned by the API are:

* [400 Bad Request](https://http.dev/400)
* [401 Unauthorized](https://http.dev/401)
* [403 Forbidden](https://http.dev/403)
* [404 Not Found](https://http.dev/404)
* [409 Conflict](https://http.dev/409)
* [429 Too Many Requests](https://http.dev/429)

## Error format

The response contains a JSON body conforming to
[RFC 9457](https://www.rfc-editor.org/rfc/rfc9457.html), the "problem details" format.

### ErrorResponse object

An `ErrorResponse` contains the following properties:

* `type` - A URI reference that identifies the type of problem.
* `title` - A short human-readable summary of the problem.
* `detail` - A human-readable explanation of what went wrong.
* `status` - A HTTP status code generated by the server.
* `code` - A unique code representing the type of error that occurred.
* `errors` *(optional)* - A list of `ErrorDetail` objects to accompany a problem details response.

*Example:*

```json
{
  "type": "https://developer.yoco.com/docs/api/error-codes/not-found",
  "title": "Not Found",
  "detail": "The requested resource does not exist.",
  "status": 404,
  "code": "not_found"
}
```

### ErrorDetail object

An `ErrorDetail` contains the following properties:

* `detail` - A human-readable explanation of what went wrong.
* `pointer` *(optional)* - A JSON pointer to the request body property that caused the error.
* `parameter` *(optional)* - The name of the query string parameter, path parameter or header that caused the error.
* `code` - A unique code representing the type of error that occurred.

*Example:*

```json
{
  "detail": "The field is required.",
  "pointer": "#/first_name",
  "code": "missing_required_field"
}
```

## Error codes

Whilst an error is always returned with a 4XX or 5XX HTTP status code, it also contains a `code`
that can be used to uniquely identify the exact problem that occurred.

The following is an exhaustive list of error codes that the API can return. You can click a specific
error code to get more information and view an example response:

* [conflict](/docs/api/error-codes/conflict)
* [content_too_large](/docs/api/error-codes/content-too-large)
* [forbidden](/docs/api/error-codes/forbidden)
* [method_not_allowed](/docs/api/error-codes/method-not-allowed)
* [missing_required_field](/docs/api/error-codes/missing-required-field)
* [not_found](/docs/api/error-codes/not-found)
* [rate_limited](/docs/api/error-codes/rate-limited)
* [server](/docs/api/error-codes/server)
* [service_unavailable](/docs/api/error-codes/service-unavailable)
* [unauthorized](/docs/api/error-codes/unauthorized)
* [unsupported_media_type](/docs/api/error-codes/unsupported-media-type)
* [validation](/docs/api/error-codes/validation)