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

# Trigger SFTP Export

> Manually trigger an SFTP export of call results

# Trigger SFTP Export

Export selected campaign result files to the configured `export_path` on the SFTP server.

## Endpoint

```
POST /api/v1/campaigns/{campaign_id}/sftp/trigger-export
```

## Path parameters

<ParamField path="campaign_id" type="string" required>Campaign UUID.</ParamField>

## Request headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Format: `Bearer talq_your_environment_token_here`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be set to `application/json`
</ParamField>

## Request body

<ParamField body="file_data_ids" type="array" required>
  Array of file UUIDs to export. Use [Get Campaign](/api-reference/endpoints/get-campaign) to retrieve available `campaign_files`.
</ParamField>

## Examples

<RequestExample>
  ```bash theme={null}
  curl -X POST "https://app.talkover.ai/api/v1/campaigns/campaign-uuid/sftp/trigger-export" \
    -H "Authorization: Bearer talq_your_environment_token_here" \
    -H "Content-Type: application/json" \
    -d '{
      "file_data_ids": ["file-uuid-1", "file-uuid-2"]
    }'
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "message": "SFTP export queued",
    "data": {
      "job_id": "job-uuid-2",
      "files_count": 2
    }
  }
  ```
</ResponseExample>

## Error responses

### 409 — Already Running

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "message": "An SFTP export is already in progress",
    "code": "SFTP_EXPORT_IN_PROGRESS"
  }
  ```
</ResponseExample>
