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

# Test Campaign SFTP Connection

> Verify SFTP connectivity for a campaign

# Test Campaign SFTP Connection

Run a connectivity check against the configured SFTP server. The result is stored on the SFTP config (`last_test_at`, `last_test_success`) and required before the integration can be enabled.

## Endpoint

```
POST /api/v1/campaigns/{campaign_id}/sftp/test-connection
```

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

## Examples

<RequestExample>
  ```bash theme={null}
  curl -X POST "https://app.talkover.ai/api/v1/campaigns/campaign-uuid/sftp/test-connection" \
    -H "Authorization: Bearer talq_your_environment_token_here"
  ```
</RequestExample>

## Response

### Success

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "message": "SFTP connection successful",
    "data": {
      "tested_at": "2024-01-15T16:45:00Z",
      "import_path_accessible": true,
      "export_path_accessible": true
    }
  }
  ```
</ResponseExample>

### Failure

<ResponseExample>
  ```json theme={null}
  {
    "success": false,
    "message": "SFTP connection failed",
    "data": {
      "tested_at": "2024-01-15T16:45:00Z",
      "error": "Authentication failed"
    }
  }
  ```
</ResponseExample>
