Skip to main content
DELETE
/
v1
/
integration
/
{integrationId}
curl -X DELETE "https://api.hooked.so/v1/integration/int_yt_abc123" \
  -H "x-api-key: your_api_key_here"
{
  "success": true,
  "message": "Integration disconnected successfully",
  "data": {
    "id": "int_yt_abc123",
    "type": "youtube",
    "deleted": true
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.hooked.so/llms.txt

Use this file to discover all available pages before exploring further.

Try it out! Use the API playground on the right to test the Disconnect Integration endpoint directly.

Overview

Disconnect a social media platform from your account. This removes the connection and all associated tokens.
This action is permanent. Once disconnected:
  • All pending scheduled posts for this platform will fail
  • You’ll need to reconnect through the dashboard to post again
  • Historical post data will be preserved

Endpoint

DELETE /v1/integration/{integrationId}

Path Parameters

integrationId
string
required
The unique ID of the integration to disconnect

Headers

x-api-key
string
required
Your API key from API Settings

Response

success
boolean
Whether the request was successful
message
string
Status message
data
object

Request Example

curl -X DELETE "https://api.hooked.so/v1/integration/int_yt_abc123" \
  -H "x-api-key: your_api_key_here"

Response Examples

{
  "success": true,
  "message": "Integration disconnected successfully",
  "data": {
    "id": "int_yt_abc123",
    "type": "youtube",
    "deleted": true
  }
}

What Happens After Disconnection

Pending Scheduled Posts

Any posts scheduled for this integration will:
  1. Remain in pending status
  2. Fail when their scheduled time arrives
  3. Status will change to failed with an error message
Recommendation: Cancel any pending scheduled posts before disconnecting:
async function disconnectSafely(integrationId) {
  // 1. Get all pending posts for this integration
  const postsResponse = await fetch(
    `https://api.hooked.so/v1/schedule/list?status=pending`,
    { headers: { 'x-api-key': process.env.HOOKED_API_KEY } }
  );

  const { data: { scheduledPosts } } = await postsResponse.json();

  // 2. Filter posts for this integration
  const affectedPosts = scheduledPosts.filter(
    post => post.integration.id === integrationId
  );

  if (affectedPosts.length > 0) {
    console.log(`Warning: ${affectedPosts.length} pending posts will fail`);

    // Optional: Cancel them first
    for (const post of affectedPosts) {
      await fetch(`https://api.hooked.so/v1/schedule/${post.id}`, {
        method: 'DELETE',
        headers: { 'x-api-key': process.env.HOOKED_API_KEY }
      });
    }
  }

  // 3. Disconnect the integration
  const response = await fetch(
    `https://api.hooked.so/v1/integration/${integrationId}`,
    {
      method: 'DELETE',
      headers: { 'x-api-key': process.env.HOOKED_API_KEY }
    }
  );

  return await response.json();
}

Historical Data

  • Previously published posts remain on the platform
  • Post history in Hooked is preserved for reference
  • Analytics data is retained

Reconnecting

To reconnect a platform after disconnecting:
  1. Go to Hooked Dashboard
  2. Click Connect on the platform you want to add
  3. Complete the OAuth authorization flow
  4. A new integration ID will be generated
Reconnecting creates a new integration with a new ID. Update any stored integration IDs in your application.

Next Steps

List Integrations

View remaining connected platforms

Connect New

Add a new platform in dashboard

Cancel Schedules

Cancel pending posts

List Scheduled

View scheduled posts

Authorizations

x-api-key
string
header
required

Path Parameters

integrationId
string
required

Integration ID

Response

200

Integration disconnected successfully