curl --request POST \
--url https://api.whop.com/api/v1/authorized_users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "biz_xxxxxxxxxxxxxx",
"user_id": "user_xxxxxxxxxxxxx",
"elevation": {
"authenticator_data": "<string>",
"client_data_json": "<string>",
"credential_id": "<string>",
"email_code": "<string>",
"signature": "<string>",
"totp_code": "<string>",
"use_finance_session": true
},
"send_emails": true
}
'import requests
url = "https://api.whop.com/api/v1/authorized_users"
payload = {
"account_id": "biz_xxxxxxxxxxxxxx",
"user_id": "user_xxxxxxxxxxxxx",
"elevation": {
"authenticator_data": "<string>",
"client_data_json": "<string>",
"credential_id": "<string>",
"email_code": "<string>",
"signature": "<string>",
"totp_code": "<string>",
"use_finance_session": True
},
"send_emails": True
}
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({
account_id: 'biz_xxxxxxxxxxxxxx',
user_id: 'user_xxxxxxxxxxxxx',
elevation: {
authenticator_data: '<string>',
client_data_json: '<string>',
credential_id: '<string>',
email_code: '<string>',
signature: '<string>',
totp_code: '<string>',
use_finance_session: true
},
send_emails: true
})
};
fetch('https://api.whop.com/api/v1/authorized_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.whop.com/api/v1/authorized_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([
'account_id' => 'biz_xxxxxxxxxxxxxx',
'user_id' => 'user_xxxxxxxxxxxxx',
'elevation' => [
'authenticator_data' => '<string>',
'client_data_json' => '<string>',
'credential_id' => '<string>',
'email_code' => '<string>',
'signature' => '<string>',
'totp_code' => '<string>',
'use_finance_session' => true
],
'send_emails' => true
]),
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.whop.com/api/v1/authorized_users"
payload := strings.NewReader("{\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"user_id\": \"user_xxxxxxxxxxxxx\",\n \"elevation\": {\n \"authenticator_data\": \"<string>\",\n \"client_data_json\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"email_code\": \"<string>\",\n \"signature\": \"<string>\",\n \"totp_code\": \"<string>\",\n \"use_finance_session\": true\n },\n \"send_emails\": true\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.whop.com/api/v1/authorized_users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"user_id\": \"user_xxxxxxxxxxxxx\",\n \"elevation\": {\n \"authenticator_data\": \"<string>\",\n \"client_data_json\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"email_code\": \"<string>\",\n \"signature\": \"<string>\",\n \"totp_code\": \"<string>\",\n \"use_finance_session\": true\n },\n \"send_emails\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/authorized_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 \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"user_id\": \"user_xxxxxxxxxxxxx\",\n \"elevation\": {\n \"authenticator_data\": \"<string>\",\n \"client_data_json\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"email_code\": \"<string>\",\n \"signature\": \"<string>\",\n \"totp_code\": \"<string>\",\n \"use_finance_session\": true\n },\n \"send_emails\": true\n}"
response = http.request(request)
puts response.read_body{
"company": {
"id": "biz_xxxxxxxxxxxxxx",
"title": "Pickaxe"
},
"id": "ausr_xxxxxxxxxxxxx",
"role": "owner",
"user": {
"email": "john.doe@example.com",
"id": "user_xxxxxxxxxxxxx",
"name": "John Doe",
"username": "johndoe42"
}
}{
"error": {
"code": "parameter_missing",
"message": "Missing required parameter: amount.",
"param": "amount",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid or missing API key",
"type": "unauthorized"
}
}{
"error": {
"message": "You do not have permission to access this resource",
"type": "forbidden"
}
}{
"error": {
"message": "Resource not found",
"type": "not_found"
}
}{
"error": null
}{
"error": null
}{
"error": {
"message": "An unexpected error occurred",
"type": "internal_server_error"
}
}Create authorized user
Adds a user to an account’s team as an authorized user with the given role.
curl --request POST \
--url https://api.whop.com/api/v1/authorized_users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "biz_xxxxxxxxxxxxxx",
"user_id": "user_xxxxxxxxxxxxx",
"elevation": {
"authenticator_data": "<string>",
"client_data_json": "<string>",
"credential_id": "<string>",
"email_code": "<string>",
"signature": "<string>",
"totp_code": "<string>",
"use_finance_session": true
},
"send_emails": true
}
'import requests
url = "https://api.whop.com/api/v1/authorized_users"
payload = {
"account_id": "biz_xxxxxxxxxxxxxx",
"user_id": "user_xxxxxxxxxxxxx",
"elevation": {
"authenticator_data": "<string>",
"client_data_json": "<string>",
"credential_id": "<string>",
"email_code": "<string>",
"signature": "<string>",
"totp_code": "<string>",
"use_finance_session": True
},
"send_emails": True
}
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({
account_id: 'biz_xxxxxxxxxxxxxx',
user_id: 'user_xxxxxxxxxxxxx',
elevation: {
authenticator_data: '<string>',
client_data_json: '<string>',
credential_id: '<string>',
email_code: '<string>',
signature: '<string>',
totp_code: '<string>',
use_finance_session: true
},
send_emails: true
})
};
fetch('https://api.whop.com/api/v1/authorized_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.whop.com/api/v1/authorized_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([
'account_id' => 'biz_xxxxxxxxxxxxxx',
'user_id' => 'user_xxxxxxxxxxxxx',
'elevation' => [
'authenticator_data' => '<string>',
'client_data_json' => '<string>',
'credential_id' => '<string>',
'email_code' => '<string>',
'signature' => '<string>',
'totp_code' => '<string>',
'use_finance_session' => true
],
'send_emails' => true
]),
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.whop.com/api/v1/authorized_users"
payload := strings.NewReader("{\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"user_id\": \"user_xxxxxxxxxxxxx\",\n \"elevation\": {\n \"authenticator_data\": \"<string>\",\n \"client_data_json\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"email_code\": \"<string>\",\n \"signature\": \"<string>\",\n \"totp_code\": \"<string>\",\n \"use_finance_session\": true\n },\n \"send_emails\": true\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.whop.com/api/v1/authorized_users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"user_id\": \"user_xxxxxxxxxxxxx\",\n \"elevation\": {\n \"authenticator_data\": \"<string>\",\n \"client_data_json\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"email_code\": \"<string>\",\n \"signature\": \"<string>\",\n \"totp_code\": \"<string>\",\n \"use_finance_session\": true\n },\n \"send_emails\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/authorized_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 \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"user_id\": \"user_xxxxxxxxxxxxx\",\n \"elevation\": {\n \"authenticator_data\": \"<string>\",\n \"client_data_json\": \"<string>\",\n \"credential_id\": \"<string>\",\n \"email_code\": \"<string>\",\n \"signature\": \"<string>\",\n \"totp_code\": \"<string>\",\n \"use_finance_session\": true\n },\n \"send_emails\": true\n}"
response = http.request(request)
puts response.read_body{
"company": {
"id": "biz_xxxxxxxxxxxxxx",
"title": "Pickaxe"
},
"id": "ausr_xxxxxxxxxxxxx",
"role": "owner",
"user": {
"email": "john.doe@example.com",
"id": "user_xxxxxxxxxxxxx",
"name": "John Doe",
"username": "johndoe42"
}
}{
"error": {
"code": "parameter_missing",
"message": "Missing required parameter: amount.",
"param": "amount",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid or missing API key",
"type": "unauthorized"
}
}{
"error": {
"message": "You do not have permission to access this resource",
"type": "forbidden"
}
}{
"error": {
"message": "Resource not found",
"type": "not_found"
}
}{
"error": null
}{
"error": null
}{
"error": {
"message": "An unexpected error occurred",
"type": "internal_server_error"
}
}authorized_user:createmember:email:read
Authorizations
An Account API key, account-scoped JWT, App API key, or user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************.
Body
Parameters for CreateAuthorizedUser
The ID of the company to add the authorized user to.
"biz_xxxxxxxxxxxxxx"
The role to assign to the authorized user within the company. Supported roles: 'moderator', 'sales_manager'.
owner, admin, partner, sales_manager, moderator, advertiser The ID of the user to add as an authorized user.
"user_xxxxxxxxxxxxx"
Re-authentication proof required to perform this sensitive action.
Show child attributes
Show child attributes
Whether to send notification emails to the user on creation.
Response
A successful response
A user who belongs to a company's team with access determined by their assigned role.
The company this authorized user has access to.
Show child attributes
Show child attributes
The team member's ID. It may start with ausr_ or mber_; treat it as opaque.
"ausr_xxxxxxxxxxxxx"
The permission role assigned to this authorized user within the company.
owner, admin, partner, sales_manager, moderator, advertiser, app_manager, support, manager, workforce, custom The user account linked to this authorized user record.
Show child attributes
Show child attributes

