Reject Invite

Reject Invite

POST https://api.ocamba.com/v2/ocamba/invites/{id}/reject
Reject an invite to a workspace with specified ID

Tip
If you don’t know the invite id, list the invites to find it.
Note
This endpoint can only be executed by the user who is the subject of the invite.
Authentication must be performed using the user’s Ocamba Token.
Workspace-level tokens cannot be used, as this action occurs outside the workspace context.

Path parameters

parameters

Response schemas

204
No Content
curl -X POST \
 "https://api.ocamba.com/v2/ocamba/invites/{id}/reject" \
  -H "Authorization: Bearer {TOKEN}"
const url = 'https://api.ocamba.com/v2/ocamba/invites/{id}/reject';
const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer {TOKEN}`
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v2/ocamba/invites/{id}/reject");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

204 No Content

400 Bad Request

{
  "code": 400,
  "title": "Bad request.",
  "message": "The request body is not valid.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}

403 Forbidden

{
  "code": 403,
  "title": "Forbidden.",
  "message": "You are not allowed to reject this invite.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}

500 Internal Server Error

{
  "code": 500,
  "title": "Internal server error.",
  "message": "Internal server error."
}
Responses