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

# Update Data Export

> Change datasets, schedule, location or credentials

Updates a data export. Send only the fields you want to change. Requires `data_exports:write`, `subscribers:read` and `analytics:read`.

* Changing `bucket`, `region`, `endpoint`, `pathPrefix` or credentials writes a test file first. If it fails, nothing changes. Exports continue from their current progress in the new location.
* Datasets you add start from the time of the change. Datasets you remove stop immediately.
* Resuming a paused export (`isEnabled: true`) runs it at the next scheduler tick.

<ParamField path="id" type="string" required>
  Data export ID.
</ParamField>

<ParamField body="name" type="string" />

<ParamField body="bucket" type="string" />

<ParamField body="region" type="string | null" />

<ParamField body="endpoint" type="string | null">
  Send `null` or `""` to clear a custom endpoint.
</ParamField>

<ParamField body="pathPrefix" type="string | null" />

<ParamField body="accessKeyId" type="string">
  Must be sent together with `secretAccessKey`.
</ParamField>

<ParamField body="secretAccessKey" type="string">
  Must be sent together with `accessKeyId`.
</ParamField>

<ParamField body="datasets" type="string[]" />

<ParamField body="frequency" type="string" />

<ParamField body="isEnabled" type="boolean">
  `false` pauses the export, `true` resumes it.
</ParamField>

```bash theme={null}
curl -X PATCH "https://api.sequenzy.com/api/v1/data-exports/exp_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "frequency": "hourly", "datasets": ["email_events", "sms_events"] }'
```

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "dataExport": {
      "id": "exp_abc123",
      "frequency": "hourly",
      "datasets": ["email_events", "sms_events"]
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "code": "invalid_input",
    "error": "Provide accessKeyId and secretAccessKey together when rotating credentials."
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "code": "not_found",
    "error": "Data export destination not found."
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.