Overview
A single API call sends an invitation email and assigns the right role, so a teammate gains access the moment they join the corresponding group in your identity provider. Run it on a schedule to keep Wolfia membership in step with joiners and leavers, without manual seat management.The user invitation endpoint
URL:POST https://api.wolfia.com/v1/organizations/invite
Authentication: API key required (see API overview for setup)
Request format
Request parameters
Understanding user roles
Wolfia uses role-based access control to manage permissions:USER
Standard access for most team members.- Use Wolfiaās core features
- Ask questions and get expert answers
- Upload questionnaires and edit answers
- Access the trust center
- Cannot approve or unapprove answers
EXPERT
Enhanced permissions for subject matter experts.- Everything USER can do, plus:
- Approve and unapprove answers in questionnaires
- Manage and approve knowledge base content
- Review and validate AI-generated answers
- Train the AI with expert knowledge
ADMIN
Full administrative access to your organization.- Everything EXPERT can do, plus:
- Invite and manage users
- Configure integrations
- Manage organization settings
- Create and manage API keys
Role hierarchy: You can only invite users with roles equal to or lower than your own. For example, an EXPERT can invite USER and EXPERT roles, but not ADMIN.
Response handling
Success response (200 OK)
Error responses
Integration examples
Okta group synchronization
Automatically sync users from an Okta group to Wolfia:Azure AD automation
Sync users based on Azure AD group membership:Bulk CSV import
Invite multiple users from a CSV file:Best practices
Email domain validation
Before sending invitations, verify that email domains match your organizationās approved domains:- View approved domains in your organization settings
- Pre-validate emails in your integration code to avoid 400 errors
- Contact support if you need to add new domains
Error handling strategies
Handle 409 gracefully
Handle 409 gracefully
A 409 status means the user already exists or has been invited. This is normal and shouldnāt be treated as an error.
Implement retry logic for transient errors
Implement retry logic for transient errors
Use exponential backoff for 5xx errors:
Log all failures for review
Log all failures for review
Keep detailed logs of failed invitations:
Monitor API usage
Monitor API usage
Track your integrationās health:
- Log successful invitations
- Monitor error rates
- Set up alerts for unusual patterns
- Review the āLast Usedā timestamp in your API settings
Role mapping strategies
When syncing from identity providers, map their roles to Wolfia roles appropriately:Scheduled automation
Set up automated syncs using your preferred scheduler:Linux/Mac (cron)
Windows (Task Scheduler)
- Open Task Scheduler
- Create a new task
- Set trigger (e.g., daily at 2 AM)
- Set action: Run Python script
- Configure logging and error handling
Cloud platforms
- AWS Lambda: Schedule with EventBridge
- Azure Functions: Use Timer trigger
- Google Cloud Functions: Use Cloud Scheduler
Monitoring and alerts
Track your integrationās performance:- Success rate: Monitor the ratio of successful to failed invitations
- API errors: Alert on 5xx errors or high failure rates
- Domain mismatches: Track 400 errors to identify configuration issues
- Duplicate attempts: Monitor 409 responses; high rates might indicate sync logic issues
Getting help
If you encounter issues inviting users via the API:- Check email domains: Verify invited emails use approved domains in organization settings
- Verify API key: Confirm your key is active in API settings
- Review error logs: Check the full error response for specific guidance
- Contact support: Email support@wolfia.com with your integration details
Next steps
API overview
Learn about API authentication, rate limits, and best practices
Organization settings
Manage approved email domains and other settings

