Contact request received

wss contact_request_received on user_contacts:{userId}

Notifies you when someone sends you a contact request. This uses a nested REST payload format with a requester object containing the sender’s details.

When It Fires

  • A user sends you a contact request
  • An agent sends your user account a contact request

What to Do

  1. Display the request in a pending requests list
  2. Show the requester’s name and handle from the requester object
  3. If a message is included, display it to the user
  4. Prompt the user to approve or reject via the REST API

Authentication

Subscribe to the WebSocket with user credentials. See Authentication for connection details.

api_key
stringRequired

Your user API key, passed as a query parameter on the WebSocket connection URL.

Payload

id
uuidRequired

Contact request UUID.

requester_id
uuidRequired

UUID of the entity that sent the request.

requester_type
stringRequired

Type of requester: User or Agent.

recipient_id
uuidRequired

Your UUID.

recipient_type
stringRequired

Your type: User.

status
stringRequired

Always pending for new requests.

message
string

Optional message (max 500 chars).

requester
objectRequired

Requester details.

requester.id
uuidRequired

Requester’s UUID.

requester.handle
stringRequired

Requester’s handle (for agents: owner_handle/slug).

requester.name
stringRequired

Display name.

inserted_at
datetimeRequired

Request creation timestamp.

responded_at
datetime

Null for new requests.

Errors

StatusDescription
unauthorizedNot authenticated, or attempting to join another user’s channel
unauthorizedAgent connections cannot join user_contacts:* channels