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
{}{ "active": true, "name": "Jane Smith", "teamId": 2, "phone": "+15559876543", "notificationPreferences": [ { "event": "user_updated", "accountId": 123421412341234, "deliveryPref": [ "email", "website" ] }, { "event": "lead_assigned", "deliveryPref": [ "sms", "email" ] } ], "roles": [ "Admin", "Manager" ]}{ "active": false, "name": "string", "teamId": 0, "phone": "string", "imgSrc": "string", "notificationPreferences": [ { "event": "string", "accountId": "string", "deliveryPref": [ "string" ] } ], "roles": [ "string" ]}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"}Description
Bad request - invalid input
{ "error": "string", "status": 0}Description
Unauthorized - not authenticated
{ "error": "string", "status": 0}Description
Forbidden - user does not have required permissions
{ "error": "string", "status": 0}Description
Not found - user with specified email does not exist
{ "error": "string", "status": 0}Description
Internal server error
{ "error": "string", "status": 0}References
#/components/parameters/xAccountIdHeader#/components/schemas/PulseEvents#/components/schemas/NotificationPreference#/components/schemas/User#/components/schemas/Error
#/components/parameters/xAccountIdHeader
in: headername: x-account-idschema: type: stringdescription: The account ID for the requestrequired: false|export type xAccountIdHeader = any; // Schema type not fully supported#/components/schemas/PulseEvents
type: stringdescription: Type of event to be notified aboutenum: - 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>export enum PulseEvents { lead_created = "lead_created", lead_updated = "lead_updated", lead_deleted = "lead_deleted", lead_qualified = "lead_qualified", lead_disqualified = "lead_disqualified", lead_assigned = "lead_assigned", lead_converted = "lead_converted", application_created = "application_created", application_updated = "application_updated", application_deleted = "application_deleted", application_completed = "application_completed", application_submitted = "application_submitted", application_sensitive_data_revealed = "application_sensitive_data_revealed", user_created = "user_created", user_updated = "user_updated", user_deleted = "user_deleted", user_logged_in = "user_logged_in", user_logged_out = "user_logged_out", user_password_changed = "user_password_changed", user_password_reset_requested = "user_password_reset_requested", account_created = "account_created", account_updated = "account_updated", account_deleted = "account_deleted", invoice_created = "invoice_created", payment_received = "payment_received", payment_failed = "payment_failed", refund_issued = "refund_issued", event_request_body_revealed = "event_request_body_revealed", event_response_body_revealed = "event_response_body_revealed", system_error = "system_error", quota_exceeded = "quota_exceeded", api_rate_limited = "api_rate_limited", api_key_created = "api_key_created", api_key_updated = "api_key_updated", api_key_deleted = "api_key_deleted", lead_rotation_created = "lead_rotation_created", lead_rotation_updated = "lead_rotation_updated", lead_rotation_deleted = "lead_rotation_deleted", team_created = "team_created", team_updated = "team_updated", team_deleted = "team_deleted", team_activated = "team_activated", team_deactivated = "team_deactivated", admin_force_set_password = "admin_force_set_password", role_created = "role_created", role_deleted = "role_deleted", role_permissions_updated = "role_permissions_updated", file_upload_url_requested = "file_upload_url_requested", file_uploaded = "file_uploaded", file_deleted = "file_deleted", file_requested = "file_requested", file_meta_data_updated = "file_meta_data_updated", note_created = "note_created", note_deleted = "note_deleted", note_updated = "note_updated", account_type_created = "account_type_created", account_type_deleted = "account_type_deleted", account_type_updated = "account_type_updated", user_impersonated = "user_impersonated", lead_source_created = "lead_source_created", lead_source_updated = "lead_source_updated", lead_source_deleted = "lead_source_deleted", lead_source_activated = "lead_source_activated", lead_source_deactivated = "lead_source_deactivated", user_permissions_set_directly = "user_permissions_set_directly", user_roles_updated = "user_roles_updated", account_permissions_updated = "account_permissions_updated", lead_archived = "lead_archived", lead_unarchived = "lead_unarchived", user_added_to_account = "user_added_to_account", user_removed_from_account = "user_removed_from_account", user_account_settings_updated = "user_account_settings_updated", webhook_created = "webhook_created", webhook_updated = "webhook_updated", webhook_deleted = "webhook_deleted", webhook_delivery_failed = "webhook_delivery_failed", webhook_test = "webhook_test", merchant_created = "merchant_created", merchant_updated = "merchant_updated", merchant_deleted = "merchant_deleted", underwriting_application_assigned = "underwriting_application_assigned", underwriting_application_priority_changed = "underwriting_application_priority_changed", underwriting_decision_made = "underwriting_decision_made", underwriting_note_added = "underwriting_note_added", underwriting_risk_assessment_generated = "underwriting_risk_assessment_generated", underwriting_auto_rule_created = "underwriting_auto_rule_created", underwriting_auto_rule_updated = "underwriting_auto_rule_updated", underwriting_auto_rule_toggled = "underwriting_auto_rule_toggled", underwriting_auto_rule_tested = "underwriting_auto_rule_tested", maverick_webhook_received = "maverick_webhook_received", application_sent_to_maverick = "application_sent_to_maverick", maverick_integration_error = "maverick_integration_error", maverick_status_synced = "maverick_status_synced", maverick_status_updated = "maverick_status_updated", maverick_documents_transferred = "maverick_documents_transferred", maverick_note_received = "maverick_note_received", zen_api_lead_created = "zen_api_lead_created", zen_api_lead_batch_submitted = "zen_api_lead_batch_submitted", zen_api_application_submitted = "zen_api_application_submitted", zen_api_application_updated = "zen_api_application_updated", zen_api_documents_transferred = "zen_api_documents_transferred", zen_api_status_change = "zen_api_status_change", no_event_name = "no_event_name", vanity_domain_requested = "vanity_domain_requested", vanity_domain_validated = "vanity_domain_validated", vanity_domain_activated = "vanity_domain_activated", vanity_domain_deleted = "vanity_domain_deleted", mid_created = "mid_created", mid_updated = "mid_updated", mid_deleted = "mid_deleted", mid_assigned = "mid_assigned", mid_activated = "mid_activated", mid_suspended = "mid_suspended", cron_triggered = "cron_triggered", ticket_type_created = "ticket_type_created", ticket_type_updated = "ticket_type_updated", ticket_type_deleted = "ticket_type_deleted", ticket_type_status_changed = "ticket_type_status_changed", ticket_rotation_created = "ticket_rotation_created", ticket_rotation_updated = "ticket_rotation_updated", ticket_rotation_deleted = "ticket_rotation_deleted", ticket_rotation_status_changed = "ticket_rotation_status_changed", ticket_rotation_position_reset = "ticket_rotation_position_reset", ticket_created = "ticket_created", ticket_updated = "ticket_updated", ticket_deleted = "ticket_deleted", ticket_assigned = "ticket_assigned", ticket_status_changed = "ticket_status_changed", ticket_comment_added = "ticket_comment_added", healthcheck = "healthcheck", not_found = "not_found", method_not_allowed = "method_not_allowed",}#/components/schemas/NotificationPreference
type: objectrequired: - eventproperties: 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 - smsdescription: User notification preference for a specific event type>export interface NotificationPreference { event: PulseEvents; /** The account id this notification should occur for, if not provided this preference will be used as a default rule for all accounts */ accountId?: string; /** Preferred delivery methods for notifications */ deliveryPref?: | "website" | "weekly_email_digest" | "monthly_email_digest" | "email" | "sms"[];}#/components/schemas/User
type: objectproperties: 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)|export interface User { /** User ID */ id?: number; /** User's email address */ email?: string; /** Full name of the user */ name?: string; /** Whether the user is active */ active?: boolean; /** ID of the team the user belongs to */ teamId?: number; /** User's phone number */ phone?: string; /** URL to the user's profile image */ imgSrc?: string; /** User's notification preferences */ notificationPreferences?: {}; /** Email of the user who created this user */ createdBy?: string; /** Email of the user who last updated this user */ updatedBy?: string; /** Creation timestamp */ createdAt?: Date; /** Last update timestamp */ updatedAt?: Date; /** List of accounts the user has access to */ accounts?: { accountId?: string; accountName?: string; usersPrimaryAccount?: boolean; accountAdmin?: boolean; }[]; /** List of user roles */ flatRolesList?: string[]; /** List of user permissions */ flatPermissionsList?: string[]; /** Authentication token (only included in certain responses) */ token?: string;}#/components/schemas/Error
type: objectproperties: error: type: string description: Error message status: type: integer description: HTTP status codedescription: Error response object|export interface Error { /** Error message */ error?: string; /** HTTP status code */ status?: number;}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