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
| Name | Type | Description |
|---|---|---|
org | string | The organization: its id (org_…) or its slug. It has to be an org your token can manage (see Who can call it) |
template | string | invite, magic-link, email-code, new-sign-in or password-reset |
Body
| Field | Type | Required | Description |
|---|---|---|---|
kitId | string | yes | A kit of this org, kit_… |
Response
204 No Content
Errors
| Status | error | When |
|---|---|---|
400 | invalid_request | kitId is missing, is not a kit id, or names no kit in this org |
403 | forbidden | You are not an owner of the org |
404 | not_found | Unknown template |
404 | not_found | The 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"}'