POST
/
v1
/
colleagues-create
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>"
}'
{
"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 is https://api.wazper.com/v1/colleagues-create

HTTP Method

POST

Headers

HeaderTypeRequiredDescription
X-API-KeyStringYesYour Wazper API Key.
Content-TypeStringYesMust be application/json.
AcceptStringNoRecommended 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)"
}

Request Fields:

FieldTypeRequiredDescription
nameStringYesThe colleague’s full name.
emailStringYesThe colleague’s email address. This will be used for sending invitations.
companyNameStringYesThe colleague’s company name.
toBeInvitedByIdStringYesThe email address of the user who is creating this colleague entry (the inviter).
jobTitleStringNoThe colleague’s job title.
websiteStringNoThe colleague’s company website.
teamIntegerNoTeam identifier or number.
inviteLinkStringNoA custom invitation link. If not provided, your organization’s default invite link will be used.
redirectionLinkStringNoA 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

X-API-Key
string
header
required

Body

application/json

Response

201
application/json

Colleague created successfully.

The response is of type object.