Stytch · Arazzo Workflow

Stytch Create User and Send Email Magic Link

Version 1.0.0

Create a Stytch user, send them an email magic link, and authenticate the resulting token.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub AuthenticationIdentityPasswordlessSecurityB2BConnected AppsMCPAI AgentsDeveloper ToolsArazzoWorkflows

Provider

stytch

Workflows

create-user-magic-link
Create a user, email a magic link, and authenticate the clicked token.
Provisions a new consumer user, dispatches an email magic link to their inbox, and exchanges the token captured from the clicked link for an authenticated Stytch session.
3 steps inputs: email, login_magic_link_url, session_duration_minutes, signup_magic_link_url, token outputs: sessionJwt, sessionToken, userId
1
createUser
Add a new consumer user to Stytch using the supplied email address, returning the user_id used by later steps.
2
sendMagicLink
Send a login or signup email magic link to the user's email address so they can authenticate by clicking through.
3
authenticateMagicLink
Authenticate the magic link token captured from the clicked link to mint an authenticated session for the user.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Stytch Create User and Send Email Magic Link
  summary: Create a Stytch user, send them an email magic link, and authenticate the resulting token.
  description: >-
    A foundational consumer onboarding flow. The workflow first creates a User
    record from an email address, then sends a login/signup email magic link to
    that same address, and finally authenticates the magic link token the user
    clicks to mint a session. Every step spells out its request inline so the
    flow can be read and executed without opening the underlying OpenAPI
    description. All calls authenticate with HTTP Basic auth using your Stytch
    project_id as the username and secret as the password.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-620.20
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-620.20
      capability_name: Identity & Access Management
      spec: stytch-user-api-openapi.yml
      confidence: 0.75
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: magicLinksApi
  url: ../openapi/stytch-magic-links-api-openapi.yml
  type: openapi
- name: userApi
  url: ../openapi/stytch-user-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-user-magic-link
  summary: Create a user, email a magic link, and authenticate the clicked token.
  description: >-
    Provisions a new consumer user, dispatches an email magic link to their
    inbox, and exchanges the token captured from the clicked link for an
    authenticated Stytch session.
  inputs:
    type: object
    required:
    - email
    - login_magic_link_url
    - signup_magic_link_url
    - token
    properties:
      email:
        type: string
        description: The email address to create the user under and send the magic link to.
      login_magic_link_url:
        type: string
        description: The URL the user is redirected to after clicking a login magic link.
      signup_magic_link_url:
        type: string
        description: The URL the user is redirected to after clicking a signup magic link.
      session_duration_minutes:
        type: integer
        description: Optional session lifetime in minutes for the authenticated session.
      token:
        type: string
        description: The magic link token extracted from the URL the user clicked.
  steps:
  - stepId: createUser
    description: >-
      Add a new consumer user to Stytch using the supplied email address,
      returning the user_id used by later steps.
    operationId: api_user_v1_Create
    requestBody:
      contentType: application/json
      payload:
        email: $inputs.email
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      userId: $response.body#/user_id
      emailId: $response.body#/email_id
  - stepId: sendMagicLink
    description: >-
      Send a login or signup email magic link to the user's email address so
      they can authenticate by clicking through.
    operationId: api_magic_v1_magic_links_email_Send
    requestBody:
      contentType: application/json
      payload:
        email: $inputs.email
        user_id: $steps.createUser.outputs.userId
        login_magic_link_url: $inputs.login_magic_link_url
        signup_magic_link_url: $inputs.signup_magic_link_url
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      methodEmailId: $response.body#/email_id
  - stepId: authenticateMagicLink
    description: >-
      Authenticate the magic link token captured from the clicked link to mint
      an authenticated session for the user.
    operationId: api_magic_v1_Authenticate
    requestBody:
      contentType: application/json
      payload:
        token: $inputs.token
        session_duration_minutes: $inputs.session_duration_minutes
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      userId: $response.body#/user_id
      sessionToken: $response.body#/session_token
      sessionJwt: $response.body#/session_jwt
  outputs:
    userId: $steps.authenticateMagicLink.outputs.userId
    sessionToken: $steps.authenticateMagicLink.outputs.sessionToken
    sessionJwt: $steps.authenticateMagicLink.outputs.sessionJwt

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/stytch-create-user-magic-link-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.