Disconnect a Social Account
Remove a connected social account from your workspace
Published
DELETE
/v1/social/accounts/2291curl -X DELETE "https://api.orshot.com/v1/social/accounts/2291" \
-H "Authorization: Bearer <ORSHOT_API_KEY>"const res = await fetch("https://api.orshot.com/v1/social/accounts/2291", {
method: "DELETE",
headers: {
Authorization: "Bearer <ORSHOT_API_KEY>",
},
});
const data = await res.json();import requests
response = requests.delete(
"https://api.orshot.com/v1/social/accounts/2291",
headers={"Authorization": "Bearer <ORSHOT_API_KEY>"},
)
data = response.json()$ch = curl_init("https://api.orshot.com/v1/social/accounts/2291");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <ORSHOT_API_KEY>",
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);require "net/http"
require "json"
uri = URI("https://api.orshot.com/v1/social/accounts/2291")
req = Net::HTTP::Delete.new(uri)
req["Authorization"] = "Bearer <ORSHOT_API_KEY>"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)Disconnect a social account. Orshot revokes its own access at the publishing provider first, then removes the account from the workspace and takes it off the owner's bill from the next cycle. Posts scheduled for the account are no longer sent.
The person who connected the account can connect it again later with a new connect link or from the dashboard.
Endpoint#
DELETE /social/accounts/:id#
https://api.orshot.com/v1/social/accounts/2291Request Example#
await fetch("https://api.orshot.com/v1/social/accounts/2291", {
method: "DELETE",
headers: {
Authorization: "Bearer <ORSHOT_API_KEY>",
},
});Response Example#
{
"data": {
"success": true,
"disconnected": true,
"message": "Disconnected instagram account",
"account": {
"id": 2291,
"platform": "instagram",
"username": "acme_athens",
"name": "Acme Athens",
"external_id": "office_142"
}
}
}An account that was already disconnected answers 200 with "disconnected": false.
Error Responses#
| Code | code | Description |
|---|---|---|
| 403 | insufficient_role | The OAuth token's person is not an owner or admin of the workspace |
| 404 | No account with this id in the workspace | |
| 500 | disconnect_incomplete | Access was revoked at the provider but the account record could not be updated yet. It is repaired automatically within the hour |
| 503 | provider_unavailable | The publishing provider could not be reached. Nothing changed; retry |
Was this page helpful?
Ready to automate?
Start rendering images, PDFs and videos from your templates in under 2 minutes. Free plan, no credit card.
Get your API key- Image, PDF and video generation via API
- Visual editor with AI and smart layouts
- Zapier, Make, MCP and 40+ integrations
- White-label embed for your own app
- 100 free credits a month, no credit card required