Create Colleague
curl --request POST \
--url https://api.wazper.com/v1/colleagues-create \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com",
"companyName": "<string>",
"toBeInvitedById": "jsmith@example.com",
"jobTitle": "<string>",
"website": "<string>",
"team": 123,
"inviteLink": "<string>",
"redirectionLink": "<string>"
}
'import requests
url = "https://api.wazper.com/v1/colleagues-create"
payload = {
"name": "<string>",
"email": "jsmith@example.com",
"companyName": "<string>",
"toBeInvitedById": "jsmith@example.com",
"jobTitle": "<string>",
"website": "<string>",
"team": 123,
"inviteLink": "<string>",
"redirectionLink": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: 'jsmith@example.com',
companyName: '<string>',
toBeInvitedById: 'jsmith@example.com',
jobTitle: '<string>',
website: '<string>',
team: 123,
inviteLink: '<string>',
redirectionLink: '<string>'
})
};
fetch('https://api.wazper.com/v1/colleagues-create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wazper.com/v1/colleagues-create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => 'jsmith@example.com',
'companyName' => '<string>',
'toBeInvitedById' => 'jsmith@example.com',
'jobTitle' => '<string>',
'website' => '<string>',
'team' => 123,
'inviteLink' => '<string>',
'redirectionLink' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wazper.com/v1/colleagues-create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"toBeInvitedById\": \"jsmith@example.com\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<string>\",\n \"team\": 123,\n \"inviteLink\": \"<string>\",\n \"redirectionLink\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wazper.com/v1/colleagues-create")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"toBeInvitedById\": \"jsmith@example.com\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<string>\",\n \"team\": 123,\n \"inviteLink\": \"<string>\",\n \"redirectionLink\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wazper.com/v1/colleagues-create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"toBeInvitedById\": \"jsmith@example.com\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<string>\",\n \"team\": 123,\n \"inviteLink\": \"<string>\",\n \"redirectionLink\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"jobTitle": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"companyName": "<string>",
"website": "<string>",
"inviteLink": "<string>",
"redirectionLink": "<string>",
"photo": "<string>",
"team": 123,
"wazClientId": "<string>",
"toBeInvitedById": "jsmith@example.com",
"latestAction": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
Endpoints
Create Colleague API
API for creating a new colleague (potential invitee) entry.
POST
/
v1
/
colleagues-create
Create Colleague
curl --request POST \
--url https://api.wazper.com/v1/colleagues-create \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com",
"companyName": "<string>",
"toBeInvitedById": "jsmith@example.com",
"jobTitle": "<string>",
"website": "<string>",
"team": 123,
"inviteLink": "<string>",
"redirectionLink": "<string>"
}
'import requests
url = "https://api.wazper.com/v1/colleagues-create"
payload = {
"name": "<string>",
"email": "jsmith@example.com",
"companyName": "<string>",
"toBeInvitedById": "jsmith@example.com",
"jobTitle": "<string>",
"website": "<string>",
"team": 123,
"inviteLink": "<string>",
"redirectionLink": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: 'jsmith@example.com',
companyName: '<string>',
toBeInvitedById: 'jsmith@example.com',
jobTitle: '<string>',
website: '<string>',
team: 123,
inviteLink: '<string>',
redirectionLink: '<string>'
})
};
fetch('https://api.wazper.com/v1/colleagues-create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wazper.com/v1/colleagues-create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'email' => 'jsmith@example.com',
'companyName' => '<string>',
'toBeInvitedById' => 'jsmith@example.com',
'jobTitle' => '<string>',
'website' => '<string>',
'team' => 123,
'inviteLink' => '<string>',
'redirectionLink' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wazper.com/v1/colleagues-create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"toBeInvitedById\": \"jsmith@example.com\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<string>\",\n \"team\": 123,\n \"inviteLink\": \"<string>\",\n \"redirectionLink\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wazper.com/v1/colleagues-create")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"toBeInvitedById\": \"jsmith@example.com\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<string>\",\n \"team\": 123,\n \"inviteLink\": \"<string>\",\n \"redirectionLink\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wazper.com/v1/colleagues-create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"toBeInvitedById\": \"jsmith@example.com\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<string>\",\n \"team\": 123,\n \"inviteLink\": \"<string>\",\n \"redirectionLink\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"email": "jsmith@example.com",
"jobTitle": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"companyName": "<string>",
"website": "<string>",
"inviteLink": "<string>",
"redirectionLink": "<string>",
"photo": "<string>",
"team": 123,
"wazClientId": "<string>",
"toBeInvitedById": "jsmith@example.com",
"latestAction": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
POST /v1/colleagues-create
This endpoint is used to create a new colleague entry for potential future invitations.
When it is called, it will create a new colleague record in your organization that can later be invited using the Send Invitation API.
Endpoint URL
The endpoint URL ishttps://api.wazper.com/v1/colleagues-create
HTTP Method
POST
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-API-Key | String | Yes | Your Wazper API Key. |
Content-Type | String | Yes | Must be application/json. |
Accept | String | No | Recommended application/json. |
Request Body
The request body must be a JSON object containing colleague information.{
"name": "string",
"email": "string",
"companyName": "string",
"toBeInvitedById": "string",
"jobTitle": "string (optional)",
"website": "string (optional)",
"team": "integer (optional)",
"inviteLink": "string (optional)",
"redirectionLink": "string (optional)"
}
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | The colleague’s full name. |
email | String | Yes | The colleague’s email address. This will be used for sending invitations. |
companyName | String | Yes | The colleague’s company name. |
toBeInvitedById | String | Yes | The email address of the user who is creating this colleague entry (the inviter). |
jobTitle | String | No | The colleague’s job title. |
website | String | No | The colleague’s company website. |
team | Integer | No | Team identifier or number. |
inviteLink | String | No | A custom invitation link. If not provided, your organization’s default invite link will be used. |
redirectionLink | String | No | A custom redirection link for after an invite is accepted. If not provided, the default dashboard link will be used. |
Example Request (cURL)
curl -X POST 'https://api.wazper.com/v1/colleagues-create' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Samuel Prospective",
"email": "samuel.p@example.com",
"companyName": "Innovate Ltd.",
"toBeInvitedById": "current.user@example.com",
"jobTitle": "Marketing Lead",
"website": "https://innovate.com",
"team": 2
}'
Success Response (201 Created)
The response contains the newly created colleague entry with all generated fields.{
"id": "tbi_xyz789",
"name": "Samuel Prospective",
"email": "samuel.p@example.com",
"companyName": "Innovate Ltd.",
"website": "https://innovate.com",
"team": 2,
"wazClientId": "org_abc123xyz",
"toBeInvitedById": "current.user@example.com",
"status": "pending",
"inviteLink": "https://app.wazper.com/invite",
"redirectionLink": "https://app.wazper.com/dashboard",
"jobTitle": "Marketing Lead",
"latestAction": "2023-10-27T10:00:00.000Z",
"photo": null,
"createdAt": "2023-10-27T10:00:00.000Z",
"updatedAt": "2023-10-27T10:00:00.000Z"
}
Error Responses
-
400 Bad Request - Missing Required Fields:
{ "error": "Required fields missing: name, email, companyName, and toBeInvitedById are required" } -
400 Bad Request - API Key Not Linked:
{ "error": "API Key is not linked to a valid organization." } -
401 Unauthorized - API Key Required:
{ "error": "API Key is required" } -
401 Unauthorized - Invalid API Key:
{ "error": "Invalid API Key or key not linked to an organization" } -
403 Forbidden - Waz Disabled:
{ "error": "Waz is currently disabled" } -
409 Conflict - Duplicate Email:
{ "error": "A colleague with this email (samuel.p@example.com) may already exist for this client or inviter." } -
500 Internal Server Error:
{ "error": "Internal server error", "details": "The error message from the server." }
Notes
- This API does not consume credits from your account.
- This API creates a colleague entry that can later be invited using the Send Invitation API.
- The colleague’s initial status will be set to “pending”.
- If you don’t provide custom invite or redirection links, your organization’s default links will be used.
- Each request is logged for tracking and analytics purposes.
Authorizations
Body
application/json
Full name.
Email address.
Company name.
Email of the inviter.
Job title.
Website.
Team ID.
Custom invite link.
Custom redirection link.
Response
Colleague created successfully.
Unique ID of the colleague entry (ToBeInvited table).
Name of the colleague.
Email of the colleague.
Job title.
Current status (e.g., pending, invited, joined).
Creation timestamp.
Company name.
Website URL.
Invite link.
Redirection link.
Photo URL.
Team identifier.
Wazper Client ID.
Email of the user who created this entry.
Timestamp of the last action.
Timestamp of last update.