App Mail Registrations

Register a sender email address

Creates a PENDING registration for the given email address in the caller's tenant, optionally assigned to a user of the tenant, and publishes an EAppMailRegistrationCreatedEvent carrying the confirmation token. The token expires after 12 hours.

Errors (400): email missing; the address is already registered in this tenant; the user is not found in the tenant. An address registered by another tenant is not rejected.

post/appmail/registrations

Request

  • Base URL
    https://api.surense.com/api/v1
  • URL
    https://api.surense.com/api/v1/appmail/registrations
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://api.surense.com/oauth/token

Request body

userIdstring uuid

Tenant user to assign the registration to. Omit for a tenant-level registration.

emailstring

Email address to register. Required; must not already be registered in the tenant.

Example request

{
  "userId": "a1c3e5f7-2b4d-4e6f-8a0c-1d3f5b7e9c20",
  "email": "agent@example-agency.co.il"
}

Response

OK

tenantIdstring uuid
createdDatestring date-time
createdBystring uuid
creatorNamestring
lastModifiedDatestring date-time
lastModifiedBystring uuid
versioninteger
idstring uuid

Registration ID.

emailstring

Registered email address.

userIdstring uuid

User the registration is assigned to; null for tenant-level registrations.

userNamestring

Full name of the assigned user.

primaryboolean

True if this is the primary registration of the user (their own registered email). Primary registrations cannot be deleted or reassigned.

status'PENDING' | 'VERIFIED'

PENDING until the address is confirmed through the emailed link, then VERIFIED.

deletableboolean

Whether the registration can be deleted (false for primary registrations).

Example response

{
  "id": "5e8d2c41-7a9b-4f06-b3e1-0c6d9a2f8b17",
  "email": "agent@example-agency.co.il",
  "userId": "a1c3e5f7-2b4d-4e6f-8a0c-1d3f5b7e9c20",
  "userName": "Dana Levi",
  "status": "PENDING",
  "deletable": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.