API Reference
Basin provides a REST API that allows you to programmatically access and manage your form data. Use the API to build custom integrations, automate workflows, or incorporate Basin data into your own applications.
View Full API Documentation (Swagger)
What Can You Do With the API?
The Basin API enables you to:
- Retrieve submissions - Fetch form submissions with filtering and pagination
- Manage forms - Access form details and configuration
- Export data - Build custom export pipelines for your data warehouse
- Automate workflows - Trigger actions based on submission data
- Build dashboards - Create custom reporting and analytics views
Authentication
All API requests require authentication using an API key. Basin supports two types of API keys:
| Key Type | Scope | Use Case |
|---|---|---|
| Account API Key | All forms in your account | Backend integrations, admin dashboards |
| Form API Key | Single form only | Limited access integrations, client projects |
For detailed authentication setup, see our Authentication & Tokens guide.
Quick Start Example
curl -X GET "https://usebasin.com/api/v1/submissions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Common Use Cases
Syncing Submissions to Your Database
Periodically fetch new submissions and store them in your own database:
import requests
response = requests.get(
"https://usebasin.com/api/v1/forms/FORM_ID/submissions",
headers={"Authorization": "Bearer YOUR_API_KEY"},
params={"created_after": "2024-01-01T00:00:00Z"}
)
submissions = response.json()
for submission in submissions:
# Save to your database
save_to_database(submission)
Building Custom Reports
Fetch submissions to generate custom analytics or reports that go beyond Basin's built-in analytics.
Webhook Backup
Use the API as a backup mechanism if webhooks fail, ensuring you never miss submission data.
API Endpoints Overview
The Basin API provides endpoints for:
| Resource | Description |
|---|---|
/submissions |
List, retrieve, and manage form submissions |
/forms |
Access form configuration and metadata |
/projects |
Manage projects and organization |
For complete endpoint documentation including request/response schemas, see the Swagger API Reference.
Need Help?
- Authentication issues? See Authentication & Tokens
- API key management? See Account Management: API Access
- Webhook integration? Check out Webhooks for real-time data
- Questions? Contact Basin Support