Build, manage, and submit forms programmatically. RESTful endpoints with JSON responses, webhook support, and real-time analytics.
All API requests require authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY_HERE
Generate API keys in your account settings.
Endpoints
All endpoints use the base URL https://agentforms.io.
List all sites for the authenticated user.
Response
List form submissions for a specific site.
Parameters
Retrieve a single submission by ID.
Parameters
Submit form data to a specific site.
Request Body
List form field definitions for a site.
Get analytics data for a site.
Parameters
7d, 30d, 90d
Export submissions as CSV, JSON, or PDF.
Request Body
csv, json, pdf
required
List documents associated with a site.
List all configured webhooks for the authenticated user.
Create a webhook for real-time notifications.
Request Body
submission.created)
required
Examples
Copy-paste examples to get up and running.
curl -X POST https://agentforms.io/api/v1/sites/{siteId}/submissions \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"data": {"name": "John Doe", "email": "john@example.com", "message": "Hello!"}}'
curl -X GET "https://agentforms.io/api/v1/sites/{siteId}/submissions?limit=20" \
-H "Authorization: Bearer YOUR_API_KEY_HERE"
curl -X POST https://agentforms.io/api/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"url": "https://your-app.com/webhook", "events": ["submission.created"]}'
Resources