API Reference v2.0

AgentForms API

Build, manage, and submit forms programmatically. RESTful endpoints with JSON responses, email templates, campaigns, and real-time analytics.

Authentication

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.

API Reference

All endpoints use the base URL https://agentforms.io.

GET /api/v2/forms

List all forms for the authenticated user.

POST /api/v2/forms

Create a new form.

GET /api/v2/forms/{formToken}

Get form details by token.

Parameters

formToken string Form token (path parameter) required
GET /api/v2/forms/{formToken}/config

Get form field configuration.

GET /api/v2/forms/{formToken}/submissions

List form submissions for a specific form.

Parameters

formToken string Form token (path parameter) required
limit integer Max results per page (default: 50)
offset integer Pagination offset (default: 0)
GET /api/v2/forms/{formToken}/submissions/{subId}

Retrieve a single submission by ID.

Parameters

formToken string Form token required
subId integer Submission ID required
GET /api/v2/forms/{formToken}/analytics

Get analytics data for a form.

PUT /api/v2/forms/{formToken}/fields

Update form field configuration.

POST /api/submit

Public endpoint for submitting form data. Use your form's token as a query parameter.

Query Parameters

token string Your form's unique token required

Request Body

data object Key-value pairs matching your form fields required
GET /api/v2/templates

List available email templates.

POST /api/v2/templates

Create a new email template.

POST /api/v2/templates/render

Render an email template with data.

Quick Start

Copy-paste examples to get up and running.

Submit Form Data (Public)

curl -X POST "https://agentforms.io/api/submit?token=YOUR_FORM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "John Doe", "email": "[email protected]", "message": "Hello!"}'

List Forms

curl -X GET https://agentforms.io/api/v2/forms \
  -H "Authorization: Bearer YOUR_API_KEY"

Get Submissions

curl -X GET "https://agentforms.io/api/v2/forms/{formToken}/submissions?limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

Get Analytics

curl -X GET https://agentforms.io/api/v2/forms/{formToken}/analytics \
  -H "Authorization: Bearer YOUR_API_KEY"

More Info

Base URL https://agentforms.io
OpenAPI Spec /api/docs/openapi.json
Support Contact Support
Status System Status