Add a user
curl --request POST \
--url https://{your-subdomain}.neetoauth.com/api/external/v2/users \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"user": {
"email": "oliver@example.com",
"role": "non_owner",
"apps": [
{
"name": "Cal",
"role": "Admin"
}
],
"first_name": "Oliver",
"last_name": "Smith"
}
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user: {
email: 'oliver@example.com',
role: 'non_owner',
apps: [{name: 'Cal', role: 'Admin'}],
first_name: 'Oliver',
last_name: 'Smith'
}
})
};
fetch('https://{your-subdomain}.neetoauth.com/api/external/v2/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetoauth.com/api/external/v2/users"
payload = { "user": {
"email": "oliver@example.com",
"role": "non_owner",
"apps": [
{
"name": "Cal",
"role": "Admin"
}
],
"first_name": "Oliver",
"last_name": "Smith"
} }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"email": "oliver@example.com",
"role": "non_owner",
"first_name": "Oliver",
"last_name": "Smith",
"apps": [
{
"name": "Cal",
"role": "Admin"
}
]
}Users
Add user
Adds a user to the workspace.
POST
/
users
Add a user
curl --request POST \
--url https://{your-subdomain}.neetoauth.com/api/external/v2/users \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"user": {
"email": "oliver@example.com",
"role": "non_owner",
"apps": [
{
"name": "Cal",
"role": "Admin"
}
],
"first_name": "Oliver",
"last_name": "Smith"
}
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user: {
email: 'oliver@example.com',
role: 'non_owner',
apps: [{name: 'Cal', role: 'Admin'}],
first_name: 'Oliver',
last_name: 'Smith'
}
})
};
fetch('https://{your-subdomain}.neetoauth.com/api/external/v2/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetoauth.com/api/external/v2/users"
payload = { "user": {
"email": "oliver@example.com",
"role": "non_owner",
"apps": [
{
"name": "Cal",
"role": "Admin"
}
],
"first_name": "Oliver",
"last_name": "Smith"
} }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"email": "oliver@example.com",
"role": "non_owner",
"first_name": "Oliver",
"last_name": "Smith",
"apps": [
{
"name": "Cal",
"role": "Admin"
}
]
}Replace
Learn how to find your subdomain in Workspace subdomain.
{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Body
application/json
If the email belongs to a deactivated user, that user is reactivated with the supplied attributes.
Hide child attributes
Hide child attributes
Email of the user.
Example:
"oliver@example.com"
Role of the user.
Available options:
owner, non_owner Example:
"non_owner"
Product roles to assign to the user.
Hide child attributes
Hide child attributes
Product name returned by the List available products endpoint.
Example:
"Cal"
Role returned in the product's roles list.
Example:
"Admin"
First name of the user. Defaults to "-" when omitted.
Example:
"Oliver"
Last name of the user. Defaults to "-" when omitted.
Example:
"Smith"
Response
201 - application/json
Created - User created successfully