> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apocor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Response format

> The envelopes every endpoint returns.

Apocor responses are predictable. Resource endpoints wrap their payload in a `data` envelope; authentication endpoints return the token object directly; errors use an `error` envelope.

## Single resource

```json theme={null}
{
  "data": {
    "id": "card_abc123",
    "status": "ACTIVE",
    "lastFour": "4242"
  }
}
```

## Collection

Lists return an array under `data`.

```json theme={null}
{
  "data": [
    { "id": "card_abc123", "status": "ACTIVE" },
    { "id": "card_def456", "status": "FROZEN" }
  ]
}
```

## Token (authentication)

`POST /v1/oauth/token` and the login endpoints return the token object **without** a `data` wrapper:

```json theme={null}
{ "access_token": "eyJ…", "token_type": "Bearer", "expires_in": 3600 }
```

## Empty

Some actions (e.g. revoking an API key) return `204 No Content` with an empty body.

## Error

```json theme={null}
{ "error": { "code": "NOT_FOUND", "message": "Card not found" } }
```

See [Error codes](/guides/errors) for the full list and HTTP status mapping.

## Amounts & timestamps

<Note>
  Monetary amounts are integers in **minor units** (cents). Timestamps are ISO 8601 strings in UTC.
</Note>
