← Back to API
Get a form
Retrieve a single form by ID. Only forms owned by the API key's account can be retrieved.
GET /api/v1/forms/:id
Request
Path parameters
| Parameter | Description |
|---|---|
id | Form ID (e.g. form_1739012345_abc123xyz) |
Response (success)
Status: 200 OK
{
"success": true,
"data": {
"id": "form_1739012345_abc123xyz",
"formUrl": "https://www.chatterforms.com/forms/form_1739012345_abc123xyz",
"formSchema": {
"title": "Contact Form",
"fields": [
{ "type": "text", "label": "Name", "required": true },
{ "type": "email", "label": "Email", "required": true }
]
},
"isPublished": true,
"isHipaa": false,
"createdAt": "2025-01-08T12:00:00.000Z",
"updatedAt": "2025-01-08T12:30:00.000Z"
},
"meta": { "request_id": null, "api_version": "2024-01-01" }
}Code examples
curl -X GET "https://backend.chatterforms.com/api/v1/forms/form_1739012345_abc123xyz" \
-H "Authorization: Bearer cf_live_YOUR_API_KEY"const API_KEY = 'cf_live_YOUR_API_KEY';
const BASE_URL = 'https://backend.chatterforms.com';
async function getForm(formId) {
const res = await fetch(`${BASE_URL}/api/v1/forms/${formId}`, {
headers: { Authorization: `Bearer ${API_KEY}` },
});
const json = await res.json();
if (!json.success) throw new Error(json.error?.message || 'Request failed');
return json.data;
}
// Usage
const form = await getForm('form_1739012345_abc123xyz');
console.log('Schema:', form.formSchema);import requests
API_KEY = 'cf_live_YOUR_API_KEY'
BASE_URL = 'https://backend.chatterforms.com'
def get_form(form_id: str) -> dict:
url = f'{BASE_URL}/api/v1/forms/{form_id}'
headers = {'Authorization': f'Bearer {API_KEY}'}
response = requests.get(url, headers=headers)
data = response.json()
if not data.get('success'):
raise Exception(data.get('error', {}).get('message', 'Request failed'))
return data['data']
# Usage
form = get_form('form_1739012345_abc123xyz')
print('Schema:', form['formSchema'])Error responses
| Status | Code | Description |
|---|---|---|
| 401 | INVALID_API_KEY | Missing or invalid API key |
| 404 | NOT_FOUND | Form not found or not owned |
| 500 | INTERNAL_ERROR | Internal error |
See Errors for details.