- Always authenticate with your org’s Basics API key
- Pass a user ID when you want a user-scoped connection
- Omit the user ID to fall back to the legacy org-wide connection
Authentication
Always send the Basics API key for the organization:User identification
Use the user ID when a connection should belong to a specific signed-in user instead of the whole organization.Connections endpoints
For connections endpoints, pass the user ID in theX-User-Id header:
Execute endpoints
For execute endpoints, you can pass the user ID in either place:X-User-IdheaderuserIdin the JSON body
userId in the body wins.
If both are omitted, the gateway uses the legacy org-wide connection for backward compatibility.
Connections endpoints
These endpoints control which provider account is connected.GET /v1/connections
Use X-User-Id: <user_id> to list that user’s connections.
Omit X-User-Id to list all connections for the tenant.
GET /v1/connections/:provider/authorize
Use X-User-Id: <user_id> so the OAuth callback stores the connection for that user.
Without X-User-Id, the flow falls back to the org-wide connection model.
DELETE /v1/connections/:provider
Use X-User-Id: <user_id> to remove that user’s connection.
Omit X-User-Id to remove the org-wide connection.
Execute endpoints
Execute endpoints run actions against an existing connection. This includes flows such as:- Slack message
- Gmail read
- Gmail send
- Gmail sync
userId in the body or X-User-Id in the headers when you want to target a specific user’s connection.
Example: Gmail sync
UsePOST /v1/execute/gmail/sync with a body like this:
Routing rules
- If
userIdis present in the body, the gateway uses that value - If
userIdis not in the body butX-User-Idis present, the gateway uses the header value - If both are omitted, the gateway uses the legacy org-wide connection

