- Token-based Authentication – For user-specific access (e.g., web or mobile apps)
- Client Credentials Authentication – For public or system-level integrations using workspace-scoped credentials
1. Token-based Authentication
This method is for users who log in to Xenia via the UI or mobile app and need to access protected endpoints.Flow Overview
- A user logs in using the login endpoint.
- The system returns a token if credentials are valid.
- The token is then passed in every API request via the
Authorizationheader.
Header Format
Example
2. Client Credentials Authentication (Public APIs)
Use this method when you want to integrate with Xenia on behalf of a workspace — for automations, backend services, or 3rd-party integrations.Setup Instructions
- Go to Workspace Settings → API Access.
- Click Create Client Key.
- Assign a clear and descriptive label to the client key (e.g., “marketing-automation”) that reflects its specific purpose.
- Choose a default user from your workspace.
This user will represent the API caller if x-client-user is not explicitly passed.
Header Format
- x-client-user is optional.
- If not provided, API acts as the default user tied to that key.
- If provided, API will impersonate that user (must belong to the same workspace).
Example
Authentication Failures
If authentication fails, the API will return an error with status code 401 Make sure:- Token or client credentials are valid
- Headers are correctly formatted and case-sensitive
- The x-client-user (if used) belongs to the correct workspace
Best Practices
- Keep your client secrets secure and never expose them in frontend code.
- Use one key per use-case to isolate integrations.
- Rotate credentials periodically.
- Use token-based auth for logged-in users (mobile/web).
- Use client credentials for integrations and automation.
Next Steps
Now that you’re authenticated and can make requests, explore the API documentation:- Locations API - Manage your organization’s locations
- Users API - User management and HRIS integration
- Roles API - Manage roles and customize permission structures
- Templates API - Digital checklists and task management
- Submissions API - Access completed form data
Support
Need help getting started? We’re here to help:- 📧 Email: support@xeniaplatform.io
- For urgent API issues affecting production systems, contact our 24/7 support team.