User API
The User API allows you to programmatically access and manage user-scoped resources such as MCP servers, toolkits, commands, skills, and integration connections.
Unlike the admin Willow API which operates at the organization level, the User API operates in the context of a specific user and returns only the resources accessible to that user.
Authentication
Every User API request needs two things: an authorization token and a header that identifies which user to act as.
1. Authorization Token
The same Bearer token used for the Willow API. Include it in the Authorization header:
Authorization: Bearer wxt_xxxxx
2. Acting User
Provide exactly one of the following headers to select the user whose resources the request operates on. The selected user must belong to the organization associated with the API token.
- Regular user —
x-user-emailwith the user's email:x-user-email: user@example.com - Machine user —
x-machine-userwith the machine user's slug. Use this for bots, scripts, and automations, which have a synthetic email and are identified by slug instead:x-machine-user: ci-deploy-bot
If neither header is present the request fails with 400 (x-user-email or x-machine-user header is required). A slug passed to x-machine-user that doesn't resolve to a machine user in the organization returns 404 (Machine user not found: <slug>).
Required Scopes
User API endpoints require the following permission scopes:
| Operation | Required Scope |
|---|---|
| Read (GET) | connect:read |
| Write (POST, PATCH, DELETE) | connect:write |
Tokens with the all scope have full access to all User API endpoints. The connect:write scope automatically includes connect:read.
Base URL
All User API endpoints are served from the Connect application:
https://{org}.withwillow.ai/api/
Pagination
List endpoints support cursor-based pagination with the following query parameters:
limit— Maximum number of items to return (default: 50, max: 100)cursor— Opaque cursor for the next page of results
The response includes a pagination object:
{
"data": [...],
"pagination": {
"limit": 50,
"nextCursor": "50"
}
}
When nextCursor is null, there are no more results.
Authentication
- HTTP: Bearer Auth
API token authentication. Tokens are prefixed with wxt_ and can be generated from Admin Settings.
Security Scheme Type: | http |
|---|---|
HTTP Authorization Scheme: | bearer |
Required Headers
| Header | Description |
|---|---|
Authorization | Bearer token for authentication |
x-user-email | Email of the user to act as. Provide this or x-machine-user — exactly one is required. |
x-machine-user | Slug of the machine user to act as (bots, scripts, automations). Provide this or x-user-email — exactly one is required. |