Email

Email management endpoints

Get Primary Email

get

Retrieves the user's primary email address.

Authorizations
sessionidstringRequired
Responses
chevron-right
200

Primary email details

application/json
get
/users/email-change/
200

Primary email details

Request Email Change

post

Initiates a request to change the user's primary email address.

Business Logic:

  • Verification: Requires the user's current password to authorize the change.

  • Notifications:

    • Sends a confirmation email to the new email address.

    • Sends a confirmation SMS to the user's registered phone number.

  •     **URL Format:** The notifications contain a signed URL pointing to the `/users/email-set-primary/{signed_email}/{user_id_key}/` endpoint.

Dynamic Settings:

  • NO_REPLY_EMAIL: Sender address for the email.

Notes:

  • The signed link is valid for 7 days.

Authorizations
sessionidstringRequired
Header parameters
X-CSRFTokenstringRequired

CSRF token for write operations (POST, PUT, PATCH, DELETE). Required for security when using session authentication. Obtain token from cookie 'csrftoken' or meta tag in HTML.

Example: abc123def456ghi789
CookiestringRequired

Session ID and CSRF token cookies. Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>

Example: sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789
Body
userintegerRequired

User ID.

emailstring · emailRequired

The new email address. Must be different from the current email and not already in use.

passwordstring · passwordRequired

The user's current password. Required for verification.

Responses
chevron-right
200

Email change requested

No content

post
/users/email-change/

No content

Set Primary Email

get

Sets a verified email as the primary email address.

Path parameters
signed_emailstringRequired

Signed email string

user_id_keystringRequired

Signed user ID key

Responses
chevron-right
200

Email set as primary

No content

get
/users/email-set-primary/{signed_email}/{user_id_key}/

No content

Verify Email

get

Verifies a user's email address via a signed link.

Business Logic:

  • Verification: Validates the signed email and user ID.

  • Next Step: Upon successful verification, it triggers a notification (Email and SMS) containing the link to set this email as primary.

  • URL Format: The new notification contains a signed URL pointing to /users/email-set-primary/{signed_email}/{user_id_key}/.

Path parameters
signed_emailstringRequired

Signed email string

user_id_keystringRequired

Signed user ID key

Responses
chevron-right
200

Email verified

No content

get
/users/email-verify/{signed_email}/{user_id_key}

No content

Get User Emails

get

Retrieves the user's primary email address.

Authorizations
sessionidstringRequired
Responses
chevron-right
200

Primary email details

application/json
get
/users/emails/
200

Primary email details

Add Email Address

post

Adds a new email address to the user's account.

Business Logic:

  • Notifications:

    • Sends a verification email to the new email address.

    • Sends a verification SMS to the user's registered phone number.

  •     **URL Format:** The notifications contain a signed URL pointing to the `/users/email-verify/{signed_email}/{user_id_key}` endpoint.

Dynamic Settings:

  • NO_REPLY_EMAIL: Sender address for the email.

Authorizations
sessionidstringRequired
Header parameters
X-CSRFTokenstringRequired

CSRF token for write operations (POST, PUT, PATCH, DELETE). Required for security when using session authentication. Obtain token from cookie 'csrftoken' or meta tag in HTML.

Example: abc123def456ghi789
CookiestringRequired

Session ID and CSRF token cookies. Format: sessionid=<id>; osessionid=<id>; csrftoken=<token>

Example: sessionid=abc123def456; osessionid=abc123def456; csrftoken=xyz789
Body
idintegerOptional

Unique identifier for the email address. Read-only.

emailstring · emailOptional

The email address. Required when adding a new email.

verifiedbooleanOptional

Indicates if the email address has been verified. Read-only.

primarybooleanOptional

Indicates if this is the primary email address for the user. Read-only.

Responses
chevron-right
200

Email added successfully

No content

post
/users/emails/

No content

Last updated

Was this helpful?