> ## 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.

# Update Campaign SFTP Config

> Update a campaign's SFTP configuration

# Update Campaign SFTP Config

Update a campaign's SFTP configuration. Enabling (`is_enabled: true`) requires a successful test connection on file — otherwise the request fails with 422.

## Endpoint

```
PUT /api/v1/campaigns/{campaign_id}/sftp
```

## 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

Same fields as [Create Campaign SFTP Config](/api-reference/endpoints/create-campaign-sftp), all optional, plus:

<ParamField body="is_enabled" type="boolean">
  Toggle integration. Setting to `true` requires a successful test result.
</ParamField>

## Examples

<RequestExample>
  ```bash theme={null}
  curl -X PUT "https://app.talkover.ai/api/v1/campaigns/campaign-uuid/sftp" \
    -H "Authorization: Bearer talq_your_environment_token_here" \
    -H "Content-Type: application/json" \
    -d '{
      "import_schedule": "hourly",
      "is_enabled": true
    }'
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "id": "sftp-config-uuid-1",
      "import_schedule": "hourly",
      "is_enabled": true,
      "updated_at": "2024-01-15T16:30:00Z"
    }
  }
  ```
</ResponseExample>

## Error responses

### 422 — Cannot Enable

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "message": "Run a successful test connection before enabling SFTP",
    "code": "SFTP_TEST_REQUIRED"
  }
  ```
</ResponseExample>
