The Userflow REST API lets your back end send data to Userflow and read data from it, and lets you manage your Userflow team in code. It uses standard HTTP methods and sends and receives JSON. This page answers common questions about the API. Every endpoint, with request and response examples, is in the full Userflow API reference.
What can I do with the Userflow API?
The Userflow API has two parts:
Users API: create and update users, companies (groups) and their attributes, track events, and read content, content sessions and survey answers. It also manages webhook subscriptions. Use it to sync data from your back end instead of, or alongside, Userflow.js.
Accounts API: manage your Userflow account, such as listing team members, sending invites and changing member roles.
How do I authenticate with the Userflow API?
Every Userflow API request needs an API key in the Authorization header, prefixed with Bearer . All requests must use HTTPS.
Users API: use an environment API key from Settings → API. Each environment, such as Production and Staging, has its own keys, and a key only works for its environment.
Accounts API: use a personal API key from My Account → Personal API Keys. It's tied to your own Userflow login and your role in each account.
Keep API keys secret. Don't put them in client-side code or a code repository. See Authentication in the reference.
Which Userflow API URL should I use?
The Users API has one URL per data region: https://api.userflow.com for environments in the US region and https://api.eu.userflow.com for environments in the EU region. The Accounts API uses https://api.userflow.com.
Which Userflow API endpoints do I need most?
These Users API endpoints cover most back-end integrations:
Create or update a user (
POST /users): creates the user if they don't exist, or merges the attributes you send.Create or update a group (
POST /groups): the same for companies or groups.Track an event (
POST /events): records an event for a user, a group, or both.Delete a user (
DELETE /users/:user_id): permanently deletes a user and their history. It can't be undone.List content sessions (
GET /content_sessions): shows whether a user has seen a flow or checklist, and their survey answers.
How do I get notified when something changes in Userflow?
Userflow sends webhooks to a URL you choose when users or groups are created or updated, or when events are tracked. Create a webhook subscription through the API and pick the topics you want. See Webhook subscriptions and Custom integrations.
Does the Userflow API have rate limits and versions?
The Userflow API limits how many requests your account can make per minute. The limit depends on your plan. Going over it returns 429 Too Many Requests. See Rate limits.
API changes that would break existing integrations are released as new, dated versions. Send the Userflow-Version header with every request so your integration keeps working when a new version comes out. See Versioning.