Decline Connection Request
Endpoint
URL: api.replyke.com/api/v6/:projectId/connections/:connectionId/decline
Method: PUT
Authentication Required: Yes
Description
Decline a specific pending connection request. Only the receiver of the connection request can decline it.
Request
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
connectionId | string | Yes | ID of the connection to decline |
Headers
Header | Type | Required | Description |
---|---|---|---|
Authorization | string | Yes | Bearer token for authentication. |
Body Parameters
None
Example Request
PUT api.replyke.com/api/v6/your-project-id/connections/connection-uuid-123/decline
Authorization: Bearer <ACCESS_TOKEN>
Response
Success Response (200 OK)
{
"id": "connection-uuid",
"status": "declined",
"respondedAt": "2024-01-01T12:05:00.000Z"
}
Error Responses
Invalid Connection ID (400 Bad Request)
{
"error": "Invalid connectionId",
"code": "connection/invalid-connection-id"
}
Unauthorized (403 Forbidden)
{
"error": "Only receiver can decline requests",
"code": "connection/unauthorized"
}
Connection Not Found (404 Not Found)
{
"error": "Pending connection not found",
"code": "connection/not-found"
}
Server Error (500 Internal Server Error)
{
"error": "Internal server error",
"code": "connection/server-error"
}
Notes
- Requires authentication
- Only the receiver of the connection request can decline it
- Updates connection status from “pending” to “declined”
- Sets the respondedAt timestamp
- Prevents the original requester from sending new requests (only receiver can re-initiate)
- No notification is sent to the requester
- Rate limiting: 50 requests per 5 minutes