Skip to main content

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)

When successful, Wolfia sends an invitation email to the user with instructions to set up their account.

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:
Example CSV format:

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

A 409 status means the user already exists or has been invited. This is normal and shouldn’t be treated as an error.
Use exponential backoff for 5xx errors:
Keep detailed logs of failed invitations:
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)

  1. Open Task Scheduler
  2. Create a new task
  3. Set trigger (e.g., daily at 2 AM)
  4. Set action: Run Python script
  5. 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