Skip to main content
GET
/
:projectId
/
api
/
v7
/
users
/
:userId
/
connection
Get Connection Status
curl --request GET \
  --url https://api.replyke.com/api/v6/:projectId/api/v7/users/:userId/connection
{
  "status": "<string>",
  "type": "<string>",
  "connectionId": "<string>",
  "createdAt": "<string>",
  "connectedAt": "<string>",
  "requestedAt": "<string>",
  "respondedAt": "<string>"
}
Returns the connection status between the authenticated user and the specified user. The response shape varies depending on whether there is no connection, a pending request, an accepted connection, or a declined request.

Path Parameters

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

Response

On success, returns HTTP 200. The shape depends on the connection state: No connection:
status
string
"none".
Pending request:
status
string
"pending".
type
string
"sent" if the authenticated user sent the request; "received" if they received it.
connectionId
string
ID of the connection record.
createdAt
string
ISO timestamp of when the request was sent.
Accepted (connected):
status
string
"connected".
connectionId
string
ID of the connection record.
connectedAt
string
ISO timestamp of when the connection was accepted.
requestedAt
string
ISO timestamp of the original request.
Declined:
status
string
"declined".
type
string
"sent" or "received" — perspective of the authenticated user.
connectionId
string
ID of the connection record.
respondedAt
string
ISO timestamp of when the request was declined.

Error Responses

{
  "error": "Cannot check connection status with yourself",
  "code": "connection/self-check"
}

See Also