# Using Public Actions

This guide is for administrators who set up public submit actions, send their results to other systems and keep an eye on delivery. Every step uses the labels you see on screen. Public Actions is for controlled integrations, not everyday page editing, so ask a developer to register handlers and to set anything this guide says is not on the form.

## Using Public Actions (administrator how-to)

### How to create a public action

1. Go to **System**, then **Public actions**, and choose to create a new action.
2. Give it a unique **Key** and a **Name**, then choose the **Handler** that will process each submission.
3. Set the **Site scope** when the action belongs to one site.
4. Add a **Success message** and a **Failure message**, or a **Success redirect URL** and a **Failure redirect URL**. A redirect can send a visitor to another website, so check each address.
5. Choose whether to turn on **Expose to API** or **Expose to Zapier** so a connected tool can use the action.
6. Describe the expected fields under **Payload schema**. A developer should confirm the structure, because an action without valid fields rejects every submission.
7. Set **Status** to **Active** only when the handler and destinations are ready. Use **Paused** to stop an action for a while and **Archived** when it should no longer accept submissions.

### How to send results to another system

1. Open the destinations list and create a destination for the action that should send results.
2. Choose its **Adapter**, then enter the **Endpoint URL**. Add a **Secret** if the receiving system verifies signatures, and any **Headers** it needs.
3. Set the **Status** to **Active** when you are ready. Pausing a destination stops new deliveries but does not cancel one that is already queued.
4. Keep credentials out of **Settings**: only the endpoint, secret and headers are stored encrypted.

Deliveries are sent in the background, so a queue worker must be running.

### How to create and revoke an integration token

1. Open the integration tokens list and choose **Create token**.
2. Name the token, choose the **Provider** (**Zapier** or **API**) and the site scope, then grant only the **Abilities** the tool needs: **List actions**, **Submit actions** or **Read submissions**.
3. Copy the token from the notification straight away. It is shown once and cannot be shown again.
4. When the tool is no longer trusted or needed, choose **Revoke**.

**Read submissions** returns the submitted values, so grant it only to tools that need them. The list does not show a token's site or abilities later, so note what you granted. If you are unsure, revoke the token and issue a new one.

### How to check that a submission was handled

1. Open the submissions list. Each row shows whether it is **Received**, **Handled** or **Failed**.
2. **Handled** means the handler finished. It does not mean every destination accepted the delivery.
3. Open the dispatch attempts list to see each delivery with its status: **Pending**, **Succeeded**, **Failed** or **Retryable**.
4. For a delivery that is pending, retryable or failed, choose **Replay** to send it again once with the destination's current settings. Replay can repeat an effect in the other system, so check what was delivered first.

Submitted values and error text are withheld in these screens to protect the data. Rejected spam, invalid or throttled requests never create a submission, so these lists are not a full request log.

### How to retire an action or destination

Deleting an action permanently removes its destinations, submissions and delivery history. Deleting a destination keeps the submissions and history but unlinks them from it. If you may need the record, set the action to **Archived** or the destination to **Paused** instead.

## Rolling out Public Actions (for owners)

### Turn on first

- One action with one destination, left **Paused** until the receiving system has been tested end to end.

### Add when needed

| Need                                 | Use                                                |
| ------------------------------------ | -------------------------------------------------- |
| Let a tool such as Zapier trigger it | **Expose to Zapier** and an integration token      |
| Let your own software call it        | **Expose to API** and an integration token         |
| Forward results to another system    | A destination with an endpoint, adapter and secret |

### Don't enable yet

- Don't make an action **Active** before its handler is registered and its payload fields are checked.
- Don't grant **Read submissions** to a tool that only needs to send data.

### Who does what

| Role          | First useful screen                                      |
| ------------- | -------------------------------------------------------- |
| Administrator | **Public actions**: create the action and set its status |
| Integrator    | Handler, payload schema and trusted secrets              |
| Site owner    | Decide what data to collect and how long to keep it      |

## Troubleshooting for administrators

| What you see                                   | What it means                                              | What to do                                                     |
| ---------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- |
| Every submission is rejected                   | The action has no valid payload fields                     | Ask a developer to check the payload schema                    |
| A submission shows **Failed** with no delivery | The handler is no longer registered                        | Ask a developer to restore the handler, then retry             |
| A delivery stays **Pending**                   | The queue worker is not running, or the adapter is missing | Start the worker and check failed queue jobs                   |
| A delivery is **Retryable** or **Failed**      | The receiving system refused or could not be reached       | Fix the destination, then choose **Replay**                    |
| A tool cannot see an action                    | The action is not **Active** or not exposed to that tool   | Check **Status** and **Expose to API** or **Expose to Zapier** |
| A token no longer works                        | It was revoked                                             | Create a new token and update the tool                         |