Upsert user invitations to a flow
Upsert invitations for multiple users to access a flow.
This endpoint allows admins to invite reviewer users to specific flows. Only users with the reviewer role will be invited - other users are automatically filtered out. Invited users will be able to access the flow and its executions through the RLS policies enforced at the database level.
Permissions
- Only org_admin role can create/update invitations
- Users must belong to the same organization as the flow
Behavior
- Upsert semantics: Creates new invitations or updates existing ones
- Role filtering: Only users with reviewer role are invited (others are skipped)
- If a user_id doesn’t have reviewer role, it’s silently skipped
- Returns both invited user IDs and skipped user IDs
- All operations are performed in a single transaction
Use Cases
- Grant reviewer access to specific flows
- Update existing invitations (refresh updated_at timestamp)
- Manage flow-level permissions for review workflows
- Enable selective flow visibility for team members
Example
If you send user_ids: [user1, user2, user3, user4] and only user1, user2, user3 have reviewer role:
- Response will show invited_user_ids: [user1, user2, user3]
- Response will show skipped_user_ids: [user4]
Authorizations
API key authentication. Include your API key in the X-API-Key header as: X-API-Key YOUR_API_KEY
Example:
JWT Bearer token authentication. Include your access token in the Authorization header as: Bearer YOUR_ACCESS_TOKEN
Example:
Path Parameters
Body
Request model for creating flow invitations.
List of user IDs to invite to the flow
1Response
Users successfully invited/updated for the flow