Skip to main content
POST
Create email endpoint

Authorizations

Authorization
string
header
required

Personal Access Token. Send as Authorization: Bearer hq_pat_....

Body

application/json

The editable behavior fields. All optional on PATCH (a full-form replace); on create, missing values fall back to the DB column defaults.

kind
string
required
localpart
string
required
allow_escalation
boolean | null
allow_patterns
string[] | null

Replaces the allowlist set wholesale when present.

category_policy
any
court_intake_enabled
boolean | null

Court-document intake on/off (docs/court-document-intake.md). Omitted = keep current.

court_secure_mail_password
string | null

Secure-mail password for the court portal. WRITE-ONLY: a non-empty value is vault-sealed and stored; it is never echoed back. Omitted/empty = keep the stored password.

default_reply_lang
string | null
deliver_to
any
enabled
boolean | null
instructions
string | null
max_turns_per_day
integer<int32> | null
max_turns_per_sender_day
integer<int32> | null
plane
string | null
reply_policy
string | null
sender_policy
string | null
spam_score_max
number<float> | null
agent_id
string<uuid> | null

Response

Endpoint created

allow_escalation
boolean
required
allow_patterns
string[]
required
awaiting_review
integer<int64>
required
court_intake_enabled
boolean
required

Court-document intake (docs/court-document-intake.md) is enabled on this inbox: an inbound carrying a securemail.domstol.se link additionally downloads the court documents into the library. Off by default.

court_secure_mail_password_set
boolean
required

A secure-mail password is stored (vault-sealed) for this inbox. The password is write-only; this flag is the only thing the API discloses.

created_at
string<date-time>
required
enabled
boolean
required
escalated
integer<int64>
required
id
string<uuid>
required
is_system
boolean
required

True for the workspace outbound mailbox (HQ-managed): not deletable, not a normal custom inbox - the UI renders it as the workspace mailbox.

kind
string
required
localpart
string
required
message_count
integer<int64>
required

Total mail (in + out) attributed to this endpoint.

needs_attention
integer<int64>
required

Items needing a human (handling_state <> 'handled').

plane
string
required
received
integer<int64>
required

Disposition counters (E7.2): inbound received, outbound replies sent, per-state queues, and threads escalated light -> agent.

replied
integer<int64>
required
reply_languages
any
required

Reply-language distribution: { "English": 12, "Swedish": 3 }.

reply_policy
string
required
sender_policy
string
required
unrouted
integer<int64>
required
updated_at
string<date-time>
required
agent_id
string<uuid> | null
category_policy
any
default_reply_lang
string | null
deliver_to
any
instructions
string | null
last_occurred_at
string<date-time> | null
max_turns_per_day
integer<int32> | null
max_turns_per_sender_day
integer<int32> | null
spam_score_max
number<float> | null