Create Email Policy

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Creates the given email policy. If the upsert query param is set to truethen, instead of performing a create, the API will switch to performing an upsert. For an upsert request, the following fields are required:

Required Upsert Fields:

  • ownerType
  • ownerId
  • emailType

When performing an upsert, the above fields will be used to determine whether the email policy resource already exists. If the email policy already exists, a partial update will be performed; otherwise, a new email policy entity will be created.

In the response of an upsert request, if a create was performed, then a 201 response code will be returned; otherwise, if an update was performed, then a 200 will be returned.

Required Permissions

Below is the list of required permissions needed to interact with this API. For each permission, the allowed permission boundaries are also specified.

PermissionBoundaryDescription
email-policy:writeApplicationThe subject can create email policies under the application that the subject belongs to.
TenantThe subject can create email policies for the tenant the subject belongs to.
Tenant Inclusion ListThe subject can create email policies for tenants specified in the tenant inclusion list.
Tenant Exclusion ListThe subject can create email policies for tenants in the subject's application who are not on the tenant exclusion list.
Query Params
boolean
Defaults to false

Boolean indicating if the operation should be treated as an upsert

Body Params

Email policy JSON object

Email policy.

Default Action Link Lifetimes Per Email Type:

  • EMAIL_CHANGE_CONFIRMATION = 1 HOURS
  • EMAIL_VERIFICATION = 24 HOURS
  • EXISTING_USER_INVITATION = 3 DAYS
  • MAGIC_LINK_LOGIN = 15 MINUTES
  • NEW_USER_INVITATION = 3 DAYS
  • PASSWORDLESS_EMAIL_CHANGE_CURRENT_EMAIL_CONFIRMATION = 1 HOURS
  • PASSWORD_RESET = 1 HOURS
  • TENANT_DISAMBIGUATION = 1 HOURS
  • USER_ACTIVATION = 24 HOURS

Minimum Action Link Lifetimes Per Email Type:

The minimum value for all email types is 10 MINUTES.

Maximum Action Link Lifetimes Per Email Type:

  • EMAIL_CHANGE_CONFIRMATION = 1 HOURS
  • EMAIL_VERIFICATION = 7 DAYS
  • EXISTING_USER_INVITATION = 7 DAYS
  • MAGIC_LINK_LOGIN = 20 MINUTES
  • NEW_USER_INVITATION = 7 DAYS
  • PASSWORDLESS_EMAIL_CHANGE_CURRENT_EMAIL_CONFIRMATION = 1 DAYS
  • PASSWORD_RESET = 1 DAYS
  • TENANT_DISAMBIGUATION = 1 DAYS
  • USER_ACTIVATION = 7 DAYS

string
enum
required
length between 1 and 30

[Required on Create and Upsert] The type of the owner of the resource.

Allowed:
string
required
length between 1 and 26

[Required on Create and Upsert] The ID of the owner of the resource.

string
enum
required
length between 1 and 60

[Required on Create and Upsert] The type of email

uri
length between 1 and 2000

Custom action link URL that users will be sent to for the associated email flow, if applicable.

integer
1 to 10080

The amount of time that an action link URL can stay alive, regardless if it is a custom URL or a default URL.

string
enum
length between 1 and 30

Enum representing the units of time that apply to the value of the action link lifetime.

Allowed:
Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json