# Create a seven-day frozen civic export

`POST /api/v1/data/snapshots` - [human page](https://aicdapi.com/api-reference#createCivicSnapshot)

**Release status.** Limited availability

Charges one export request plus normal request and burst allowances. Complete every resource, including aliases, then consume changes from boundaryCursor. A snapshot and its boundary represent one consistent database state.

**Authentication.** Customer API key: `Authorization: Bearer aicd_...`. A browser session does not authenticate this endpoint. Required scope: `civic:export`.

### Example request

```bash
curl -X POST 'https://aicdapi.com/api/v1/data/snapshots' \
  -H "Authorization: Bearer $AICD_API_KEY"
```

### Response 201

Snapshot created.

| Field | Type | Required | Bounds | Description |
| --- | --- | --- | --- | --- |
| `data` | object | yes |  |  |
| `data.snapshotId` | string (uuid) | yes |  |  |
| `data.boundaryCursor` | string | yes | length 1..512 | Opaque continuation token. Store and replay without modification. |
| `data.createdAt` | string (date-time) | yes |  | UTC timestamp ending in Z. |
| `data.expiresAt` | string (date-time) | yes |  | UTC timestamp ending in Z. |
| `data.counts` | object | yes |  |  |

### Errors

| Status | `error.code` | Description |
| --- | --- | --- |
| **400** |  | Invalid parameter, duplicate query field or malformed JSON. |
| **401** | `unauthorized` | Missing, invalid, expired or revoked credential. |
| **403** | `billing_channel_unset`, `billing_entitlement_required`, `forbidden` | Customer lacks the required grant. |
| **404** |  | Snapshot does not exist, belongs to another customer, or expired. |
| **410** |  | Cursor is older than the retained replay floor; start a new snapshot. |
| **413** |  | Request or response exceeds its size cap; reduce the page limit. |
| **429** | `rate_limited` | A per-account request, burst or export allowance was exhausted, or the account-wide abuse ceiling was reached. The abuse ceiling is account-wide, is not charged against the paid quota, and is charged after the identity lookup and before a revoked, expired, unpaid, or scope-denied rejection is decided. |
| **500** | `internal_error` | Unexpected operation failure; the response contains no private database details. |
| **503** | `authentication_unavailable`, `feed_unavailable` | Authentication, limit store or feed state is unavailable. |
| **504** | `timeout` | Database statement or request deadline exceeded. |

### Behaviour

- **Limits.** Counted against the minute, burst, and hourly export allowances on your account. Snapshot creation consumes the export allowance; reading a snapshot back does not.
- **Retry-After.** Sent on 429 only, as whole seconds. The export allowance resets at the end of the current hour.
- **Caching.** Customer responses must not be cached.
