Stytch logo

REST API integration

Stytch REST API integration for Draftbit

Use Stytch auth APIs from a secure backend

What is Stytch?

Stytch's documented REST APIs use project-secret authentication and should be called from a backend or proxy. For frontend apps, prefer Stytch SDKs with a public token.

Use Stytch with Draftbit

  • Built-in endpoints: Start email magic link, Authenticate magic link, Authenticate session.
  • Bind any Stytch endpoint to a screen, list, form, or AI agent action.
  • Authentication is configured once per app — secrets stay on the server.
  • Add custom request and response transforms without forking Stytch's client library.

Example

stytch-example.ts
// Example: fetch from Stytch
const response = await fetch("https://{stytch_host}/v1/magic_links/email/login_or_create", {
  headers: {
    "Authorization": "Basic YOUR_STYTCH_TOKEN",
  },
});
const data = await response.json();

Use cases

  • Add sign-up, sign-in, and password reset flows to a mobile app
  • Gate premium features behind authenticated user sessions
  • Sync user profiles across web and native clients

Authentication

Authentication uses the `Authorization` header. Paste your key once in Draftbit and every request to Stytch carries it automatically — secrets stay on the server side.

Use Stytch in a Draftbit app today

Start free, connect Stytch in minutes, and ship with AI agents that know how to use it.

Start building free

Frequently asked questions

What is the Stytch REST integration?

Stytch's documented REST APIs use project-secret authentication and should be called from a backend or proxy. For frontend apps, prefer Stytch SDKs with a public token.

How do I connect Stytch to a Draftbit app?

Go to Integrations → REST APIs in your Draftbit app and pick Stytch from the catalog. Paste your API key or token, set any base-URL variables (project IDs, hosts), and the endpoints become available across your screens.

Does Stytch require authentication?

Most Stytch endpoints expect a key or token sent as a header. Built-in endpoints include: Start email magic link, Authenticate magic link, Authenticate session.

What can I build with Stytch and Draftbit?

Use Stytch as a authentication service for your mobile or web app: Add sign-up, sign-in, and password reset flows to a mobile app; Gate premium features behind authenticated user sessions.

Related Integrations

Get started free Browse all Integrations