API keys allow you to securely access District Engage's data through our API endpoints for integration with external platforms and services. This article explains how to create and manage API keys for your District Engage site.
Administrator Access Required: Only users with administrator permissions can create and manage API keys. API keys inherit the same permissions as the user who created them.
What are API Keys?
API keys are secure authentication tokens that allow external applications to access your District Engage data programmatically. They enable you to:
- Integrate District Engage data with external systems
- Automate data collection and reporting processes
- Build custom applications that interact with your engagement platform
- Export data for analysis in third-party tools
How to Create an API Key
Follow these steps to create a new API key for your District Engage site:
- Log into your District Engage admin dashboard as an administrator.
- Click on your user profile dropdown menu in the top-right corner of the screen.
- Select API from the dropdown menu.
- On the API management page, click Generate New API Token.
- Provide a descriptive name for your API key (e.g., "Marketing Integration", "Analytics Export").
- Click Create Token to generate your new API key.
- Important: Copy and securely store your API key immediately. For security reasons, you won't be able to view the full key again after leaving this page.
Accessing API Documentation
District Engage provides comprehensive, interactive API documentation that's automatically generated from the code:
- While logged into your District Engage site as an administrator, view
/docs/apie.g. https://yourdomain.com/docs/api - Browse available endpoints organised by functionality (Projects, Surveys, Maps, etc.)
- Test endpoints directly in the documentation interface
- View detailed request and response examples for each endpoint
Live Documentation
The API documentation is generated directly from the code, so it's always up-to-date with the latest available endpoints and features.
API Key Permissions
API keys inherit the same permissions as the user account that created them. This means:
- Your API key can only access data that your user account has permission to view
- Project-specific permissions are respected - you can only access projects you have access to
- Team-based restrictions apply if your site uses team functionality
- Content moderation settings are enforced through the API
Example: If your user account can only access certain projects, your API key will only be able to retrieve data from those same projects through API calls.
Using Your API Key
Once you've created your API key, you can use it to authenticate API requests. The key should be included in the Authorization header of your HTTP requests:
Authorization: Bearer YOUR_API_KEY_HERE
Security Best Practices
- Store your API key securely - Never share it publicly or include it in client-side code
- Use descriptive names - This helps you identify and manage multiple keys
- Revoke unused keys - Regularly review and remove API keys that are no longer needed
- Monitor usage - Keep track of which applications are using each key
Need Help?
If you encounter any issues creating or using API keys, please reach out to the District Engage Support Team for assistance.