Update a collection template
post
https://api.expiryedge.com/v1/updateCollectionTemplateeditor or admin60/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/updateCollectionTemplate?id=tpl_W9onboard' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Client onboarding 2026",
"description": "Updated for the 2026 policy year."
}'Antwort
{
"message": "Template updated",
"template": {
"id": "tpl_W9onboard",
"organization_id": "org_northwind",
"name": "Client onboarding 2026",
"description": "Documents we need before the first engagement.",
"pages": [
{
"id": "p_company",
"title": "Company details",
"order": 0,
"description_html": "<p>Tell us about your practice.</p>",
"sections": [
{
"id": "s_basics",
"title": "Basics",
"order": 0,
"description_html": "",
"fields": [
{
"id": "fld_company_name",
"type": "short_text",
"label": "Legal company name",
"required": true,
"help_text": ""
},
{
"id": "fld_entity",
"type": "dropdown",
"label": "Entity type",
"required": true,
"help_text": "",
"options": [
"LLC",
"Corporation",
"Sole proprietor"
]
},
{
"id": "fld_insurance",
"type": "file_upload",
"label": "Liability insurance certificate",
"required": true,
"help_text": "PDF or image, current policy year.",
"allowed_types": [
"pdf",
"jpg",
"png"
],
"max_size_bytes": 26214400,
"reference_file": {
"storage_path": "organizations/org_northwind/collection-templates/tpl_W9onboard/fields/fld_insurance/reference-1b2c-sample.pdf",
"original_filename": "sample-certificate.pdf",
"content_type": "application/pdf",
"size_bytes": 120331
}
}
]
}
]
}
],
"intro_email": {
"body_html": "<p>Hi, please upload the documents below by Friday.</p>"
},
"schema_version": 2,
"status": "active",
"created_by": "u_71bXq",
"created_by_name": "Priya Shah",
"created_at": "2026-09-27T14:05:00.000Z",
"updated_at": "2026-09-27T14:05:00.000Z"
}
}Partial update: send any of name, description, pages, intro_email. pages replaces the whole tree; reference files dropped from it are deleted. The id may be in the query string (as the web app sends it) or the body. The handler does not check the HTTP method.
idstringTemplate id (oridin the body).
idstringnamestringmax length: 200descriptionstringmax length: 1000pagesarray of objectsMax 50 fields across all pages.min items: 1 · max items: 20intro_emailobject | nullCustom introduction for the request email; null uses the default text.
200
Template updated.
messagestringerforderlichtemplateobjecterforderlichA Document Collection template (form definition).
400 | The request is missing required fields or contains invalid values. |
401 | Missing, expired or invalid bearer token. |
403 | Your role does not allow this, or the record belongs to another organization ( {"error": "Access denied"}). |
404 | The record does not exist or is not in your organization. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
