---
title: "Generate a magic link (App users API)"
description: "Generate a permanent login link for a user of a Softr app with the App Users API. Request, headers, an example with curl and a note on keeping the link safe."
canonical: "https://docs.softr.io/api/users/generate-magic-link"
updated: "2026-12-04"
---

# Generate a magic link (App users API)

Creates a permanent login link for the user. Anyone who has the link can sign in as that user, so send it only to them.

## Request

`POST https://studio-api.softr.io/v1/api/users/magic-link/generate/{email}`

| Header          | Value                                                                                                           |
| --------------- | --------------------------------------------------------------------------------------------------------------- |
| `Softr-Api-Key` | Your API token. Create one under **API tokens** in your account menu. See [Authentication](/api/authentication) |
| `Softr-Domain`  | Your app's Softr subdomain or custom domain, such as `acme.softr.app`                                           |

Replace `{email}` with the user's email.

## Example

```bash
curl --request POST 'https://studio-api.softr.io/v1/api/users/magic-link/generate/{email}' \
  --header 'Softr-Api-Key: <your API token>' \
  --header 'Softr-Domain: acme.softr.app'
```

## Errors

See [Errors and rate limits](/api/errors-and-limits) for the status codes and the rate limits.

## Related

To manage users without code, see [Add and manage users](/apps/users). To manage them from a workflow, use the app user steps. See [Steps](/workflows/steps#app-user-steps).
