Create person

Creates a new person record with optional group and role assignments

POST /api/3/people

Authentication

This endpoint requires authentication:

OAuth 2.0 Recommended

Use an OAuth 2.0 access token in the Authorization header. This is the recommended authentication method for all integrations. OAuth provides automatic token expiration, granular permission scopes, detailed usage tracking, and per-integration revocation. Learn how to obtain an access token.

Header Format:

Authorization: Bearer YOUR_ACCESS_TOKEN

Required Scopes:

account.person

Request Body

first_name string
Optional

First name (required for creation)

last_name string
Optional

Last name (required for creation)

salutation string
Optional

Salutation or title

job_title string
Optional

Job title

email string
Optional

Email address (must be unique within account if provided)

department string
Optional

Department name

enabled boolean
Optional

Whether the person is enabled for access

valid_from string
Optional

Access valid from this date/time

valid_to string
Optional

Access valid until this date/time

image_base64 string
Optional

Base64-encoded image data for person's photo

image_remote_url string
Optional

Remote URL to fetch person's photo from (set to empty string to delete image)

telephone string
Optional

Telephone number

mobile string
Optional

Mobile number (E.164 format if passport enabled)

notes string
Optional

Additional notes

barcode string
Optional

Barcode identifier

system_id string
Optional

External system identifier

organisation_id integer
Optional

Organisation ID

custom_1 string
Optional

Custom field 1

custom_2 string
Optional

Custom field 2

custom_3 string
Optional

Custom field 3

custom_4 string
Optional

Custom field 4

custom_5 string
Optional

Custom field 5

group_ids array
Optional

Array of group IDs to assign this person to

role_ids array
Optional

Array of role IDs to assign to this person (requires permission)

deleted boolean
Optional

Mark person as deleted (used internally)

Example

{
  "first_name": "John",
  "last_name": "Doe",
  "salutation": "string",
  "job_title": "string",
  "email": "string",
  "department": "string",
  "enabled": false,
  "valid_from": "string",
  "valid_to": "string",
  "image_base64": "string",
  "image_remote_url": "string",
  "telephone": "string",
  "mobile": "+14155551234",
  "notes": "string",
  "barcode": "string",
  "system_id": "string",
  "organisation_id": 0,
  "custom_1": "string",
  "custom_2": "string",
  "custom_3": "string",
  "custom_4": "string",
  "custom_5": "string",
  "group_ids": [
    0
  ],
  "role_ids": [
    0
  ],
  "deleted": false
}

Responses

201

Person created successfully

Response Fields

id integer required

Unique identifier for the person

eg. 12345
first_name string required

First name (required)

eg. John
last_name string required

Last name (required)

eg. Doe
salutation string | null

Salutation or title (Mr., Ms., Dr., etc.)

eg. Mr.
job_title string | null

Job title

eg. Software Engineer
email string | null

Email address (must be unique within account if provided)

eg. john.doe@example.com
organisation_id integer | null

Organisation ID

system_id string | null

External system identifier

eg. EMP-12345
department string | null

Department name

eg. Engineering
enabled boolean required

Whether the person is currently enabled for access

eg. true
valid_from string | null

Access valid from this date/time

valid_to string | null

Access valid until this date/time

image_url string | null

URL to person's full-size photo

image_thumbnail_url string | null

URL to person's thumbnail photo

telephone string | null

Telephone number

mobile string | null

Mobile number (E.164 format required if passport enabled)

eg. +14155551234
notes string | null

Additional notes

barcode string | null

Barcode identifier

custom_1 string | null

Custom field 1

custom_2 string | null

Custom field 2

custom_3 string | null

Custom field 3

custom_4 string | null

Custom field 4

custom_5 string | null

Custom field 5

created_at string

Timestamp of creation

updated_at string

Timestamp of last update

groups array<integer> required

Array of group IDs this person belongs to

eg. [1, 3, 5]
roles array<integer> required

Array of role IDs assigned to this person

eg. [2, 4]
401

Unauthorized - Invalid or missing authentication

Response Fields

error string
eg. unauthorized
error_description string
eg. The access token is invalid
403

Forbidden - User does not have permission

Response Fields

error string
eg. forbidden
error_description string
eg. You are not authorized to access this resource
422

Unprocessable Entity - Validation failed

Response Fields

error string

Error message

errors object

Field-specific validation errors

Show child attributes
value array
eg. ["value is already in use on your account", "must be between 4 and 7 digits in length"]

Validation errors for the credential value

credential_type_id array
eg. ["Not found for this account"]

Validation errors for the credential type

limit_reached string
eg. You have reached your HID Mobile licence limit. Please contact DoorFlow Support.

License limit error message

500

Internal Server Error

Response Fields

error string
eg. internal_server_error
error_description string
eg. An unexpected error occurred

Request

curl -X POST \
  "https://api.doorflow.com/api/3/people" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"first_name":"John","last_name":"Doe","salutation":"string","job_title":"string","email":"string","department":"string","enabled":false,"valid_from":"string","valid_to":"string","image_base64":"string","image_remote_url":"string","telephone":"string","mobile":"+14155551234","notes":"string","barcode":"string","system_id":"string","organisation_id":0,"custom_1":"string","custom_2":"string","custom_3":"string","custom_4":"string","custom_5":"string","group_ids":[0],"role_ids":[0],"deleted":false}'

Responses

Person created successfully

{
  "id": 12345,
  "first_name": "John",
  "last_name": "Doe",
  "salutation": "Mr.",
  "job_title": "Software Engineer",
  "email": "john.doe@example.com",
  "organisation_id": 0,
  "system_id": "EMP-12345",
  "department": "Engineering",
  "enabled": true,
  "valid_from": "string",
  "valid_to": "string",
  "image_url": "string",
  "image_thumbnail_url": "string",
  "telephone": "string",
  "mobile": "+14155551234",
  "notes": "string",
  "barcode": "string",
  "custom_1": "string",
  "custom_2": "string",
  "custom_3": "string",
  "custom_4": "string",
  "custom_5": "string",
  "created_at": "string",
  "updated_at": "string",
  "groups": [
    0
  ],
  "roles": [
    0
  ]
}