curl --request POST \
--url https://app.base44.com/api/workspace/invitations/invite \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "dana@acme.com",
"role": "editor",
"group_id": "68b4e1d2c9a7f3001e2d4b61"
}
'import requests
url = "https://app.base44.com/api/workspace/invitations/invite"
payload = {
"email": "dana@acme.com",
"role": "editor",
"group_id": "68b4e1d2c9a7f3001e2d4b61"
}
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: 'dana@acme.com', role: 'editor', group_id: '68b4e1d2c9a7f3001e2d4b61'})
};
fetch('https://app.base44.com/api/workspace/invitations/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.base44.com/api/workspace/invitations/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' => 'dana@acme.com',
'role' => 'editor',
'group_id' => '68b4e1d2c9a7f3001e2d4b61'
]),
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.base44.com/api/workspace/invitations/invite"
payload := strings.NewReader("{\n \"email\": \"dana@acme.com\",\n \"role\": \"editor\",\n \"group_id\": \"68b4e1d2c9a7f3001e2d4b61\"\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.base44.com/api/workspace/invitations/invite")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"dana@acme.com\",\n \"role\": \"editor\",\n \"group_id\": \"68b4e1d2c9a7f3001e2d4b61\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/invitations/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\": \"dana@acme.com\",\n \"role\": \"editor\",\n \"group_id\": \"68b4e1d2c9a7f3001e2d4b61\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Invite workspace member
Invites someone to a workspace by email. The invitee gets an email with a link to join, and a notification in Base44 if they already have an account. The link works for 60 days.
role is the role they get when they accept. Set group_id to add them to a custom group when they accept.
You can’t invite an existing member, or someone whose invitation is still pending. Send a pending invitation again with Resend workspace invitation. Inviting someone whose invitation expired sends a new one.
A 200 means the invitation was saved. It doesn’t confirm the email was sent: if sending fails, the invitation still stands and you can send it again with Resend workspace invitation. The response body is null.
Inviting is limited to 6 requests per minute, shared by Invite workspace member, Invite workspace members in bulk, Resend workspace invitation, and Resend workspace invitations in bulk. A signed-in session has its own limit, and every personal access token for the workspace shares one. Some workspaces have a different limit.
curl --request POST \
--url https://app.base44.com/api/workspace/invitations/invite \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "dana@acme.com",
"role": "editor",
"group_id": "68b4e1d2c9a7f3001e2d4b61"
}
'import requests
url = "https://app.base44.com/api/workspace/invitations/invite"
payload = {
"email": "dana@acme.com",
"role": "editor",
"group_id": "68b4e1d2c9a7f3001e2d4b61"
}
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: 'dana@acme.com', role: 'editor', group_id: '68b4e1d2c9a7f3001e2d4b61'})
};
fetch('https://app.base44.com/api/workspace/invitations/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.base44.com/api/workspace/invitations/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' => 'dana@acme.com',
'role' => 'editor',
'group_id' => '68b4e1d2c9a7f3001e2d4b61'
]),
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.base44.com/api/workspace/invitations/invite"
payload := strings.NewReader("{\n \"email\": \"dana@acme.com\",\n \"role\": \"editor\",\n \"group_id\": \"68b4e1d2c9a7f3001e2d4b61\"\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.base44.com/api/workspace/invitations/invite")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"dana@acme.com\",\n \"role\": \"editor\",\n \"group_id\": \"68b4e1d2c9a7f3001e2d4b61\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/invitations/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\": \"dana@acme.com\",\n \"role\": \"editor\",\n \"group_id\": \"68b4e1d2c9a7f3001e2d4b61\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Query Parameters
Body
An invitation to join a workspace.
Email of the person to invite.
5 - 254"dana@acme.com"
Role the invitee gets when they accept. Defaults to viewer. admin needs the Business plan or higher.
admin, editor, viewer "editor"
ID of a custom group to add the invitee to when they accept. Get it from List workspace groups. Needs a plan that includes groups.
"68b4e1d2c9a7f3001e2d4b61"
Response
The invitation was saved. The body is null.
Was this page helpful?