Skip to main content
POST
/
v1
/
organizations
/
users
Create User
curl --request POST \
  --url https://api.mixpeek.com/v1/organizations/users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "jsmith@example.com",
  "user_name": "<string>",
  "avatar_url": "<string>",
  "role": "member",
  "status": "active",
  "metadata": {}
}
'
import requests

url = "https://api.mixpeek.com/v1/organizations/users"

payload = {
"email": "jsmith@example.com",
"user_name": "<string>",
"avatar_url": "<string>",
"role": "member",
"status": "active",
"metadata": {}
}
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',
user_name: '<string>',
avatar_url: '<string>',
role: 'member',
status: 'active',
metadata: {}
})
};

fetch('https://api.mixpeek.com/v1/organizations/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.mixpeek.com/v1/organizations/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',
'user_name' => '<string>',
'avatar_url' => '<string>',
'role' => 'member',
'status' => 'active',
'metadata' => [

]
]),
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.mixpeek.com/v1/organizations/users"

payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"user_name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"role\": \"member\",\n \"status\": \"active\",\n \"metadata\": {}\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.mixpeek.com/v1/organizations/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"user_name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"role\": \"member\",\n \"status\": \"active\",\n \"metadata\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.mixpeek.com/v1/organizations/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 \"user_name\": \"<string>\",\n \"avatar_url\": \"<string>\",\n \"role\": \"member\",\n \"status\": \"active\",\n \"metadata\": {}\n}"

response = http.request(request)
puts response.read_body
{}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Payload for creating an organization user.

email
string<email>
required

Unique email address within the organization.

user_name
string
required

Display name shown in dashboards and audit trails.

Required string length: 2 - 100
avatar_url
string | null

Profile picture URL (e.g., from PropelAuth picture_url property).

role
enum<string>
default:member

Default role within the organization if omitted.

Available options:
admin,
member,
viewer
status
enum<string>
default:active

Initial lifecycle status. Use 'pending' for invited users who haven't accepted yet.

Available options:
active,
suspended,
pending
metadata
Metadata · object | null

Custom key/value metadata stored with the user record.

Response

Successful Response

The response is of type Response Create User V1 Organizations Users Post · object.