Skip to main content
POST
Create an email account intent
Key: Write Scope: Company

Authorizations

Authorization
string
header
required

Use your Primo API key in the Authorization header as Bearer <API_KEY>.

Body

application/json
credentialsRecipient
object
required
groups
object[]
roles
object[]
licenses
object[]
organizationUnits
object[]
email
string<email> | null

The address to create the mailbox at, on the email provider's domain. Omitted or null: the employee's primary address when the task runs.

Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
personalEmail
string<email> | null

An address of the employee, added to their addresses on execute and made their personal address when they have none.

Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
credentialsSendAt
string<date-time> | null

When the temporary password is sent to credentialsRecipient (ISO 8601, usually the start date). Omitted or null: it is sent as soon as the mailbox is created.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
employeeId
string

The employee the mailbox is for (from getEmployees). Fixed once created. Pass it or onboardingId.

Pattern: ^[a-f\d]{24}$
onboardingId
string

The onboarding whose hire the mailbox is for (from getOnboardings), when the employee does not exist yet. The mailbox is opened for the hire and linked to the employee once created. Pass it or employeeId, not both.

Pattern: ^[a-f\d]{24}$
parentTicketId
string | null

The untyped ticket the work belongs to (an onboarding ticket). Omit it and Primo opens one.

Pattern: ^[a-f\d]{24}$
scheduleDate
string<date-time> | null

Creates the task SCHEDULED until this date; the mailbox is created when it wakes up. Without it, the mailbox is created right away.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$

Response

default - application/json
id
string
required

Intent id — pass it to updateEmailAccountIntent and executeEmailAccountIntent

taskId
string | null
required

The EMAIL_ACCOUNT task that tracks the mailbox

ticketId
string | null
required

The ticket holding that task: the parentTicketId sent, or the one Primo opened. Null if unreadable.

employeeId
string | null
required

The employee the mailbox is for; null for the hire of an onboarding until its employee is created, the mailbox is opened for the hire meanwhile

onboardingId
string | null
required

The onboarding whose hire the mailbox is for, when it was opened for one

companySaasApplicationId
string
required

The company's email provider

email
string | null
required

The address the mailbox is created at; null means the primary address

credentialsRecipient
object
required
personalEmail
string | null
required
credentialsSendAt
string<date-time> | null
required

When the temporary password is sent; null: as soon as the mailbox is created

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
groups
object[]
required
roles
object[]
required
licenses
object[]
required
organizationUnits
object[]
required
createdEmail
string | null
required

The address the provider created, null until executed

executedAt
string<date-time> | null
required

When the mailbox was created; null while the intent can change

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
isExecuting
boolean
required

True while Primo creates the mailbox at the provider; the task completes when it is done

createdAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
updatedAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$