> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# forms_set_publish_settings

> Publish or unpublish a form, and turn response collection on or off. Both is_published and is_accepting_responses must be set when updating the publish state; accepting responses while unpublished is not supported. Legacy forms have no publish settings and are not supported.

<div className="tool-route"><span className="tool-row-method" data-method="POST">POST</span><code>{"https://forms.googleapis.com/v1/forms/{formId}:setPublishSettings"}</code></div>

```python gforms_forms_set_publish_settings.py theme={null}
from charter.packs import gforms

result = await gforms.forms_set_publish_settings.ainvoke({"formId": ..., "body": ...})
```

<Note>
  Requires `https://www.googleapis.com/auth/forms.body`. Costs 1 against the provider's own quota.
</Note>

## Path parameters

<div className="reference-table">
  | Field                                                          | Type     | Description                                                                           |
  | -------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------- |
  | `formId` <span className="required" title="required">\*</span> | `string` | Required. The ID of the form. You can get the id from the `formId` field of the Form. |
</div>

## Body

<div className="reference-table">
  | Field                                                        | Type                                                                                 | Description                    |
  | ------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------ |
  | `body` <span className="required" title="required">\*</span> | [SetPublishSettingsBody](/charter/charter/packs/gforms/forms/objects#setpublishsettingsbody) | The publish settings to apply. |
</div>
