API EndpointsconnectionsRemove Connection by ID

Remove Connection by Connection ID

Endpoint

URL: api.replyke.com/api/v6/:projectId/connections/:connectionId

Method: DELETE

Authentication Required: Yes


Description

Remove a specific connection by its ID. This can be used to withdraw a pending request (if you’re the requester) or disconnect an established connection (if you’re either party).


Request

Path Parameters

ParameterTypeRequiredDescription
connectionIdstringYesID of the connection to remove

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.

Body Parameters

None

Example Request

DELETE api.replyke.com/api/v6/your-project-id/connections/connection-uuid-123
Authorization: Bearer <ACCESS_TOKEN>

Response

Success Responses

Withdraw Request (200 OK)

When removing a pending request you sent:

{
  "message": "Connection request withdrawn successfully."
}

Disconnect (200 OK)

When removing an established connection:

{
  "message": "Connection removed successfully."
}

Error Responses

Invalid Connection ID (400 Bad Request)

{
  "error": "Invalid connectionId",
  "code": "connection/invalid-connection-id"
}

Unauthorized (403 Forbidden)

{
  "error": "Unauthorized (wrong user for action)",
  "code": "connection/unauthorized"
}

Connection Not Found (404 Not Found)

{
  "error": "Connection not found",
  "code": "connection/not-found"
}

Server Error (500 Internal Server Error)

{
  "error": "Internal server error",
  "code": "connection/server-error"
}

Notes

  • Requires authentication
  • Withdraw: Only the requester can withdraw pending requests they sent
  • Disconnect: Either party can remove established connections
  • Deletes the connection record completely (allows fresh requests later)
  • Use this endpoint when you have the specific connection ID
  • Alternative: Use DELETE api.replyke.com/api/v6/:projectId/users/:userId/connection when you know the user ID
  • Rate limiting: 50 requests per 5 minutes