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

# Create snapshot

> Provision a hosted mock SaaS API for one provider with optional seed and TTL.

Creates a hosted snapshot of **one** mock provider. The response includes a public base URL you can call until the TTL expires.

**Base URL:** `https://simulation.ressl.ai`\
**Mock URL shape:** `https://{snapshotId}.{slug}.mock.ressl.cc`

Provisioning may take up to a few minutes.

## Path parameters

<ParamField path="slug" type="string" required>
  Provider slug from [`GET /providers/list`](/api-reference/list-providers).
</ParamField>

## Headers

<ParamField header="Authorization" type="string" required>
  `Bearer rsk_...` (or use `X-API-Key` instead).
</ParamField>

<ParamField header="Content-Type" type="string">
  `application/json` when sending a body.
</ParamField>

## Body

All fields are optional. An empty body uses defaults (`ttl: "6h"`, empty seed).

<ParamField body="ttl" type="string" default="6h">
  Lifetime of the snapshot. Forms like `15m`, `6h`, or `1d`. Maximum `7d`.
</ParamField>

<ParamField body="seed" type="object">
  Initial mock data. Recommended shape: `{ "<slug>": { "<Resource>": [ … ] } }`. If the top-level slug key is missing, the API wraps the object using the path `slug`. Omit or `null` for `{ "<slug>": {} }`.
</ParamField>

<ParamField body="config" type="object">
  Reserved for future emulator overrides. Accepted but not applied yet. Safe to omit or send `{}`.
</ParamField>

## Response

<ResponseField name="snapshotId" type="string" required>
  Snapshot id (also the subdomain label on the mock URL).
</ResponseField>

<ResponseField name="slug" type="string" required>
  Provider that was provisioned.
</ResponseField>

<ResponseField name="url" type="string" required>
  Public mock base URL. Use this as the API host for agents and clients.
</ResponseField>

<ResponseField name="expiresAt" type="string" required>
  ISO-8601 expiry time from `ttl`.
</ResponseField>

<ResponseField name="ttl" type="string" required>
  Normalized TTL that was applied.
</ResponseField>

```json theme={null}
{
  "snapshotId": "snap_a1b2c3d4e5f6789012345678",
  "slug": "jira",
  "url": "https://snap_a1b2c3d4e5f6789012345678.jira.mock.ressl.cc",
  "expiresAt": "2026-07-14T12:00:00.000Z",
  "ttl": "1h"
}
```

## Example

```bash theme={null}
PROVIDER=jira   # any slug from /providers/list

curl -sS -X POST "https://simulation.ressl.ai/providers/${PROVIDER}/create-snapshot" \
  -H "Authorization: Bearer rsk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "ttl": "1h",
    "seed": {
      "jira": {
        "projects": [{ "id": "10000", "key": "DEMO", "name": "Demo" }]
      }
    }
  }'
```

## Errors

| Status | Meaning                          |
| ------ | -------------------------------- |
| `400`  | Invalid slug, body, or `ttl`     |
| `401`  | Invalid or missing API key       |
| `403`  | Org is not granted that provider |
| `502`  | Provisioning failed              |

```json theme={null}
{ "error": "Your organization does not have access to that provider." }
```
