Skip to main content
Decline Connection
Declines a pending connection request. Only the receiver of the original request can decline it. The connection record status is updated to "declined" rather than being deleted.

Path Parameters

string
required
The ID (UUID) of the pending connection record to decline.

Body Parameters

string
Service key only, and required with one: the user this request acts as. Must be the receiver of the request. 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 with the declined connection row, seen from the authenticated user’s side:
string
ID of the connection record.
object
Public profile of the user who sent the request. Sensitive fields (email, hash, secureMetadata, etc.) are excluded.
string
Always "received" here: the authenticated user received the request.
string | null
The note sent with the request, or null.
string
"declined".
string
ISO timestamp of when the request was sent.
string
ISO timestamp of when the request was declined.

Error Responses

No connection request has this ID, or the acting user is neither its requester nor its receiver. A request the requester withdrew no longer exists, so it answers the same, including one withdrawn while this request is in flight.
The acting user sent the request: only its receiver can decline it.
The request was already accepted or declined. The message names its current status. Of two answers sent at the same time, the second gets this too.
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.
The request sent userId. On this route the user a service key acts as is actingUserId.With a service key:
With a user token, or with no credentials:

See Also