Add User
curl --request POST \
--url https://anaconda.com/api/v1/organizations/{org_id}/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>"
}
'import requests
url = "https://anaconda.com/api/v1/organizations/{org_id}/users"
payload = {
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>"
}
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: 'jsmith@example.com', first_name: '<string>', last_name: '<string>'})
};
fetch('https://anaconda.com/api/v1/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://anaconda.com/api/v1/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([
'email' => 'jsmith@example.com',
'first_name' => '<string>',
'last_name' => '<string>'
]),
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://anaconda.com/api/v1/organizations/{org_id}/users"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\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://anaconda.com/api/v1/organizations/{org_id}/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://anaconda.com/api/v1/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 \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Adds a user to the organization.
POST
/
api
/
v1
/
organizations
/
{org_id}
/
users
Add User
curl --request POST \
--url https://anaconda.com/api/v1/organizations/{org_id}/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>"
}
'import requests
url = "https://anaconda.com/api/v1/organizations/{org_id}/users"
payload = {
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>"
}
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: 'jsmith@example.com', first_name: '<string>', last_name: '<string>'})
};
fetch('https://anaconda.com/api/v1/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://anaconda.com/api/v1/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([
'email' => 'jsmith@example.com',
'first_name' => '<string>',
'last_name' => '<string>'
]),
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://anaconda.com/api/v1/organizations/{org_id}/users"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\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://anaconda.com/api/v1/organizations/{org_id}/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://anaconda.com/api/v1/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 \"email\": \"jsmith@example.com\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Provide an email address to add the user as a standard organization member.Omitting an email address creates an organization-managed user instead.Managed users are not linked to individual accounts and are intended for programmatic use, such as generating tokens for automated processes or integrations.
Authorizations
Bearer token obtained by authenticating with service account credentials (client_id and client_secret).
See the Getting started page for the full authentication flow.
Path Parameters
Your organization ID, found in your organization's URL: anaconda.com/app/organizations/<ORG_ID>/.
Body
application/json
The email address for the new user. If omitted, an organization-managed user is created instead.
The first name of the user. For managed users, use a descriptive name for the token's intended purpose.
The last name of the user. For managed users, use a descriptive name for the token's intended purpose.
Was this page helpful?