Send Invite

Send Invite

POST https://api.ocamba.com/v2/ocamba/invites
Sends an Ocamba Platform Invite

Notice
Sends an invitation to a user to join the specified workspace.
The inviter provides the recipient’s email address and desired role.
If the recipient does not yet exist on the platform, an invite record is created and an invitation email is sent with a one-time token.
If the recipient already exists, the invite is linked to their existing account.

The invitation remains in pending state until the recipient accepts or declines it, or until it expires.

To prevent abuse and accidental spamming, the platform enforces the following constraints:
- Send Limits: A workspace may send only a limited number of invitations to the same email without a positive response, after which it will not be in ‘resendable’ state.
- Cooldown Period: During this cooldown window, the same workspace cannot resend another invite to that email.

Request schema

body

Response schemas

curl -X POST \
 "https://api.ocamba.com/v2/ocamba/invites" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "invitee": "[email protected]"
}'
const url = 'https://api.ocamba.com/v2/ocamba/invites';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "invitee": "[email protected]"
    }
  )
};

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");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "invitee" => "[email protected]"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/v2/ocamba/invites" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "invitee": "[email protected]",
  "name": "John Doe",
  "access": {
    "1010": "1087"
  },
  "message": "Hello, we wish you a warm welcome to the Ocamba platform!"
}'
const url = 'https://api.ocamba.com/v2/ocamba/invites';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "invitee": "[email protected]",
      "name": "John Doe",
      "access": {
        "1010": "1087"
      },
      "message": "Hello, we wish you a warm welcome to the Ocamba platform!"
    }
  )
};

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");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "invitee" => "[email protected]",
    "name" => "John Doe",
    "access" => [
      "1010" => "1087"
    ],
    "message" => "Hello, we wish you a warm welcome to the Ocamba platform!"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

200 OK

{
  "id": "1410",
  "company_id": "6197120",
  "inviter_id": "1000223",
  "access": {
    "1010": "1058"
  },
  "invitee": "[email protected]",
  "type": "email",
  "name": "john.doe",
  "status": "pending",
  "send_counter": 1,
  "invite_time": "2025-12-10 13:05:34",
  "create_time": "2025-12-10 13:05:34",
  "update_time": "2025-12-10 13:05:34"
}

400 Bad Request

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

429 Too Many Requests

{
  "code": 429,
  "title": "Too Many Requests.",
  "message": "Too many invite attempts. Please wait before sending another invite.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}

500 Internal Server Error

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