Skip to main content
POST
/
:projectId
/
api
/
v7
/
users
/
:userId
/
connection
Request Connection
curl --request POST \
  --url https://api.replyke.com/api/v6/:projectId/api/v7/users/:userId/connection \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "<string>"
}
'
{
  "id": "<string>",
  "status": "<string>",
  "createdAt": "<string>"
}
Sends a connection request from the authenticated user to the specified user. An optional message can be included. A notification is sent to the receiving user.

Path Parameters

userId
string
required
The Replyke user ID (UUID) of the user to send a connection request to.

Body Parameters

message
string
Optional message to include with the connection request.

Response

On success, returns HTTP 201 with the created connection record:
id
string
Unique connection record ID (UUID).
status
string
Always "pending" for a new request.
createdAt
string
ISO timestamp of when the request was sent.

Error Responses

{
  "error": "A user cannot send a connection request to themselves.",
  "code": "connection/self-request"
}
{
  "error": "One or both users involved in the connection do not exist.",
  "code": "connection/user-not-found"
}
{
  "error": "A connection request is already pending between these users.",
  "code": "connection/request-pending"
}
{
  "error": "Users are already connected.",
  "code": "connection/already-connected"
}
{
  "error": "Connection request was declined. Only the receiver can initiate a new request.",
  "code": "connection/request-declined"
}

See Also