Assign a kit to an email

Set the brand kit one transactional email wears.

PATCH /organizations/{org}/emails/{template}

Assigns a kit to one email template.

Authorization

Org owner. Anyone else gets 403 forbidden.

Path parameters

NameTypeDescription
orgstringThe organization: its id (org_…) or its slug. It has to be an org your token can manage (see Who can call it)
templatestringinvite, magic-link, email-code, new-sign-in or password-reset

Body

FieldTypeRequiredDescription
kitIdstringyesA kit of this org, kit_…

Response

204 No Content

Errors

StatuserrorWhen
400invalid_requestkitId is missing, is not a kit id, or names no kit in this org
403forbiddenYou are not an owner of the org
404not_foundUnknown template
404not_foundThe org does not exist, or your token cannot manage it

Example

curl -X PATCH https://loginwith.loginwith.dev/organizations/acme/emails/magic-link \
  -H "Authorization: Bearer $TOKEN" -H "content-type: application/json" \
  -d '{"kitId": "kit_65f1c2a9e4b0d3f7a1c8e906"}'