Invite Team
curl --request POST \
--url https://app.plugchoice.com/api/v3/sites/{site}/teams/invite \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"transfer_ownership": true,
"data_access": true,
"data_access_expires_at": "<string>",
"can_access_all_assets": true,
"accessible_assets": [
{
"accessible_assets[].asset_type": "<string>",
"accessible_assets[].asset_id": 123
}
]
}
'import requests
url = "https://app.plugchoice.com/api/v3/sites/{site}/teams/invite"
payload = {
"email": "<string>",
"transfer_ownership": True,
"data_access": True,
"data_access_expires_at": "<string>",
"can_access_all_assets": True,
"accessible_assets": [
{
"accessible_assets[].asset_type": "<string>",
"accessible_assets[].asset_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({
email: '<string>',
transfer_ownership: true,
data_access: true,
data_access_expires_at: '<string>',
can_access_all_assets: true,
accessible_assets: [
{
'accessible_assets[].asset_type': '<string>',
'accessible_assets[].asset_id': 123
}
]
})
};
fetch('https://app.plugchoice.com/api/v3/sites/{site}/teams/invite', 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.plugchoice.com/api/v3/sites/{site}/teams/invite",
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' => '<string>',
'transfer_ownership' => true,
'data_access' => true,
'data_access_expires_at' => '<string>',
'can_access_all_assets' => true,
'accessible_assets' => [
[
'accessible_assets[].asset_type' => '<string>',
'accessible_assets[].asset_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.plugchoice.com/api/v3/sites/{site}/teams/invite"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"transfer_ownership\": true,\n \"data_access\": true,\n \"data_access_expires_at\": \"<string>\",\n \"can_access_all_assets\": true,\n \"accessible_assets\": [\n {\n \"accessible_assets[].asset_type\": \"<string>\",\n \"accessible_assets[].asset_id\": 123\n }\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.plugchoice.com/api/v3/sites/{site}/teams/invite")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"transfer_ownership\": true,\n \"data_access\": true,\n \"data_access_expires_at\": \"<string>\",\n \"can_access_all_assets\": true,\n \"accessible_assets\": [\n {\n \"accessible_assets[].asset_type\": \"<string>\",\n \"accessible_assets[].asset_id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.plugchoice.com/api/v3/sites/{site}/teams/invite")
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\": \"<string>\",\n \"transfer_ownership\": true,\n \"data_access\": true,\n \"data_access_expires_at\": \"<string>\",\n \"can_access_all_assets\": true,\n \"accessible_assets\": [\n {\n \"accessible_assets[].asset_type\": \"<string>\",\n \"accessible_assets[].asset_id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"invite": {
"id": 123,
"site_id": 123,
"email": "<string>",
"expires_at": "<string>",
"transfer_ownership": true,
"data_access": true,
"data_access_expires_at": "<string>",
"can_access_all_assets": true,
"accessible_assets": [
{}
],
"created_at": "<string>",
"updated_at": "<string>"
},
"invite_token": "<string>",
"invite_links": {
"web": "<string>",
"deep_link": "<string>"
}
}Invitations
Invite Team
POST
/
v3
/
sites
/
{site}
/
teams
/
invite
Invite Team
curl --request POST \
--url https://app.plugchoice.com/api/v3/sites/{site}/teams/invite \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"transfer_ownership": true,
"data_access": true,
"data_access_expires_at": "<string>",
"can_access_all_assets": true,
"accessible_assets": [
{
"accessible_assets[].asset_type": "<string>",
"accessible_assets[].asset_id": 123
}
]
}
'import requests
url = "https://app.plugchoice.com/api/v3/sites/{site}/teams/invite"
payload = {
"email": "<string>",
"transfer_ownership": True,
"data_access": True,
"data_access_expires_at": "<string>",
"can_access_all_assets": True,
"accessible_assets": [
{
"accessible_assets[].asset_type": "<string>",
"accessible_assets[].asset_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({
email: '<string>',
transfer_ownership: true,
data_access: true,
data_access_expires_at: '<string>',
can_access_all_assets: true,
accessible_assets: [
{
'accessible_assets[].asset_type': '<string>',
'accessible_assets[].asset_id': 123
}
]
})
};
fetch('https://app.plugchoice.com/api/v3/sites/{site}/teams/invite', 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.plugchoice.com/api/v3/sites/{site}/teams/invite",
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' => '<string>',
'transfer_ownership' => true,
'data_access' => true,
'data_access_expires_at' => '<string>',
'can_access_all_assets' => true,
'accessible_assets' => [
[
'accessible_assets[].asset_type' => '<string>',
'accessible_assets[].asset_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.plugchoice.com/api/v3/sites/{site}/teams/invite"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"transfer_ownership\": true,\n \"data_access\": true,\n \"data_access_expires_at\": \"<string>\",\n \"can_access_all_assets\": true,\n \"accessible_assets\": [\n {\n \"accessible_assets[].asset_type\": \"<string>\",\n \"accessible_assets[].asset_id\": 123\n }\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.plugchoice.com/api/v3/sites/{site}/teams/invite")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"transfer_ownership\": true,\n \"data_access\": true,\n \"data_access_expires_at\": \"<string>\",\n \"can_access_all_assets\": true,\n \"accessible_assets\": [\n {\n \"accessible_assets[].asset_type\": \"<string>\",\n \"accessible_assets[].asset_id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.plugchoice.com/api/v3/sites/{site}/teams/invite")
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\": \"<string>\",\n \"transfer_ownership\": true,\n \"data_access\": true,\n \"data_access_expires_at\": \"<string>\",\n \"can_access_all_assets\": true,\n \"accessible_assets\": [\n {\n \"accessible_assets[].asset_type\": \"<string>\",\n \"accessible_assets[].asset_id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"invite": {
"id": 123,
"site_id": 123,
"email": "<string>",
"expires_at": "<string>",
"transfer_ownership": true,
"data_access": true,
"data_access_expires_at": "<string>",
"can_access_all_assets": true,
"accessible_assets": [
{}
],
"created_at": "<string>",
"updated_at": "<string>"
},
"invite_token": "<string>",
"invite_links": {
"web": "<string>",
"deep_link": "<string>"
}
}Invites a team to the specified location by email. The invited user will receive an email with a link to accept the invitation. The authenticated user must have a verified email address. Rate limited to 5 requests per minute.
The UUID of the location.
The email address of the user to invite. Maximum 255 characters.
Whether to transfer location ownership to the invited team upon acceptance.
Whether to grant sensitive data access to the invited team.
ISO 8601 date for when the data access expires. Must be a future date.
Whether the invited team can access all assets on the location.
Response
A confirmation message indicating the invite was created successfully.
The created invitation object.
Show invite
Show invite
The numeric ID of the invitation.
The ID of the location.
The email address the invitation was sent to.
ISO 8601 timestamp of when the invitation expires.
Whether ownership will be transferred upon acceptance.
Whether data access will be granted upon acceptance.
ISO 8601 timestamp of when data access expires. May be
null.Whether the team will have access to all assets.
The list of specific accessible assets, if limited.
ISO 8601 timestamp of when the invitation was created.
ISO 8601 timestamp of when the invitation was last updated.
The invitation token used for acceptance.
⌘I