Form Templates
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
List of form templates for a workspace.
Validation Error
GET /v1/{workspace_id}/settings/form-templates HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"templates": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"category": "custom",
"patient_type": "any",
"fields": [
{
"key": "text",
"label": "text",
"field_type": "text",
"required": true,
"options": [
"text"
],
"description": "text",
"placeholder": "text",
"validation": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"sensitive": false,
"condition": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"consent_text": "text",
"prefill_path": "text",
"layout_group": "text"
}
],
"sections": [
{
"id": "text",
"title": "text",
"description": "text",
"field_keys": [
"text"
],
"condition": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"branding": {
"logo_url": "text",
"primary_color": "text",
"background_color": "text",
"font_family": "text"
},
"completion_title": "text",
"completion_message": "text",
"completion_action_url": "text",
"submit_button_text": "text",
"active": true,
"version": 1
}
]
}API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Replace all form templates.
Successful Response
List of form templates for a workspace.
Validation Error
PUT /v1/{workspace_id}/settings/form-templates HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 838
{
"templates": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"category": "custom",
"patient_type": "any",
"fields": [
{
"key": "text",
"label": "text",
"field_type": "text",
"required": true,
"options": [
"text"
],
"description": "text",
"placeholder": "text",
"validation": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"sensitive": false,
"condition": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"consent_text": "text",
"prefill_path": "text",
"layout_group": "text"
}
],
"sections": [
{
"id": "text",
"title": "text",
"description": "text",
"field_keys": [
"text"
],
"condition": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"branding": {
"logo_url": "text",
"primary_color": "text",
"background_color": "text",
"font_family": "text"
},
"completion_title": "text",
"completion_message": "text",
"completion_action_url": "text",
"submit_button_text": "text",
"active": true,
"version": 1
}
]
}{
"templates": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"category": "custom",
"patient_type": "any",
"fields": [
{
"key": "text",
"label": "text",
"field_type": "text",
"required": true,
"options": [
"text"
],
"description": "text",
"placeholder": "text",
"validation": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"sensitive": false,
"condition": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"consent_text": "text",
"prefill_path": "text",
"layout_group": "text"
}
],
"sections": [
{
"id": "text",
"title": "text",
"description": "text",
"field_keys": [
"text"
],
"condition": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"branding": {
"logo_url": "text",
"primary_color": "text",
"background_color": "text",
"font_family": "text"
},
"completion_title": "text",
"completion_message": "text",
"completion_action_url": "text",
"submit_button_text": "text",
"active": true,
"version": 1
}
]
}API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Successful Response
Reusable form template with sections, prefill, branding.
Extends DataTemplate concept. Up to 200 fields, organized in sections. Stored in workspace settings["form_templates"] JSONB.
Examples:
- New patient intake (85 fields, 11 sections)
- Returning patient update (27 fields, 5 sections)
- Pre-surgery checklist (15 fields, 3 sections)
- PHQ-9 screening (10 fields, 1 section)
customPossible values: anyPossible values: true1Validation Error
GET /v1/{workspace_id}/settings/form-templates/{template_id} HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"category": "custom",
"patient_type": "any",
"fields": [
{
"key": "text",
"label": "text",
"field_type": "text",
"required": true,
"options": [
"text"
],
"description": "text",
"placeholder": "text",
"validation": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"sensitive": false,
"condition": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"consent_text": "text",
"prefill_path": "text",
"layout_group": "text"
}
],
"sections": [
{
"id": "text",
"title": "text",
"description": "text",
"field_keys": [
"text"
],
"condition": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"branding": {
"logo_url": "text",
"primary_color": "text",
"background_color": "text",
"font_family": "text"
},
"completion_title": "text",
"completion_message": "text",
"completion_action_url": "text",
"submit_button_text": "text",
"active": true,
"version": 1
}API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Resolve a form template for a specific entity.
Successful Response
Resolved SurfaceSpec with prefill values.
Validation Error
POST /v1/{workspace_id}/settings/form-templates/{template_id}/resolve HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"entity_id": "123e4567-e89b-12d3-a456-426614174000"
}{
"spec": {
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
"title": "text",
"description": "text",
"fields": [
{
"key": "text",
"label": "text",
"field_type": "text",
"required": true,
"options": [
"text"
],
"description": "text",
"placeholder": "text",
"prefill_value": null,
"validation": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"sensitive": false,
"condition": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"consent_text": "text"
}
],
"channel": "web",
"expires_in_hours": 168,
"context": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"resource_type": "text",
"branding": {
"logo_url": "text",
"primary_color": "text",
"background_color": "text",
"font_family": "text"
},
"sections": [
{
"title": "text",
"description": "text",
"field_keys": [
"text"
],
"condition": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"completion_title": "text",
"completion_message": "text",
"completion_action_url": "text",
"submit_button_text": "text"
},
"prefilled_count": 1,
"total_fields": 1
}Last updated
Was this helpful?

