curl --request POST \
--url https://api.arize.com/v2/organizations/{org_id}/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "VXNlcjoxMjM0NQ==",
"role": {
"type": "PREDEFINED",
"name": "MEMBER"
}
}
'import requests
url = "https://api.arize.com/v2/organizations/{org_id}/users"
payload = {
"user_id": "VXNlcjoxMjM0NQ==",
"role": {
"type": "PREDEFINED",
"name": "MEMBER"
}
}
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({user_id: 'VXNlcjoxMjM0NQ==', role: {type: 'PREDEFINED', name: 'MEMBER'}})
};
fetch('https://api.arize.com/v2/organizations/{org_id}/users', 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.arize.com/v2/organizations/{org_id}/users",
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([
'user_id' => 'VXNlcjoxMjM0NQ==',
'role' => [
'type' => 'PREDEFINED',
'name' => 'MEMBER'
]
]),
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://api.arize.com/v2/organizations/{org_id}/users"
payload := strings.NewReader("{\n \"user_id\": \"VXNlcjoxMjM0NQ==\",\n \"role\": {\n \"type\": \"PREDEFINED\",\n \"name\": \"MEMBER\"\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://api.arize.com/v2/organizations/{org_id}/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"VXNlcjoxMjM0NQ==\",\n \"role\": {\n \"type\": \"PREDEFINED\",\n \"name\": \"MEMBER\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arize.com/v2/organizations/{org_id}/users")
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 \"user_id\": \"VXNlcjoxMjM0NQ==\",\n \"role\": {\n \"type\": \"PREDEFINED\",\n \"name\": \"MEMBER\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "QWNjb3VudE9yZ2FuaXphdGlvbk1lbWJlcjox",
"user_id": "VXNlcjoxMjM0NQ==",
"organization_id": "QWNjb3VudE9yZ2FuaXphdGlvbjox",
"role": {
"type": "PREDEFINED",
"name": "MEMBER"
}
}{
"status": 400,
"title": "Invalid request parameters",
"detail": "The 'name' field is required and must be a non-empty string.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#invalid-request"
}{
"status": 401,
"title": "Authentication required",
"detail": "You must be authenticated to access this resource.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#authentication-required"
}{
"status": 403,
"title": "Access forbidden",
"detail": "You do not have permission to access this resource.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#access-forbidden"
}{
"status": 404,
"title": "Resource not found",
"detail": "The requested resource with ID '12345' was not found.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#resource-not-found"
}{
"status": 422,
"title": "Unprocessable Entity",
"detail": "One or more fields failed validation.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#unprocessable-entity"
}{
"status": 429,
"title": "Rate limit exceeded",
"detail": "You have exceeded the allowed number of requests. Please try again later.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#rate-limit-exceeded"
}Add a user to an organization
Add a single existing account user to an organization with a specified role.
Payload Requirements
user_idandroleare both required.- If the user is already a member, their role is updated to the specified value (upsert).
Role constraints
- Users with an
annotatoraccount role can only be assigned theannotatororganization role. - Users with a non-annotator account role cannot be assigned the
annotatororganization role.
Requires organization admin.
Valid example
{
"user_id": "VXNlcjo0MjphQmNE",
"role": "MEMBER"
}
Invalid example (annotator account user assigned non-annotator org role — returns 400)
{
"user_id": "VXNlcjo0MjphQmNE",
"role": "ADMIN"
}
curl --request POST \
--url https://api.arize.com/v2/organizations/{org_id}/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "VXNlcjoxMjM0NQ==",
"role": {
"type": "PREDEFINED",
"name": "MEMBER"
}
}
'import requests
url = "https://api.arize.com/v2/organizations/{org_id}/users"
payload = {
"user_id": "VXNlcjoxMjM0NQ==",
"role": {
"type": "PREDEFINED",
"name": "MEMBER"
}
}
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({user_id: 'VXNlcjoxMjM0NQ==', role: {type: 'PREDEFINED', name: 'MEMBER'}})
};
fetch('https://api.arize.com/v2/organizations/{org_id}/users', 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.arize.com/v2/organizations/{org_id}/users",
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([
'user_id' => 'VXNlcjoxMjM0NQ==',
'role' => [
'type' => 'PREDEFINED',
'name' => 'MEMBER'
]
]),
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://api.arize.com/v2/organizations/{org_id}/users"
payload := strings.NewReader("{\n \"user_id\": \"VXNlcjoxMjM0NQ==\",\n \"role\": {\n \"type\": \"PREDEFINED\",\n \"name\": \"MEMBER\"\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://api.arize.com/v2/organizations/{org_id}/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"VXNlcjoxMjM0NQ==\",\n \"role\": {\n \"type\": \"PREDEFINED\",\n \"name\": \"MEMBER\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arize.com/v2/organizations/{org_id}/users")
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 \"user_id\": \"VXNlcjoxMjM0NQ==\",\n \"role\": {\n \"type\": \"PREDEFINED\",\n \"name\": \"MEMBER\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "QWNjb3VudE9yZ2FuaXphdGlvbk1lbWJlcjox",
"user_id": "VXNlcjoxMjM0NQ==",
"organization_id": "QWNjb3VudE9yZ2FuaXphdGlvbjox",
"role": {
"type": "PREDEFINED",
"name": "MEMBER"
}
}{
"status": 400,
"title": "Invalid request parameters",
"detail": "The 'name' field is required and must be a non-empty string.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#invalid-request"
}{
"status": 401,
"title": "Authentication required",
"detail": "You must be authenticated to access this resource.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#authentication-required"
}{
"status": 403,
"title": "Access forbidden",
"detail": "You do not have permission to access this resource.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#access-forbidden"
}{
"status": 404,
"title": "Resource not found",
"detail": "The requested resource with ID '12345' was not found.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#resource-not-found"
}{
"status": 422,
"title": "Unprocessable Entity",
"detail": "One or more fields failed validation.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#unprocessable-entity"
}{
"status": 429,
"title": "Rate limit exceeded",
"detail": "You have exceeded the allowed number of requests. Please try again later.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#rate-limit-exceeded"
}Authorizations
Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format
Path Parameters
The unique organization identifier (base64) A universally unique identifier (base64-encoded opaque string).
"RW50aXR5OjEyMzQ1"
Body
Body containing the user to add to the organization
The unique identifier of the user to add
"RW50aXR5OjEyMzQ1"
Strict request form of OrganizationRoleAssignment. Used in write request bodies.
PREDEFINED:{ "type": "PREDEFINED", "name": "ADMIN" | "MEMBER" | "READ_ONLY" | "ANNOTATOR" }CUSTOM:{ "type": "CUSTOM", "id": "<encoded-role-id>" }
- Option 1
- Option 2
Show child attributes
Show child attributes
Response
User successfully added to the organization
Unique identifier for the membership record
"RW50aXR5OjEyMzQ1"
The unique identifier of the user
"RW50aXR5OjEyMzQ1"
The unique identifier of the organization
"RW50aXR5OjEyMzQ1"
A role assignment for an organization membership. Discriminated by type:
PREDEFINED: one of the predefined roles (ADMIN,MEMBER,READ_ONLY,ANNOTATOR)CUSTOM: a custom RBAC role identified by its ID
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?