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

write Confirm

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

Parameters: set_form_availability
NameTypeDescription
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
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."}'
Python
result = client.call("formstack", "set_form_availability", {"form_id":"5128834","disable":"after_submissions","after_submissions":150,"message":"Registration is full."})
Node.js
const result = await cotlet.call('formstack', 'set_form_availability', {"form_id":"5128834","disable":"after_submissions","after_submissions":150,"message":"Registration is full."});
CLI
cotlet call formstack set_form_availability --data '{"form_id":"5128834","disable":"after_submissions","after_submissions":150,"message":"Registration is full."}'

Example response

JSON

{
  "form_id": "5128834",
  "disable": "after_submissions",
  "after_submissions": 150,
  "message": "Registration is full.",
  "folder": "Events"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.