Delete an org-level OAuth client
Deletes one org-level client by id (a space client id is a 404 here), with every connection it minted in any space of the org. Refused with 409 connection_pinned while an admin pin or an org default (enforced or soft) names one of them. Requires org-integrations:configure, which is never granted to an API key.
DELETE
/api/org-integrations/{scope}/{name}/oauth-clients/{clientId}better-auth.session_token<token>
Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Path Parameters
scope*string
Package scope (e.g. @myorg)
Match
^@[a-z0-9][a-z0-9-]*$name*string
Package name
clientId*string
Custom OAuth client id (integration_oauth_clients.id, UUID).
Format
uuidHeader Parameters
X-Org-Id?string
Organization ID. Required for cookie auth. Not needed for API key auth (org resolved from key).
Format
uuidcurl -X DELETE "https://your-instance/api/org-integrations/string/string/oauth-clients/497f6eca-6276-4993-bfeb-53cbbbba6f08"Empty
{
"type": "https://docs.appstrate.dev/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Insufficient permissions",
"code": "forbidden",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Resource not found",
"code": "not_found",
"request_id": "req_abc123"
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"param": "string",
"retry_after": 0,
"errors": [
{
"field": "string",
"code": "string",
"message": "string",
"title": "string",
"candidate_connections": [
{
"id": "string",
"label": "string",
"account_id": "string",
"owned_by_actor": true,
"needs_reconnection": true
}
],
"connection_id": "string",
"missing_scopes": [
"string"
],
"owned_by_actor": true,
"required_scopes": [
"string"
],
"auth_key": "string",
"required_auth_key": "string",
"available_auth_keys": [
"string"
],
"connect_url": "http://example.com",
"expiresAt": "2019-08-24T14:15:22Z",
"packageId": "string"
}
]
}