Skip to content

fix: transient payload example#2650

Open
vinckr wants to merge 8 commits into
masterfrom
vinckr/docs-janitor-0072
Open

fix: transient payload example#2650
vinckr wants to merge 8 commits into
masterfrom
vinckr/docs-janitor-0072

Conversation

@vinckr

@vinckr vinckr commented Jun 29, 2026

Copy link
Copy Markdown
Member

Related Issue or Design Document

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact security@ory.com) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

@vinckr vinckr requested a review from aeneasr as a code owner June 29, 2026 10:36
Copilot AI review requested due to automatic review settings June 29, 2026 10:36
@vinckr vinckr requested a review from unatasha8 as a code owner June 29, 2026 10:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves Ory Kratos email/SMS documentation by making the HTTP courier payload and template-type lists track the upstream Kratos source, and by expanding the guidance/examples around transient_payload usage in email templates.

Changes:

  • Embed upstream Kratos source snippets via CodeFromRemote for the HTTP delivery ctx model and template type constants.
  • Add a new “Events that trigger an email” section + an additional template-variable tab (verifiable_address_changed).
  • Add a worked example showing how to pass brand/language via transient_payload into template links, and cross-link it from the “Bring your own UI” guide.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
docs/kratos/emails-sms/05_custom-email-templates.mdx Adds template-type source embed, event/condition table, clarifications on authoritative fields, and a new transient payload example.
docs/kratos/emails-sms/01_sending-emails-smtp.mdx Adds ctx payload definition and example Jsonnet template as upstream-synced embeds, plus a hand-maintained field table.
docs/kratos/bring-your-own-ui/05_custom-ui-basic-integration.mdx Adds a link pointing readers to the transient payload email-template example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/kratos/emails-sms/05_custom-email-templates.mdx Outdated

The following template is the example mailer configuration shipped with Ory Kratos. It maps the most common fields out of `ctx`.

<CodeFromRemote

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code snippet renders without a readable format

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@unatasha8 can you clarify what you mean by this?

this is what it looks like for me

Screenshot 2026-07-03 at 09 43 26

Comment thread docs/kratos/emails-sms/01_sending-emails-smtp.mdx Outdated
Comment thread docs/kratos/emails-sms/01_sending-emails-smtp.mdx Outdated
Comment thread docs/kratos/emails-sms/01_sending-emails-smtp.mdx Outdated
Comment thread docs/kratos/emails-sms/01_sending-emails-smtp.mdx Outdated
Comment thread docs/kratos/emails-sms/05_custom-email-templates.mdx Outdated
Comment thread docs/kratos/emails-sms/05_custom-email-templates.mdx Outdated
Comment thread docs/kratos/emails-sms/05_custom-email-templates.mdx Outdated
Comment thread docs/kratos/emails-sms/05_custom-email-templates.mdx Outdated
Comment thread docs/kratos/emails-sms/05_custom-email-templates.mdx Outdated
Comment thread docs/kratos/emails-sms/05_custom-email-templates.mdx Outdated
| `verifiable_address_changed` | A verifiable address on an identity changes; sent to the previous address(es). | Only if the `notify_previous_addresses` hook is enabled. |
| `stub` | Not sent in production. | Test stub used by the Ory Kratos test suite. It does not correspond to a real email. |

:::note

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This note refers to the imported list of template types. Move it to below that section and above this table

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the note refers to the stub Template type which is right above it (last item in the table) - I think its easier to find it if they sit next to each other right?

otherwise you get the note about stub right at the top and then you need to scroll down (and remember) until you get to the entry that the note references.

the note is also only there for completeness sake and most users wont encounter the stub template.

Comment thread docs/kratos/emails-sms/05_custom-email-templates.mdx
Comment thread docs/kratos/emails-sms/05_custom-email-templates.mdx Outdated
Comment thread docs/kratos/emails-sms/05_custom-email-templates.mdx Outdated
vinckr and others added 3 commits July 3, 2026 09:42
Co-authored-by: unatasha8 <una.cogavin@ory.sh>
Co-authored-by: unatasha8 <una.cogavin@ory.sh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants