Skip to main content
Remove Connection
Removes the connection relationship between the authenticated user and the specified user. The behavior depends on the current connection state:
  • Pending (sent by current user) — withdraws the request (record is deleted).
  • Pending (sent by other user) — declines the request (status updated to "declined").
  • Accepted — disconnects both users (record is deleted).
Requires the connections bundle. A project without the connections bundle returns 403 database/tables-not-available. See Bundles.

Path Parameters

string
required
The Sublay user ID (UUID) of the other user.

Query Parameters

string
Service key only, and required with one: the user this request acts as, who removes the connection. A user token always acts as its own user and must not send it (400 connection/acting-user-not-allowed).

Response

On success, returns HTTP 200. When withdrawn or disconnected:
string
Human-readable description of the action taken.
string
"withdraw" or "disconnect".
When declined:
string
Connection record ID.
string
"declined".
string
ISO timestamp of when the request was declined.

Error Responses

A service key sent no actingUserId.
A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.

See Also