# Synthetic Data API

Source: https://docs.autessa.com/docs/reference/synthetic-data

> Synthetic data: generate rows, or run jobs that produce a file Generated from the Autessa OpenAPI spec.

# Synthetic Data API

Synthetic data: generate rows, or run jobs that produce a file

- **Base URL:** `https://api.autessa.com`
- **Auth:** your API key in the `Authorization` header, with no `Bearer` prefix.
- **Guide:** [Synthetic Data](/docs/features/synthetic-data.md)
- **Status:** 0 live, 13 in preview. Preview operations are marked.

---

## Generate rows and get them back

(Preview)

**POST** `/clients/synthetic-data/generate`

For small sets: the rows come back in the response.

This operation is in preview. Its shape may change before it is generally available.

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `columnDefinitions` | array of AutessaDbColumnDefinition |  |  |
| `description` | string |  |  |
| `rowCount` | integer |  |  |
| `sampleRowsJson` | string |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `rejectedRowCount` | integer |  |  |
| `rowCount` | integer |  |  |
| `rows` | array of object |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/synthetic-data/generate" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"columnDefinitions":[{"allowOverflow":true}]}'
```

---

## List synthetic data jobs (newest first)

(Preview)

**GET** `/clients/synthetic-data/jobs`

This operation is in preview. Its shape may change before it is generally available.

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `jobs` | array of SyntheticDataJobSummaryDto |  |  |

```bash
curl -X GET "https://api.autessa.com/clients/synthetic-data/jobs" \
  -H "Authorization: $AUTESSA_API_KEY"
```

---

## Start a synthetic data job

(Preview)

**POST** `/clients/synthetic-data/jobs`

Runs in the background. Output is a file by default (DATASET_FILE); table targets are not available to API keys.

This operation is in preview. Its shape may change before it is generally available.

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `columnDefinitions` | array of AutessaDbColumnDefinition |  |  |
| `createTable` | CreateTableRequest |  |  |
| `description` | string |  |  |
| `fileFormat` | string |  |  |
| `name` | string |  |  |
| `rowCount` | integer |  |  |
| `sampleRowsJson` | string |  |  |
| `tableId` | string |  | ID id. |
| `targetType` | string |  |  |
| `writeMode` | string |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `jobId` | string |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/synthetic-data/jobs" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"columnDefinitions":[{"allowOverflow":true}]}'
```

---

## Get a job's status, progress and batches

(Preview)

**GET** `/clients/synthetic-data/jobs/{jobId}`

This operation is in preview. Its shape may change before it is generally available.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | Yes |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `job` | SyntheticDataJobSummaryDto |  |  |

```bash
curl -X GET "https://api.autessa.com/clients/synthetic-data/jobs/V1StGXR8Z5" \
  -H "Authorization: $AUTESSA_API_KEY"
```

---

## Generate more rows into a job

(Preview)

**POST** `/clients/synthetic-data/jobs/{jobId}/append`

This operation is in preview. Its shape may change before it is generally available.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | Yes |  |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalRowCount` | integer |  |  |
| `jobId` | string |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `job` | SyntheticDataJobSummaryDto |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/synthetic-data/jobs/V1StGXR8Z5/append" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"additionalRowCount":1}'
```

---

## Approve the staged rows

(Preview)

**POST** `/clients/synthetic-data/jobs/{jobId}/approve`

This operation is in preview. Its shape may change before it is generally available.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | Yes |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `job` | SyntheticDataJobSummaryDto |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/synthetic-data/jobs/V1StGXR8Z5/approve" \
  -H "Authorization: $AUTESSA_API_KEY"
```

---

## Cancel a job

(Preview)

**POST** `/clients/synthetic-data/jobs/{jobId}/cancel`

This operation is in preview. Its shape may change before it is generally available.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | Yes |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `job` | SyntheticDataJobSummaryDto |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/synthetic-data/jobs/V1StGXR8Z5/cancel" \
  -H "Authorization: $AUTESSA_API_KEY"
```

---

## Discard the staged rows

(Preview)

**POST** `/clients/synthetic-data/jobs/{jobId}/discard`

This operation is in preview. Its shape may change before it is generally available.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | Yes |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `job` | SyntheticDataJobSummaryDto |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/synthetic-data/jobs/V1StGXR8Z5/discard" \
  -H "Authorization: $AUTESSA_API_KEY"
```

---

## Leave rows out of a job

(Preview)

**POST** `/clients/synthetic-data/jobs/{jobId}/exclude-rows`

This operation is in preview. Its shape may change before it is generally available.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | Yes |  |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `batchId` | string |  |  |
| `jobId` | string |  |  |
| `rowIndexes` | array of integer |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `job` | SyntheticDataJobSummaryDto |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/synthetic-data/jobs/V1StGXR8Z5/exclude-rows" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"batchId":"string"}'
```

---

## A download link for a job's file

(Preview)

**GET** `/clients/synthetic-data/jobs/{jobId}/export`

This operation is in preview. Its shape may change before it is generally available.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | Yes |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `downloadUrl` | string |  |  |

```bash
curl -X GET "https://api.autessa.com/clients/synthetic-data/jobs/V1StGXR8Z5/export" \
  -H "Authorization: $AUTESSA_API_KEY"
```

---

## Preview staged rows (REVIEW mode)

(Preview)

**GET** `/clients/synthetic-data/jobs/{jobId}/preview`

This operation is in preview. Its shape may change before it is generally available.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | Yes |  |
| `batchIndex` | query | integer |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `batchId` | string |  |  |
| `batchIndex` | integer |  |  |
| `columns` | array of AutessaDbColumnDefinition |  |  |
| `nextBatchIndex` | integer |  |  |
| `rowCount` | integer |  |  |
| `rows` | array of object |  |  |

```bash
curl -X GET "https://api.autessa.com/clients/synthetic-data/jobs/V1StGXR8Z5/preview" \
  -H "Authorization: $AUTESSA_API_KEY"
```

---

## Generate one batch again

(Preview)

**POST** `/clients/synthetic-data/jobs/{jobId}/regenerate-batch`

This operation is in preview. Its shape may change before it is generally available.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | Yes |  |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `batchId` | string |  |  |
| `jobId` | string |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `job` | SyntheticDataJobSummaryDto |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/synthetic-data/jobs/V1StGXR8Z5/regenerate-batch" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"batchId":"string"}'
```

---

## Propose columns from a description

(Preview)

**POST** `/clients/synthetic-data/schema/propose`

This operation is in preview. Its shape may change before it is generally available.

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  |  |
| `sampleRowsJson` | string |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `schema` | AutessaDbSchema |  |  |
| `suggestedTableName` | string |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/synthetic-data/schema/propose" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"description":"Customer support tickets for an online shoe store"}'
```

---

## Related

- [API reference overview](/docs/reference.md)
- [Errors and retries](/docs/reference.md#errors)
- [Synthetic Data guide](/docs/features/synthetic-data.md)

