curl --request POST \
--url https://api.whop.com/api/v1/authorized_users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_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 = {
"company_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({
company_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([
'company_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 \"company_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 \"company_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 \"company_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",
"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
Add a new authorized user to a company.
Required permissions:
authorized_user:createmember:email:read
curl --request POST \
--url https://api.whop.com/api/v1/authorized_users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_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 = {
"company_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({
company_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([
'company_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 \"company_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 \"company_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 \"company_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",
"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"
}
}Authorizations
A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like 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, sales_manager, moderator, advertiser, app_manager, support, manager, custom 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 has been granted administrative access to manage a company's dashboard and settings.
The company this authorized user has access to.
Show child attributes
Show child attributes
The unique identifier for the authorized user.
"ausr_xxxxxxxxxxxxx"
The permission role assigned to this authorized user within the company.
owner, admin, sales_manager, moderator, advertiser, app_manager, support, manager, custom The user account linked to this authorized user record.
Show child attributes
Show child attributes

