Templates
Overview
The Templates API provides endpoints for managing form templates.
Endpoints
List Templates
List available form templates.
Endpoint: GET /templates
Authentication: Not required
Query Parameters:
category(optional): Filter by categorysearch(optional): Search term
Response: 200 OK
{
"items": [
{
"template-id": "contact-form",
"name": "Contact Form",
"slug": "contact-form",
"category": "lead-generation",
"summary": "Simple contact form",
"description": "...",
"tags": ["contact", "lead"],
"schema": {...},
"public": true
}
]
}Get Template
Retrieve a specific template.
Endpoint: GET /templates/{slug}
Authentication: Not required
Path Parameters:
slug(required): Template slug
Response: 200 OK
{
"template-id": "contact-form",
"name": "Contact Form",
"schema": {
"title": "Contact Form",
"fields": [...]
},
"instructions": [...],
"codeSamples": [...]
}Template Usage
Templates provide pre-configured form schemas that can be used as starting points for creating new forms.
Using a Template
Retrieve template schema
Create a new form with the template schema
Customize as needed
Examples
List Templates
curl -X GET https://api.formr.xyz/templatesGet Template
curl -X GET https://api.formr.xyz/templates/contact-formCreate Form from Template
# 1. Get template
TEMPLATE=$(curl -X GET https://api.formr.xyz/templates/contact-form)
# 2. Create form using template schema
curl -X POST https://api.formr.xyz/forms \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d "$TEMPLATE"Next Steps
API Reference - API overview
Forms API - Form management
Dashboard Guide - Use templates in dashboard
Last updated