Event onUserAdd

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

Scope: user

Who can subscribe: any user

The ONUSERADD event is triggered when a user is added to Bitrix24. The event occurs not after the invitation, but after the user logs into Bitrix24 and completes the registration.

Events will not be sent to the application until the installation is complete. Check the application installation

What the Handler Receives

Data is transmitted as a POST request

{
            "event": "ONUSERADD",
            "data": {
                "ID": 123,
                "ACTIVE": "Y",
                "EMAIL": "user@example.com",
                "NAME": "Klaus",
                "LAST_NAME": "Weber",
                "PERSONAL_GENDER": "M",
                "PERSONAL_BIRTHDAY": "1990-01-01",
                "UF_DEPARTMENT": [1, 2],
                "DATE_REGISTER": "2024-04-05T10:00:00+03:00",
                "WORK_POSITION": "Developer",
                "UF_EMPLOYMENT_DATE": "2024-04-05"
            },
            "ts": "1466439714",
            "auth": {
                "access_token": "s6p6eclrvim6da22ft9ch94ekreb52lv",
                "expires_in": 3600,
                "scope": "user",
                "domain": "some-domain.bitrix24.com",
                "server_endpoint": "https://oauth.bitrix.info/rest/",
                "status": "F",
                "client_endpoint": "https://some-domain.bitrix24.com/rest/",
                "member_id": "a223c6b3710f85df22e9377d6c4f7553",
                "application_token": "51856fefc120afa4b628cc82d3935cce"
            }
        }
        

Request Parameters

Required parameters are marked with *

Name
type

Description

event*
string

Event character code — ONUSERADD

data*
object

Data of the added user.

The structure is described below

ts*
timestamp

Date and time of event sending

auth*
object

Authorization and account data.

The structure is described below

Parameter data

Name
type

Description

ID*
integer

User identifier

ACTIVE*
string

Active flag.

Possible values:

  • Y — yes
  • N — no

EMAIL
string

User's email

NAME
string

User's first name

LAST_NAME
string

User's last name

PERSONAL_GENDER
string

Gender: M — male, F — female

PERSONAL_BIRTHDAY
string

Date of birth in YYYY-MM-DD format

UF_DEPARTMENT
array|null

Array of department ID s. May be absent for Extranet users

DATE_REGISTER*
string

Registration date in ISO 8601 format

WORK_POSITION
string

Position of the user

UF_EMPLOYMENT_DATE
string

Employment date in YYYY-MM-DD format

Some fields may be absent or have a value of null if the application does not have access to them.

Parameter auth

Name
type

Description

access_token*
string

Token for accessing the API

expires_in*
integer

Time in seconds until the token expires

scope*
string

Scope under which the event occurred

domain*
string

Address of Bitrix24 where the event occurred

server_endpoint*
string

Address of the Bitrix24 authorization server, necessary for updating OAuth 2.0 tokens

status*
string

Status of the application subscribed to this event:

  • Llocal application
  • Ffree mass-market application
  • D — demo version of a mass-market application
  • T — trial version of a mass-market application, time-limited
  • P — paid mass-market application

client_endpoint*
string

Common path for API method calls for Bitrix24 where the event occurred

member_id*
string

Identifier of Bitrix24 where the event occurred

application_token*
string

Token for secure event handling

Continue Learning