curl --request POST \
--url https://scribe.skeptrune.com/api/org/invites \
--header 'Content-Type: application/json' \
--cookie scribe_session= \
--data '
{
"email": "[email protected]",
"role": "member"
}
'import requests
url = "https://scribe.skeptrune.com/api/org/invites"
payload = {
"email": "[email protected]",
"role": "member"
}
headers = {
"cookie": "scribe_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'scribe_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '[email protected]', role: 'member'})
};
fetch('https://scribe.skeptrune.com/api/org/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://scribe.skeptrune.com/api/org/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([
'email' => '[email protected]',
'role' => 'member'
]),
CURLOPT_COOKIE => "scribe_session=",
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://scribe.skeptrune.com/api/org/invites"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"role\": \"member\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "scribe_session=")
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://scribe.skeptrune.com/api/org/invites")
.header("cookie", "scribe_session=")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"role\": \"member\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/org/invites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'scribe_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"[email protected]\",\n \"role\": \"member\"\n}"
response = http.request(request)
puts response.read_body{
"invite": {
"id": "inv_8yUiOpAsDfGhJkLzXcVb",
"email": "[email protected]",
"role": "member",
"status": "pending",
"invitedBy": "usr_V1StGXR8_Z5jdHi6BmyT",
"createdAt": 1752624000000
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}Invite a member
Creates an invite and sends the invitation email via WorkOS. If the email cannot be sent, the invite is still created and the response carries a warning. Requires a user session with the admin role or higher; inviting is not available to API keys.
curl --request POST \
--url https://scribe.skeptrune.com/api/org/invites \
--header 'Content-Type: application/json' \
--cookie scribe_session= \
--data '
{
"email": "[email protected]",
"role": "member"
}
'import requests
url = "https://scribe.skeptrune.com/api/org/invites"
payload = {
"email": "[email protected]",
"role": "member"
}
headers = {
"cookie": "scribe_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'scribe_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '[email protected]', role: 'member'})
};
fetch('https://scribe.skeptrune.com/api/org/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://scribe.skeptrune.com/api/org/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([
'email' => '[email protected]',
'role' => 'member'
]),
CURLOPT_COOKIE => "scribe_session=",
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://scribe.skeptrune.com/api/org/invites"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"role\": \"member\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "scribe_session=")
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://scribe.skeptrune.com/api/org/invites")
.header("cookie", "scribe_session=")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"role\": \"member\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/org/invites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'scribe_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"[email protected]\",\n \"role\": \"member\"\n}"
response = http.request(request)
puts response.read_body{
"invite": {
"id": "inv_8yUiOpAsDfGhJkLzXcVb",
"email": "[email protected]",
"role": "member",
"status": "pending",
"invitedBy": "usr_V1StGXR8_Z5jdHi6BmyT",
"createdAt": 1752624000000
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}Authorizations
Browser session cookie set by the WorkOS sign-in flow.
Body
Email address and role for the invite.
Invite a new member by email.
Email address to invite.
Role to grant the invited member on acceptance.
owner, admin, member "member"
Response
The invite was created.
Created invite, with an optional warning when email delivery failed.
A pending or historical organization invite.
Show child attributes
Show child attributes
{
"id": "inv_8yUiOpAsDfGhJkLzXcVb",
"email": "[email protected]",
"role": "member",
"status": "pending",
"invitedBy": "usr_V1StGXR8_Z5jdHi6BmyT",
"createdAt": 1752624000000
}
Present when the invite row was created but the invitation email could not be sent.
"Invite was created, but the invitation email could not be sent: upstream timeout."