Create Invite
Create Invite
POST
https://api.ocamba.com/v2/ocamba/invites
Creates a new Invite objectRequest schema
bodycurl -X POST \
"https://api.ocamba.com/v2/ocamba/invites" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"invitee": "[email protected]",
"message": "only for testing"
}'
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]",
"message": "only for testing"
}
)
};
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]",
"message" => "only for testing"
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Responses
201 Created
{
"id": "295",
"company_id": "6345624",
"inviter_id": "1000077",
"access": {
"1010": "1107"
},
"invitee": "[email protected]",
"name": "john.doe",
"message": "only for testing",
"status": "pending"
}
Responses