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

# Delete Vimeo Connection

> Permanently delete a Vimeo connection

## Overview

Permanently delete a Vimeo connection and all its associated configuration data. This action cannot be undone. After deletion, any integrations or workflows using this connection will no longer function. Only the connection owner can delete it.

<Warning>
  **Permanent Action:** Deleting a connection is irreversible. Ensure you no longer need this connection before proceeding. Consider disabling it instead if you might need it again later.
</Warning>

<Note>
  You need a valid API key to use this endpoint. Get your API key from the [API Access page](https://app.pictory.ai/api-access) in your Pictory dashboard.
</Note>

***

## API Endpoint

```http theme={null}
DELETE https://api.pictory.ai/pictoryapis/v1/vimeo-connections/{connectionid}
```

***

## Request Parameters

### Headers

<ParamField header="Authorization" type="string" required>
  API key for authentication (starts with `pictai_`)

  ```
  Authorization: YOUR_API_KEY
  ```
</ParamField>

### Path Parameters

<ParamField path="connectionid" type="string" required>
  The unique identifier of the Vimeo connection to delete

  **Example:** `"20251222155613307xv0nodhitf9cd0f"`
</ParamField>

***

## Response

Returns HTTP 204 (No Content) on successful deletion. The response body is empty as the connection no longer exists. This endpoint is idempotent - deleting an already-deleted or non-existent connection also returns 204. If authentication fails, an error response is returned with details.

### Response Examples

<ResponseExample>
  ```json 204 - Success theme={null}
  No content returned. The connection has been successfully deleted.
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "message": "Unauthorized"
  }
  ```

  ```json 500 - Internal Server Error theme={null}
  {
    "error": {
      "code": "INTERNAL_ERROR",
      "message": "An unexpected error occurred"
    }
  }
  ```
</ResponseExample>

***

## Code Examples

<Tip>
  Replace `YOUR_API_KEY` with your actual API key that starts with `pictai_`
</Tip>

<CodeGroup>
  ```bash cURL theme={null}
  # Delete a Vimeo connection
  # Replace YOUR_API_KEY with your actual API key
  # Replace CONNECTION_ID with the actual connection ID

  curl --request DELETE \
    --url https://api.pictory.ai/pictoryapis/v1/vimeo-connections/CONNECTION_ID \
    --header 'Authorization: YOUR_API_KEY' | python -m json.tool
  ```

  ```javascript JavaScript / Node.js theme={null}
  // Replace 'YOUR_API_KEY' with your actual API key

  const deleteVimeoConnection = async (apiKey, connectionId) => {
    const response = await fetch(`https://api.pictory.ai/pictoryapis/v1/vimeo-connections/${connectionId}`, {
      method: 'DELETE',
      headers: {
        'Authorization': `${apiKey}`
      }
    });

    if (!response.ok) {
      const error = await response.json();
      throw new Error(`Failed: ${error.message}`);
    }

    // 204 responses have no content
    return { success: true, message: 'Connection deleted successfully' };
  };

  // Usage
  try {
    const connectionId = '20251222155613307xv0nodhitf9cd0f';
    const result = await deleteVimeoConnection('YOUR_API_KEY', connectionId);
    console.log(result.message);
    console.log(`Connection ${connectionId} has been permanently deleted`);
  } catch (error) {
    console.error('Error:', error.message);
  }
  ```

  ```python Python theme={null}
  # Replace 'YOUR_API_KEY' with your actual API key

  import requests

  def delete_vimeo_connection(api_key, connection_id):
      """Delete a Vimeo connection"""
      url = f"https://api.pictory.ai/pictoryapis/v1/vimeo-connections/{connection_id}"

      headers = {
          "Authorization": api_key
      }

      response = requests.delete(url, headers=headers)
      response.raise_for_status()

      # 204 responses have no content
      return {"success": True, "message": "Connection deleted successfully"}

  # Usage
  try:
      connection_id = "20251222155613307xv0nodhitf9cd0f"
      result = delete_vimeo_connection("YOUR_API_KEY", connection_id)
      print(result["message"])
      print(f"Connection {connection_id} has been permanently deleted")
  except requests.exceptions.HTTPError as e:
      if e.response.status_code == 404:
          print("Error: Connection not found or already deleted")
      else:
          error = e.response.json()
          print(f"Error: {error.get('message', 'Request failed')}")
  ```

  ```php PHP theme={null}
  <?php
  // Replace 'YOUR_API_KEY' with your actual API key

  function deleteVimeoConnection($apiKey, $connectionId) {
      $url = "https://api.pictory.ai/pictoryapis/v1/vimeo-connections/{$connectionId}";

      $ch = curl_init($url);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
      curl_setopt($ch, CURLOPT_HTTPHEADER, [
          'Authorization: ' . $apiKey
      ]);

      $response = curl_exec($ch);
      $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
      curl_close($ch);

      if ($httpCode !== 204) {
          $error = json_decode($response, true);
          throw new Exception($error['message'] ?? 'Request failed');
      }

      // 204 responses have no content
      return [
          'success' => true,
          'message' => 'Connection deleted successfully'
      ];
  }

  // Usage
  try {
      $connectionId = '20251222155613307xv0nodhitf9cd0f';
      $result = deleteVimeoConnection('YOUR_API_KEY', $connectionId);
      echo $result['message'] . "\n";
      echo "Connection {$connectionId} has been permanently deleted\n";
  } catch (Exception $e) {
      echo "Error: " . $e->getMessage() . "\n";
  }
  ?>
  ```

  ```go Go theme={null}
  // Replace "YOUR_API_KEY" with your actual API key

  package main

  import (
      "fmt"
      "io"
      "net/http"
  )

  func deleteVimeoConnection(apiKey string, connectionId string) error {
      url := fmt.Sprintf("https://api.pictory.ai/pictoryapis/v1/vimeo-connections/%s", connectionId)

      req, err := http.NewRequest("DELETE", url, nil)
      if err != nil {
          return err
      }

      req.Header.Set("Authorization", apiKey)

      client := &http.Client{}
      resp, err := client.Do(req)
      if err != nil {
          return err
      }
      defer resp.Body.Close()

      if resp.StatusCode != http.StatusNoContent {
          body, _ := io.ReadAll(resp.Body)
          return fmt.Errorf("request failed (status %d): %s", resp.StatusCode, string(body))
      }

      // 204 responses have no content
      return nil
  }

  // Usage
  func main() {
      connectionId := "20251222155613307xv0nodhitf9cd0f"

      err := deleteVimeoConnection("YOUR_API_KEY", connectionId)
      if err != nil {
          panic(err)
      }

      fmt.Println("Connection deleted successfully")
      fmt.Printf("Connection %s has been permanently deleted\n", connectionId)
  }
  ```
</CodeGroup>

***

## Error Handling

<AccordionGroup>
  <Accordion title="401 Unauthorized" icon="lock">
    **Cause:** Invalid or missing API key

    **Solution:**

    * Verify your API key is correct and starts with `pictai_`
    * Check the `Authorization` header is properly formatted: `YOUR_API_KEY`
    * Ensure your API key hasn't expired
    * Get a new API key from the [API Access page](https://app.pictory.ai/api-access)
  </Accordion>

  <Accordion title="Idempotent Behavior" icon="circle-check">
    **Behavior:** This endpoint is idempotent and always returns 204 (No Content) on success

    **What This Means:**

    * Deleting an already-deleted connection returns 204 (success)
    * Deleting a non-existent connection returns 204 (success)
    * Multiple delete requests for the same connection are safe
    * You can delete without checking if the connection exists first
    * This follows REST API best practices for DELETE operations
  </Accordion>
</AccordionGroup>

***

## Best Practices

### Before Deleting a Connection

1. **Verify Dependencies:** Check if any active workflows or integrations are using this connection
2. **Export Configuration:** Note down the connection settings if you might need to recreate it later
3. **Consider Disabling:** If you are unsure, use the [Update Vimeo Connection](/api-reference/vimeo-integration/update-vimeo-connection) endpoint to set `enabled: false` instead of deleting
4. **Confirm Identity:** Double-check the connection ID to ensure you are deleting the correct connection

<Note>
  **Idempotent Operation:** This endpoint is safe to call multiple times. If you are unsure whether a connection exists, you can simply delete it without checking first - the operation will succeed either way.
</Note>

### Alternative to Deletion

Instead of permanently deleting a connection, you can disable it:

```json theme={null}
PUT /v1/vimeo-connections/{connectionid}
{
  "enabled": false,
  "version": 1
}
```

Disabling preserves all configuration data while preventing the connection from being used. You can re-enable it later if needed.

### Safe Deletion Workflow

```javascript theme={null}
// Example: Safe deletion workflow with confirmation
const safeDeleteConnection = async (apiKey, connectionId) => {
  // Step 1: Get connection details
  const connection = await getVimeoConnectionById(apiKey, connectionId);
  console.log(`About to delete: ${connection.name}`);

  // Step 2: Confirm (in production, get user confirmation)
  const confirmed = true; // Replace with actual confirmation logic

  if (!confirmed) {
    return { cancelled: true };
  }

  // Step 3: Delete the connection
  await deleteVimeoConnection(apiKey, connectionId);
  console.log('Connection deleted successfully');

  return { success: true };
};
```

<Warning>
  **Impact on Videos:** Deleting a Vimeo connection does not affect videos that were previously uploaded using this connection. Those videos remain in your Vimeo account. However, you will not be able to upload new videos through this connection.
</Warning>
