[Tenjin API Reference](https://api-docs.tenjin.com/llms.txt) › [Cloud Data Exporter API](https://api-docs.tenjin.com/cloud-data-exporter-api.md) › Create a config

- Cloud Data Exporter API OpenAPI spec: https://api-docs.tenjin.com/openapi/cloud-data-exporter-api.json

# Create a config

- **Method:** `POST`
- **Path:** `/v1/configs`
- **Operation ID:** `post_configs`
- **Tags:** Cloud Data Exporter Configs

Create a new cloud data exporter config for the current org

## Effective servers

- `https://api.tenjin.com/cloud_data_exporter`

## Authentication

- **Bearer**: HTTP bearer (`JWT`)

  Generate an access token on the [Access Tokens](https://dashboard.tenjin.com/dashboard/access_tokens) page of the Tenjin dashboard and send it as `Authorization: Bearer <access token>`. [API access tokens](https://tenjin.com/docs/api-access-tokens/) explains them.

## Request body

**Required:** `true`

**Content type:** `application/json`

schema: `post_configs_Request`

- **`destination_config` (required)**: `object`
  - **`bucket` (required)**: `string`

    S3 bucket name
  - **`region` (required)**: `string`

    S3 region (e.g. us-east-1)
  - **`prefix`**: `string`

    S3 key prefix (optional)
- **`name` (required)**: `string`

  Human-readable label, prepended to the S3 key path to separate multiple configs on one bucket
- **`destination_type`**: `string`, possible values: `"s3"`, default: `"s3"`

  Destination type (s3)
- **`enabled`**: `boolean`, default: `true`

  Whether the schedule is active

**Example:**

```json
{
  "name": "",
  "destination_type": "s3",
  "destination_config": {
    "bucket": "",
    "region": "",
    "prefix": ""
  },
  "enabled": true
}
```

## Responses

### 201 Config created

**Content type:** `application/json`

schema: `CloudDataExporterConfig`

- **`created_at` (required)**: `string`, format: `date-time`

  Creation timestamp (ISO8601)
- **`created_by_id` (required)**: `string`

  UUID of the user who created this config
- **`destination_config` (required)**: `object`

  Destination-specific configuration. For s3: { bucket, region, prefix? }
- **`destination_type` (required)**: `string`

  Destination type identifier (currently only "s3")
- **`enabled` (required)**: `boolean`

  Whether the scheduled export is active
- **`id` (required)**: `string`

  Config UUID
- **`last_exported_at` (required)**: `string`, format: `date-time`

  End of the latest window delivered (ISO8601), null if none has been
- **`name` (required)**: `string`

  Human-readable label prepended to the S3 key path
- **`organization_id` (required)**: `string`

  Organization UUID
- **`updated_at` (required)**: `string`, format: `date-time`

  Last update timestamp (ISO8601)

**Example:**

```json
{
  "id": "210a0a12-4327-4dbc-aeaf-cc6a60bdd8af",
  "organization_id": "",
  "name": "prod",
  "destination_type": "",
  "destination_config": {
    "bucket": "acme-tenjin-exports",
    "region": "us-east-1",
    "prefix": "tenjin-exports"
  },
  "enabled": true,
  "created_by_id": "",
  "last_exported_at": "",
  "created_at": "",
  "updated_at": ""
}
```

### 401, 403, 422, 503

- `401` The access token was revoked, or your user role has no access to the Cloud Data Exporter
- `403` Missing or malformed access token, or the Cloud Data Exporter is not enabled for this organization
- `422` Validation error, or the bucket refused the bucket permission check
- `503` Bucket permission check temporarily unavailable (Tenjin-side failure), retry shortly

**Content type:** `application/json`

schema: `Error`

- **`error` (required)**: `string`

  Error message (same as title, for backward compatibility)
- **`status` (required)**: `integer`

  HTTP status code
- **`title` (required)**: `string`

  Short, human-readable summary
- **`type` (required)**: `string`

  URI identifying the problem type
- **`detail`**: `string`

  Human-readable explanation specific to this occurrence

**Example:**

```json
{
  "error": "",
  "type": "",
  "title": "",
  "status": 422,
  "detail": ""
}
```

## Schemas

- `Error` — shown above.
- `CloudDataExporterConfig` — shown above.
- `post_configs_Request` — shown above.
