Users
Invite New User
Create a new user invitation for a specific team group.
POST
/
api
/
v3
/
users
Invite New User
curl --request POST \
--url https://app.staging.sendo.so/api/v3/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"role": "<string>",
"team_group_id": 123
}
}
'import requests
url = "https://app.staging.sendo.so/api/v3/users"
payload = { "user": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"role": "<string>",
"team_group_id": 123
} }
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({
user: {
first_name: '<string>',
last_name: '<string>',
email: '<string>',
role: '<string>',
team_group_id: 123
}
})
};
fetch('https://app.staging.sendo.so/api/v3/users', 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.staging.sendo.so/api/v3/users",
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([
'user' => [
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'role' => '<string>',
'team_group_id' => 123
]
]),
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.staging.sendo.so/api/v3/users"
payload := strings.NewReader("{\n \"user\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"role\": \"<string>\",\n \"team_group_id\": 123\n }\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.staging.sendo.so/api/v3/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"role\": \"<string>\",\n \"team_group_id\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.staging.sendo.so/api/v3/users")
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 \"user\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"role\": \"<string>\",\n \"team_group_id\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Invitation sent successfully",
"receiver_email": "devleopers@sendoso.com",
"team_group_id": 1234,
"user_role": "manager",
"invitation_status": "pending",
"expires_at": "2023-11-11T12:18:55.000-08:00"
}
{
"success": false,
"message": "Please enter a valid team group"
}
{
"success": false,
"message": "Role can be one of these: manager,regular"
}
Body
object
required
Hide user
Hide user
string
required
The new user’s first name
string
required
The new user’s last name
string
required
The new user’s email address
string
required
The new user’s role. Valid options are
regular and manager.integer
required
The ID of the team you’d like to invite the user to. To obtain the ID of the current team’s in Sendoso, use Retrieve All Teams.
Response
boolean
required
Wheter or not the invitation was successfully created
string
required
The response message
string
required
The email address that the invitation was addressed to
integer
required
The team group id that the user was invited to
string
required
The role that the new user was invited with
string
required
The invitation’s status. Valid values are
pending, accepted, or expired.string
required
The date & time when the invitation will expire (in
ISO 8601 format).{
"success": true,
"message": "Invitation sent successfully",
"receiver_email": "devleopers@sendoso.com",
"team_group_id": 1234,
"user_role": "manager",
"invitation_status": "pending",
"expires_at": "2023-11-11T12:18:55.000-08:00"
}
{
"success": false,
"message": "Please enter a valid team group"
}
{
"success": false,
"message": "Role can be one of these: manager,regular"
}
⌘I
Invite New User
curl --request POST \
--url https://app.staging.sendo.so/api/v3/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"role": "<string>",
"team_group_id": 123
}
}
'import requests
url = "https://app.staging.sendo.so/api/v3/users"
payload = { "user": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"role": "<string>",
"team_group_id": 123
} }
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({
user: {
first_name: '<string>',
last_name: '<string>',
email: '<string>',
role: '<string>',
team_group_id: 123
}
})
};
fetch('https://app.staging.sendo.so/api/v3/users', 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.staging.sendo.so/api/v3/users",
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([
'user' => [
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'role' => '<string>',
'team_group_id' => 123
]
]),
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.staging.sendo.so/api/v3/users"
payload := strings.NewReader("{\n \"user\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"role\": \"<string>\",\n \"team_group_id\": 123\n }\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.staging.sendo.so/api/v3/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"role\": \"<string>\",\n \"team_group_id\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.staging.sendo.so/api/v3/users")
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 \"user\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"role\": \"<string>\",\n \"team_group_id\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Invitation sent successfully",
"receiver_email": "devleopers@sendoso.com",
"team_group_id": 1234,
"user_role": "manager",
"invitation_status": "pending",
"expires_at": "2023-11-11T12:18:55.000-08:00"
}
{
"success": false,
"message": "Please enter a valid team group"
}
{
"success": false,
"message": "Role can be one of these: manager,regular"
}