Create User
curl --request POST \
--url https://api.pagecall.com/v1/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "external_user_102932",
"name": "scotty",
"profile_url": "https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y",
"default_member_type": "guest"
}
'import requests
url = "https://api.pagecall.com/v1/users"
payload = {
"user_id": "external_user_102932",
"name": "scotty",
"profile_url": "https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y",
"default_member_type": "guest"
}
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_id: 'external_user_102932',
name: 'scotty',
profile_url: 'https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y',
default_member_type: 'guest'
})
};
fetch('https://api.pagecall.com/v1/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://api.pagecall.com/v1/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_id' => 'external_user_102932',
'name' => 'scotty',
'profile_url' => 'https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y',
'default_member_type' => 'guest'
]),
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://api.pagecall.com/v1/users"
payload := strings.NewReader("{\n \"user_id\": \"external_user_102932\",\n \"name\": \"scotty\",\n \"profile_url\": \"https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y\",\n \"default_member_type\": \"guest\"\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://api.pagecall.com/v1/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"external_user_102932\",\n \"name\": \"scotty\",\n \"profile_url\": \"https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y\",\n \"default_member_type\": \"guest\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pagecall.com/v1/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_id\": \"external_user_102932\",\n \"name\": \"scotty\",\n \"profile_url\": \"https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y\",\n \"default_member_type\": \"guest\"\n}"
response = http.request(request)
puts response.read_body{
"user": {
"user_id": "external_user_102932",
"name": "scotty",
"profile_url": "https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y",
"default_member_type": "guest",
"access_token": "TfowtRYBs0E_trzoTaCmAXKzB1JxDDhi",
"created_at": "2023-01-01T01:00:00.000Z",
"updated_at": "2023-01-01T01:00:00.000Z"
}
}User Endpoints
Create User
Create user within workspace
POST
/
users
Create User
curl --request POST \
--url https://api.pagecall.com/v1/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "external_user_102932",
"name": "scotty",
"profile_url": "https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y",
"default_member_type": "guest"
}
'import requests
url = "https://api.pagecall.com/v1/users"
payload = {
"user_id": "external_user_102932",
"name": "scotty",
"profile_url": "https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y",
"default_member_type": "guest"
}
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_id: 'external_user_102932',
name: 'scotty',
profile_url: 'https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y',
default_member_type: 'guest'
})
};
fetch('https://api.pagecall.com/v1/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://api.pagecall.com/v1/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_id' => 'external_user_102932',
'name' => 'scotty',
'profile_url' => 'https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y',
'default_member_type' => 'guest'
]),
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://api.pagecall.com/v1/users"
payload := strings.NewReader("{\n \"user_id\": \"external_user_102932\",\n \"name\": \"scotty\",\n \"profile_url\": \"https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y\",\n \"default_member_type\": \"guest\"\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://api.pagecall.com/v1/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"external_user_102932\",\n \"name\": \"scotty\",\n \"profile_url\": \"https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y\",\n \"default_member_type\": \"guest\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pagecall.com/v1/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_id\": \"external_user_102932\",\n \"name\": \"scotty\",\n \"profile_url\": \"https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y\",\n \"default_member_type\": \"guest\"\n}"
response = http.request(request)
puts response.read_body{
"user": {
"user_id": "external_user_102932",
"name": "scotty",
"profile_url": "https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y",
"default_member_type": "guest",
"access_token": "TfowtRYBs0E_trzoTaCmAXKzB1JxDDhi",
"created_at": "2023-01-01T01:00:00.000Z",
"updated_at": "2023-01-01T01:00:00.000Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
ID of the user. Will override exisiting user if the specified ID already being used. Please note that id field is only used internally.
Example:
"external_user_102932"
Name of the user.
Example:
"scotty"
Profile image of the user
Example:
"https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y"
Default type of member when invited to room
Available options:
guest, host, monitor Example:
"guest"
Response
Successful operation
Show child attributes
Show child attributes
⌘I

