Create Invite
curl --request POST \
--url https://api.vertracloud.app/v1/workspaces/{id}/invites \
--header 'Content-Type: application/json' \
--data '
{
"kind": {},
"email": "<string>",
"role_id": "<string>",
"expires_in_days": 123,
"max_uses": 123
}
'import requests
url = "https://api.vertracloud.app/v1/workspaces/{id}/invites"
payload = {
"kind": {},
"email": "<string>",
"role_id": "<string>",
"expires_in_days": 123,
"max_uses": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
kind: {},
email: '<string>',
role_id: '<string>',
expires_in_days: 123,
max_uses: 123
})
};
fetch('https://api.vertracloud.app/v1/workspaces/{id}/invites', 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.vertracloud.app/v1/workspaces/{id}/invites",
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([
'kind' => [
],
'email' => '<string>',
'role_id' => '<string>',
'expires_in_days' => 123,
'max_uses' => 123
]),
CURLOPT_HTTPHEADER => [
"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.vertracloud.app/v1/workspaces/{id}/invites"
payload := strings.NewReader("{\n \"kind\": {},\n \"email\": \"<string>\",\n \"role_id\": \"<string>\",\n \"expires_in_days\": 123,\n \"max_uses\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
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.vertracloud.app/v1/workspaces/{id}/invites")
.header("Content-Type", "application/json")
.body("{\n \"kind\": {},\n \"email\": \"<string>\",\n \"role_id\": \"<string>\",\n \"expires_in_days\": 123,\n \"max_uses\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/workspaces/{id}/invites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"kind\": {},\n \"email\": \"<string>\",\n \"role_id\": \"<string>\",\n \"expires_in_days\": 123,\n \"max_uses\": 123\n}"
response = http.request(request)
puts response.read_body{
"response": {
"url": {}
}
}Invites
Create Invite
Invites someone by e-mail or generates a shareable link. Requires members:manage, dashboard session only.
POST
/
v1
/
workspaces
/
{id}
/
invites
Create Invite
curl --request POST \
--url https://api.vertracloud.app/v1/workspaces/{id}/invites \
--header 'Content-Type: application/json' \
--data '
{
"kind": {},
"email": "<string>",
"role_id": "<string>",
"expires_in_days": 123,
"max_uses": 123
}
'import requests
url = "https://api.vertracloud.app/v1/workspaces/{id}/invites"
payload = {
"kind": {},
"email": "<string>",
"role_id": "<string>",
"expires_in_days": 123,
"max_uses": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
kind: {},
email: '<string>',
role_id: '<string>',
expires_in_days: 123,
max_uses: 123
})
};
fetch('https://api.vertracloud.app/v1/workspaces/{id}/invites', 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.vertracloud.app/v1/workspaces/{id}/invites",
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([
'kind' => [
],
'email' => '<string>',
'role_id' => '<string>',
'expires_in_days' => 123,
'max_uses' => 123
]),
CURLOPT_HTTPHEADER => [
"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.vertracloud.app/v1/workspaces/{id}/invites"
payload := strings.NewReader("{\n \"kind\": {},\n \"email\": \"<string>\",\n \"role_id\": \"<string>\",\n \"expires_in_days\": 123,\n \"max_uses\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
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.vertracloud.app/v1/workspaces/{id}/invites")
.header("Content-Type", "application/json")
.body("{\n \"kind\": {},\n \"email\": \"<string>\",\n \"role_id\": \"<string>\",\n \"expires_in_days\": 123,\n \"max_uses\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/workspaces/{id}/invites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"kind\": {},\n \"email\": \"<string>\",\n \"role_id\": \"<string>\",\n \"expires_in_days\": 123,\n \"max_uses\": 123\n}"
response = http.request(request)
puts response.read_body{
"response": {
"url": {}
}
}Dashboard session only — outside the API key scope catalog, so an API key gets
403 API_KEY_SCOPE_DENIED. A leaked key that could create
invites would leave behind access that outlives revoking the key. Invite codes are gone; this is
the only way to bring someone in (besides transfer-ownership, which is for existing members).members:manage.
The token is 32 random bytes, base64url-encoded. The database stores only its SHA-256 hash —
the plaintext token appears exactly once, in this response’s
url field for a link invite,
and is never logged. The invite row is written before the e-mail is sent: if SMTP is down,
you still get a 200 with the invite — losing the invite because the mail provider hiccupped
would be worse than a delayed e-mail.Path
string
required
Workspace ID.
Body — e-mail invite
'email'
required
string
required
Compared case-insensitively and Unicode-normalized (NFKC) on both sides, so
[email protected] and its decomposed-Unicode twin are the same address. Expires in 7 days. Only one pending invite per (workspace, e-mail) — inviting the same address again refreshes the row and resends the e-mail. A pending e-mail invite counts toward the plan’s member cap.string
required
Must belong to this workspace.
number
1–365. Access expiry applied to the member once they accept. Omitted = no expiry.
Body — link invite
'link'
required
string
required
Must belong to this workspace.
number
1–1000. Omitted = unlimited uses.
number
1–365. Applied to every member who joins through this link. Omitted = no expiry. The link itself is a fixed 24 hours, regardless of this field.
Response
APIWorkspaceInviteCreated
Same shape as List Invites, plus:
string | null
The invite URL. Only present for
kind: \"link\", and only in this response — it’s never returned again.Errors
| Status | Code | When |
|---|---|---|
| 403 | API_KEY_SCOPE_DENIED | Called with an API key. |
| 403 | WORKSPACE_PERMISSION_DENIED | Caller lacks members:manage. |
| 403 | PLAN_RESTRICTED_FEATURE | Owner’s plan is frozen. |
| 404 | WORKSPACE_NOT_FOUND | Workspace doesn’t exist or you’re not a member. |
| 404 | WORKSPACE_ROLE_NOT_FOUND | role_id doesn’t belong to this workspace. |
| 409 | WORKSPACE_MEMBER_LIMIT_REACHED | Owner’s plan member cap reached (pending e-mail invites count). |
| 409 | WORKSPACE_ALREADY_MEMBER | (e-mail) That address already belongs to an account that’s a member. |