Skip to content

POST   /users

Create a new user

Creates a new user in the system with the provided details

Authentication Required

Authorization: Bearer {token}   header string

This header is required to access this endpoint

Required Parameters

x-account-id   header string

Account ID for the request

Request Body

{
"email": "string"
}

Try it out

Loading...

Output:

Responses

Description

User created successfully

{
"id": 0,
"email": "string",
"name": "string",
"active": false,
"teamId": 0,
"phone": "string",
"imgSrc": "string",
"notificationPreferences": {},
"createdBy": "string",
"updatedBy": "string",
"createdAt": "string",
"updatedAt": "string",
"accounts": [
{
"accountId": "string",
"accountName": "string",
"usersPrimaryAccount": false,
"accountAdmin": false
}
],
"flatRolesList": [
"string"
],
"flatPermissionsList": [
"string"
],
"token": "string"
}

References

#/components/parameters/xAccountIdHeader

in: header
name: x-account-id
schema:
type: string
description: Account ID for the request
required: true
example: "2311"

#/components/schemas/PulseEvents

type: string
description: Type of event to be notified about
enum:
- lead_created
- lead_updated
- lead_deleted
- lead_qualified
- lead_disqualified
- lead_assigned
- lead_converted
- application_created
- application_updated
- application_deleted
- application_completed
- application_submitted
- application_status_changed
- application_sensitive_data_revealed
- application_information_requested
- user_created
- user_updated
- user_deleted
- user_logged_in
- user_logged_out
- user_password_changed
- user_password_reset_requested
- account_created
- account_updated
- account_deleted
- invoice_created
- payment_received
- payment_failed
- refund_issued
- event_request_body_revealed
- event_response_body_revealed
- system_error
- quota_exceeded
- api_rate_limited
- api_key_created
- api_key_updated
- api_key_deleted
- lead_rotation_created
- lead_rotation_updated
- lead_rotation_deleted
- team_created
- team_updated
- team_deleted
- team_activated
- team_deactivated
- admin_force_set_password
- admin_send_passkey_registration
- passkey_registration_token_validated
- passkey_registration_options_generated
- passkey_registered
- passkey_authentication_options_generated
- passkey_authenticated
- passkey_list_viewed
- passkey_renamed
- passkey_deleted
- role_created
- role_deleted
- role_permissions_updated
- file_upload_url_requested
- file_uploaded
- file_deleted
- file_requested
- file_meta_data_updated
- note_created
- note_deleted
- note_updated
- account_type_created
- account_type_deleted
- account_type_updated
- user_impersonated
- lead_source_created
- lead_source_updated
- lead_source_deleted
- lead_source_activated
- lead_source_deactivated
- user_permissions_set_directly
- user_roles_updated
- account_permissions_updated
- lead_archived
- lead_unarchived
- user_added_to_account
- user_removed_from_account
- user_account_settings_updated
- webhook_created
- webhook_updated
- webhook_deleted
- webhook_delivery_failed
- webhook_test
- merchant_created
- merchant_updated
- merchant_deleted
- underwriting_application_assigned
- underwriting_application_priority_changed
- underwriting_decision_made
- underwriting_note_added
- underwriting_risk_assessment_generated
- underwriting_auto_rule_created
- underwriting_auto_rule_updated
- underwriting_auto_rule_toggled
- underwriting_auto_rule_tested
- maverick_webhook_received
- application_sent_to_maverick
- maverick_integration_error
- maverick_status_synced
- maverick_status_updated
- maverick_documents_transferred
- maverick_note_received
- maverick_tickets_fetched
- maverick_ticket_viewed
- maverick_ticket_type_mappings_fetched
- maverick_ticket_type_mapping_created
- maverick_ticket_type_mapping_updated
- maverick_ticket_type_mapping_deleted
- system_warning_maverick_unmapped_tickets
- zen_api_lead_created
- zen_api_lead_batch_submitted
- zen_api_application_submitted
- zen_api_application_updated
- zen_api_documents_transferred
- zen_api_status_change
- no_event_name
- vanity_domain_requested
- vanity_domain_validated
- vanity_domain_activated
- vanity_domain_deleted
- mid_created
- mid_updated
- mid_deleted
- mid_assigned
- mid_activated
- mid_suspended
- ticket_type_created
- ticket_type_updated
- ticket_type_deleted
- ticket_type_status_changed
- ticket_rotation_created
- ticket_rotation_updated
- ticket_rotation_deleted
- ticket_rotation_status_changed
- ticket_rotation_position_reset
- ticket_created
- ticket_updated
- ticket_deleted
- ticket_assigned
- ticket_status_changed
- ticket_comment_added
- ticket_settings_updated
- ticket_template_created
- ticket_template_updated
- ticket_template_deleted
- ticket_automation_rule_created
- ticket_automation_rule_updated
- ticket_automation_rule_deleted
- ticket_automation_rule_tested
- ticket_escalation_rule_created
- ticket_escalation_rule_updated
- ticket_escalation_rule_deleted
- account_relationship_created
- account_relationship_deleted
- healthcheck
- not_found
- method_not_allowed
- cron_job

#/components/schemas/NotificationPreference

type: object
required:
- event
properties:
event:
$ref: "#/components/schemas/PulseEvents"
accountId:
type: string
description: The account id this notification should occur for, if not provided
this preference will be used as a default rule for all accounts
deliveryPref:
type: array
description: Preferred delivery methods for notifications
items:
type: string
enum:
- website
- weekly_email_digest
- monthly_email_digest
- email
- sms
description: User notification preference for a specific event type

#/components/schemas/User

type: object
properties:
id:
type: integer
description: User ID
email:
type: string
format: email
description: User's email address
name:
type: string
description: Full name of the user
active:
type: boolean
description: Whether the user is active
teamId:
type: integer
description: ID of the team the user belongs to
phone:
type: string
description: User's phone number
imgSrc:
type: string
description: URL to the user's profile image
notificationPreferences:
type: object
description: User's notification preferences
createdBy:
type: string
description: Email of the user who created this user
updatedBy:
type: string
description: Email of the user who last updated this user
createdAt:
type: string
format: date-time
description: Creation timestamp
updatedAt:
type: string
format: date-time
description: Last update timestamp
accounts:
type: array
description: List of accounts the user has access to
items:
type: object
properties:
accountId:
type: string
accountName:
type: string
usersPrimaryAccount:
type: boolean
accountAdmin:
type: boolean
flatRolesList:
type: array
description: List of user roles
items:
type: string
flatPermissionsList:
type: array
description: List of user permissions
items:
type: string
token:
type: string
description: Authentication token (only included in certain responses)

#/components/schemas/Error

type: object
properties:
error:
type: string
description: Error message
status:
type: integer
description: HTTP status code
message:
type: string
description: Detailed error message
description: Error response object
required:
- error

Route Source Code

Check out the source code for this route entrypoint here: /users/route.ts

Or the swagger.yaml spec this documentation was generated from: /users/swagger.yaml