Set form availability
Close a form now, on a date or after a number of submissions, or reopen it.
PUT https://cotlet.dev/api/v1/formstack/forms/{form_id}/availability
Sets the Disable Form setting in the form's General Settings. The disable value is now, on_date, after_submissions or never. Now moves the form to the Archived Forms folder. The other two keep the form in its folder with a red badge next to its name. Visitors see the default closed message or the one you pass. Never reopens an expired form; an archived form is restored from the Archived Forms folder in Formstack. Save and Resume does not work while the form is closed. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| form_id string required | string | Form ID from list_forms. |
| disable string required | string | now, on_date, after_submissions or never. |
| on_date string | string | Date and time to close, ISO 8601. Used with on_date. |
| after_submissions integer | integer | Close after this many submissions. Used with after_submissions. |
| message string | string | Text visitors see when the form is closed. Default: the Formstack message. |
Request
curl -X PUT https://cotlet.dev/api/v1/formstack/forms/5128834/availability \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"disable":"after_submissions","after_submissions":150,"message":"Registration is full."}' result = client.call("formstack", "set_form_availability", {"form_id":"5128834","disable":"after_submissions","after_submissions":150,"message":"Registration is full."}) const result = await cotlet.call('formstack', 'set_form_availability', {"form_id":"5128834","disable":"after_submissions","after_submissions":150,"message":"Registration is full."}); cotlet call formstack set_form_availability --data '{"form_id":"5128834","disable":"after_submissions","after_submissions":150,"message":"Registration is full."}' Example response
{
"form_id": "5128834",
"disable": "after_submissions",
"after_submissions": 150,
"message": "Registration is full.",
"folder": "Events"
}