Invite new teammate to the workspace.
curl --request POST \
--url https://app.timelines.ai/integrations/api/workspace/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "newuser@example.com",
"first_name": "John",
"last_name": "Doe",
"team_title": "Sales",
"role": "agent"
}
'import requests
url = "https://app.timelines.ai/integrations/api/workspace/invitations"
payload = {
"email": "newuser@example.com",
"first_name": "John",
"last_name": "Doe",
"team_title": "Sales",
"role": "agent"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'newuser@example.com',
first_name: 'John',
last_name: 'Doe',
team_title: 'Sales',
role: 'agent'
})
};
fetch('https://app.timelines.ai/integrations/api/workspace/invitations', 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://app.timelines.ai/integrations/api/workspace/invitations",
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([
'email' => 'newuser@example.com',
'first_name' => 'John',
'last_name' => 'Doe',
'team_title' => 'Sales',
'role' => 'agent'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.timelines.ai/integrations/api/workspace/invitations"
payload := strings.NewReader("{\n \"email\": \"newuser@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"team_title\": \"Sales\",\n \"role\": \"agent\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.timelines.ai/integrations/api/workspace/invitations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"newuser@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"team_title\": \"Sales\",\n \"role\": \"agent\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.timelines.ai/integrations/api/workspace/invitations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"newuser@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"team_title\": \"Sales\",\n \"role\": \"agent\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"user_id": 42,
"display_name": "John Doe",
"email": "admin@timelines.ai",
"role": "owner",
"team": "Default",
"status": "Active",
"created_at": "2026-02-22 00:00:00 +0100",
"invitation_status": "Expired",
"whatsapp_accounts": [
{
"id": "972501111111@s.whatsapp.net",
"phone": "+972540000001",
"connected_on": "2023-06-18 15:19:23 +0100",
"status": "Active",
"owner_name": "John Doe",
"owner_email": "john.doe@acme.com",
"account_name": "John Doe"
}
]
}
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}Teammates
Invite Teammate
Send an invitation to a new teammate by email.
POST
/
workspace
/
invitations
Invite new teammate to the workspace.
curl --request POST \
--url https://app.timelines.ai/integrations/api/workspace/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "newuser@example.com",
"first_name": "John",
"last_name": "Doe",
"team_title": "Sales",
"role": "agent"
}
'import requests
url = "https://app.timelines.ai/integrations/api/workspace/invitations"
payload = {
"email": "newuser@example.com",
"first_name": "John",
"last_name": "Doe",
"team_title": "Sales",
"role": "agent"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'newuser@example.com',
first_name: 'John',
last_name: 'Doe',
team_title: 'Sales',
role: 'agent'
})
};
fetch('https://app.timelines.ai/integrations/api/workspace/invitations', 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://app.timelines.ai/integrations/api/workspace/invitations",
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([
'email' => 'newuser@example.com',
'first_name' => 'John',
'last_name' => 'Doe',
'team_title' => 'Sales',
'role' => 'agent'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.timelines.ai/integrations/api/workspace/invitations"
payload := strings.NewReader("{\n \"email\": \"newuser@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"team_title\": \"Sales\",\n \"role\": \"agent\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.timelines.ai/integrations/api/workspace/invitations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"newuser@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"team_title\": \"Sales\",\n \"role\": \"agent\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.timelines.ai/integrations/api/workspace/invitations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"newuser@example.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"team_title\": \"Sales\",\n \"role\": \"agent\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"user_id": 42,
"display_name": "John Doe",
"email": "admin@timelines.ai",
"role": "owner",
"team": "Default",
"status": "Active",
"created_at": "2026-02-22 00:00:00 +0100",
"invitation_status": "Expired",
"whatsapp_accounts": [
{
"id": "972501111111@s.whatsapp.net",
"phone": "+972540000001",
"connected_on": "2023-06-18 15:19:23 +0100",
"status": "Active",
"owner_name": "John Doe",
"owner_email": "john.doe@acme.com",
"account_name": "John Doe"
}
]
}
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}{
"message": "<string>",
"status": "error",
"error_code": "validation_error",
"errors": [
{
"fields": [
"url"
],
"msg": "must be a valid http(s) URL"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
A JSON object describing the invitation.
Email address of the user to invite
Maximum string length:
254Example:
"newuser@example.com"
First name for the invited user
Maximum string length:
150Example:
"John"
Last name for the invited user
Maximum string length:
150Example:
"Doe"
Title of the team to assign the invited user to, default "Default team"
Example:
"Sales"
Role to assign. One of: collaborator, teammate, admin, agent, team_supervisor. Case-insensitive.
Available options:
admin, team_supervisor, teammate, agent, collaborator Example:
"agent"
⌘I

