Create invitation
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
fetch('https://api.example.com/v1/regions/global/organizations/{orgId}/invitations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/organizations/{orgId}/invitations"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\"\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))
}curl --request POST \
--url https://api.example.com/v1/regions/global/organizations/{orgId}/invitations \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com"
}
'import requests
url = "https://api.example.com/v1/regions/global/organizations/{orgId}/invitations"
payload = { "email": "jsmith@example.com" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"token": "<string>",
"email": "jsmith@example.com",
"projectId": "<string>",
"organizationId": "<string>",
"role": "admin",
"status": "pending",
"invitedBy": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"acceptedAt": "2023-11-07T05:31:56Z"
}
}Organization Invitations
Create invitation
Invite a user to the organization
POST
/
v1
/
regions
/
global
/
organizations
/
{orgId}
/
invitations
Create invitation
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
fetch('https://api.example.com/v1/regions/global/organizations/{orgId}/invitations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/organizations/{orgId}/invitations"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\"\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))
}curl --request POST \
--url https://api.example.com/v1/regions/global/organizations/{orgId}/invitations \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com"
}
'import requests
url = "https://api.example.com/v1/regions/global/organizations/{orgId}/invitations"
payload = { "email": "jsmith@example.com" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"token": "<string>",
"email": "jsmith@example.com",
"projectId": "<string>",
"organizationId": "<string>",
"role": "admin",
"status": "pending",
"invitedBy": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"acceptedAt": "2023-11-07T05:31:56Z"
}
}Path Parameters
Organization identifier
Body
application/json
Was this page helpful?