Cancel a Connect Session

Stop a connect link from working

Published

DELETE
/v1/social/connect-sessions/cs_9kq2N0xYv3b8ZtQ1mL7wPA
curl -X DELETE "https://api.orshot.com/v1/social/connect-sessions/cs_9kq2N0xYv3b8ZtQ1mL7wPA" \
  -H "Authorization: Bearer <ORSHOT_API_KEY>"

Cancel a connect session that has not finished. The link stops working at once, and a login already in progress ends without an account. Sessions that already ended are left as they are. Calling this twice is fine.

Endpoint#

DELETE /social/connect-sessions/:id#

Endpoint
https://api.orshot.com/v1/social/connect-sessions/cs_9kq2N0xYv3b8ZtQ1mL7wPA

Request Example#

JavaScript
await fetch(
  "https://api.orshot.com/v1/social/connect-sessions/cs_9kq2N0xYv3b8ZtQ1mL7wPA",
  {
    method: "DELETE",
    headers: {
      Authorization: "Bearer <ORSHOT_API_KEY>",
    },
  },
);

Response Example#

JSON
{
  "data": {
    "id": "cs_9kq2N0xYv3b8ZtQ1mL7wPA",
    "object": "social_connect_session",
    "status": "cancelled",
    "platform": "instagram",
    "completed_at": "2026-11-02T10:03:00.000Z",
    "error": { "code": "cancelled", "message": "Cancelled by the API caller." }
  }
}

The full session object is returned, as in Get a Connect Session.

Error Responses#

CodecodeDescription
403enterprise_requiredConnect links are not enabled for this workspace's plan
403first_party_onlyThe caller is a third-party OAuth app
403insufficient_roleThe OAuth token's person is not an owner or admin of the workspace
404session_not_foundUnknown id or a session of another workspace
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