Skip to content

PATCH   /users/{email}

Update a user

Updates a user's information by their email address

Authentication Required

Authorization: Bearer {token}   header string

This header is required to access this endpoint

Required Parameters

email   path string

Email address of the user to update

Optional Parameters

Click here to view an exhaustive list of all available parameters
x-account-id   header string

The account ID for the request

Request Body

{}

Try it out

Loading...

Output:

Responses

Description

User updated 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: The account ID for the request
required: false

#/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_sensitive_data_revealed
- 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
- 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
- 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
- cron_triggered
- 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
- healthcheck
- not_found
- method_not_allowed

#/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
description: Error response object

Route Source Code

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

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