***

title: Errors
description: Error codes and response format for the XTrace Memory API.
-----------------------------------------------------------------------

# Errors

The API uses standard HTTP status codes. Error responses include a JSON body:

```json
{
  "error": "Human-readable error message",
  "details": { }
}
```

## Common status codes

| Code  | Meaning                                                         |
| ----- | --------------------------------------------------------------- |
| `200` | Success                                                         |
| `201` | Created                                                         |
| `204` | Deleted (no body)                                               |
| `400` | Bad request — check the `error` field for details               |
| `401` | Unauthorized — missing or invalid API key                       |
| `403` | Forbidden — valid key but insufficient permissions              |
| `404` | Not found — the resource doesn't exist or you don't have access |
| `409` | Conflict — e.g., duplicate resource                             |
| `422` | Validation error — request body didn't match the schema         |
| `429` | Rate limited — back off and retry                               |
| `500` | Internal server error — contact support if persistent           |
