curl -X DELETE "https://api.hooked.so/v1/integration/int_yt_abc123" \
-H "x-api-key: your_api_key_here"
const integrationId = 'int_yt_abc123';
const response = await fetch(`https://api.hooked.so/v1/integration/${integrationId}`, {
method: 'DELETE',
headers: {
'x-api-key': process.env.HOOKED_API_KEY
}
});
const data = await response.json();
if (data.success) {
console.log(`Disconnected ${data.data.type} integration`);
}
import requests
integration_id = 'int_yt_abc123'
response = requests.delete(
f'https://api.hooked.so/v1/integration/{integration_id}',
headers={'x-api-key': 'your_api_key_here'}
)
data = response.json()
if data['success']:
print(f"Disconnected {data['data']['type']} integration")
$integrationId = 'int_yt_abc123';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.hooked.so/v1/integration/{$integrationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'x-api-key: your_api_key_here'
]
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
if ($data['success']) {
echo "Disconnected " . $data['data']['type'] . " integration";
}
{
"success": true,
"message": "Integration disconnected successfully",
"data": {
"id": "int_yt_abc123",
"type": "youtube",
"deleted": true
}
}
{
"code": "not_found",
"message": "Integration not found",
"details": {
"resource_id": "int_invalid",
"resource_type": "Integration"
}
}
{
"code": "forbidden",
"message": "Integration does not belong to your team",
"details": {}
}
Resources
Disconnect Integration
Remove a connected social media platform
DELETE
/
v1
/
integration
/
{integrationId}
curl -X DELETE "https://api.hooked.so/v1/integration/int_yt_abc123" \
-H "x-api-key: your_api_key_here"
const integrationId = 'int_yt_abc123';
const response = await fetch(`https://api.hooked.so/v1/integration/${integrationId}`, {
method: 'DELETE',
headers: {
'x-api-key': process.env.HOOKED_API_KEY
}
});
const data = await response.json();
if (data.success) {
console.log(`Disconnected ${data.data.type} integration`);
}
import requests
integration_id = 'int_yt_abc123'
response = requests.delete(
f'https://api.hooked.so/v1/integration/{integration_id}',
headers={'x-api-key': 'your_api_key_here'}
)
data = response.json()
if data['success']:
print(f"Disconnected {data['data']['type']} integration")
$integrationId = 'int_yt_abc123';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.hooked.so/v1/integration/{$integrationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'x-api-key: your_api_key_here'
]
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
if ($data['success']) {
echo "Disconnected " . $data['data']['type'] . " integration";
}
{
"success": true,
"message": "Integration disconnected successfully",
"data": {
"id": "int_yt_abc123",
"type": "youtube",
"deleted": true
}
}
{
"code": "not_found",
"message": "Integration not found",
"details": {
"resource_id": "int_invalid",
"resource_type": "Integration"
}
}
{
"code": "forbidden",
"message": "Integration does not belong to your team",
"details": {}
}
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
string
required
The unique ID of the integration to disconnect
Headers
string
required
Your API key from API Settings
Response
boolean
Whether the request was successful
string
Status message
object
Request Example
curl -X DELETE "https://api.hooked.so/v1/integration/int_yt_abc123" \
-H "x-api-key: your_api_key_here"
const integrationId = 'int_yt_abc123';
const response = await fetch(`https://api.hooked.so/v1/integration/${integrationId}`, {
method: 'DELETE',
headers: {
'x-api-key': process.env.HOOKED_API_KEY
}
});
const data = await response.json();
if (data.success) {
console.log(`Disconnected ${data.data.type} integration`);
}
import requests
integration_id = 'int_yt_abc123'
response = requests.delete(
f'https://api.hooked.so/v1/integration/{integration_id}',
headers={'x-api-key': 'your_api_key_here'}
)
data = response.json()
if data['success']:
print(f"Disconnected {data['data']['type']} integration")
$integrationId = 'int_yt_abc123';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.hooked.so/v1/integration/{$integrationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'x-api-key: your_api_key_here'
]
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
if ($data['success']) {
echo "Disconnected " . $data['data']['type'] . " integration";
}
Response Examples
{
"success": true,
"message": "Integration disconnected successfully",
"data": {
"id": "int_yt_abc123",
"type": "youtube",
"deleted": true
}
}
{
"code": "not_found",
"message": "Integration not found",
"details": {
"resource_id": "int_invalid",
"resource_type": "Integration"
}
}
{
"code": "forbidden",
"message": "Integration does not belong to your team",
"details": {}
}
What Happens After Disconnection
Pending Scheduled Posts
Any posts scheduled for this integration will:- Remain in
pendingstatus - Fail when their scheduled time arrives
- Status will change to
failedwith an error message
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:- Go to Hooked Dashboard
- Click Connect on the platform you want to add
- Complete the OAuth authorization flow
- 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