> ## Documentation Index
> Fetch the complete documentation index at: https://university.triggr-app.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API keys and webhooks

> Create Triggr Public API keys and event webhooks from Studio, and find the API reference under Tools.

Studio's API Keys and Webhooks pages manage the same keys and webhooks as Triggr Core's Settings > API and Webhooks: one Public API at `https://api.triggr-app.com/api/v1` for your whole organisation. Only organisation admins can see or change them. Scopes, retries and signature checks are in [API and webhooks](/core/manage/api-and-webhooks).

<Frame caption="API keys and webhooks: create a scoped key, find the API reference and add a signed webhook (1:25).">
  <video controls preload="none" playsInline className="w-full aspect-video rounded-xl" poster="/images/videos/studio-api-webhooks.jpg" src="https://mintcdn.com/triggr/GxrCQFDFNLmEMyJ1/images/videos/studio-api-webhooks.mp4?fit=max&auto=format&n=GxrCQFDFNLmEMyJ1&q=85&s=fe872fcc861657c9a61da51d7e9da408" data-path="images/videos/studio-api-webhooks.mp4" />
</Frame>

## Create an API key

<Steps>
  <Step title="Open API Keys">
    Go to **Settings > API Keys** and click **Create Key**.

    <Frame>
      <img src="https://mintcdn.com/triggr/XztmSfsoAUpshfIO/images/studio/settings/api-keys-list.png?fit=max&auto=format&n=XztmSfsoAUpshfIO&q=85&s=228f9a8b264cb1c3745d7e138d7b5651" alt="The API Keys page with Refresh and Create Key buttons and three keys: Client portal with the executions:manage scope and PSA status sync, both Active with Roll and Revoke, and Old reporting script, Revoked." width="2368" height="942" data-path="images/studio/settings/api-keys-list.png" />
    </Frame>
  </Step>

  <Step title="Name it and choose scopes">
    Enter a **Key Name** that says where it's used. Every key can read your clients, forms, workflows and runs; tick a scope only if the key needs more, then click Create Key.

    <Frame>
      <img src="https://mintcdn.com/triggr/XztmSfsoAUpshfIO/images/studio/settings/api-keys-create.png?fit=max&auto=format&n=XztmSfsoAUpshfIO&q=85&s=9bc4b5e91e1896fdc03ac0e094d9fb9e" alt="The Create API Key dialog with Key Name Client portal, a note that every key can list clients, forms, workflows, executions and Core requests, and Scopes Run Core forms natively, Configure Core workflows and Act on running work, with Act on running work ticked." width="1024" height="1412" data-path="images/studio/settings/api-keys-create.png" />
    </Frame>
  </Step>

  <Step title="Copy the key">
    Click **Copy** next to Your API Key and store it in your portal or password manager. Studio shows it once, and it expires after a year.

    <Frame>
      <img src="https://mintcdn.com/triggr/XztmSfsoAUpshfIO/images/studio/settings/api-keys-created.png?fit=max&auto=format&n=XztmSfsoAUpshfIO&q=85&s=1dbc4ed035cd1be5301b0f31e081c86a" alt="The API Key Created Successfully dialog warning Copy this key now. You won't be able to see it again!, a sample tpk_ key with a Copy button, an expiry date, an Example Request curl command for /api/v1/forms, and the scope executions:manage." width="1152" height="864" data-path="images/studio/settings/api-keys-created.png" />
    </Frame>
  </Step>
</Steps>

Act on running work (`executions:manage`) lets the key approve or reject approvals, complete manual steps, and cancel or retry runs. Roll issues a new key and keeps the old one working for the grace period you pick (1, 24 or 72 hours); Revoke stops it at once.

## Explore the API

Tools > Developer API documents every endpoint with code samples, links to the OpenAPI (JSON) file, and ends with Try it, which sends real requests with a key you paste in.

<Frame>
  <img src="https://mintcdn.com/triggr/XztmSfsoAUpshfIO/images/studio/settings/developer-api.png?fit=max&auto=format&n=XztmSfsoAUpshfIO&q=85&s=02c0b199bb756202278b93427edf5b60" alt="The Triggr Public API page with API Keys and OpenAPI (JSON) buttons, the base URL https://api.triggr-app.com, an On this page list from Getting started to Webhooks, and the Getting started section showing the Authorization: Bearer tpk_ header." width="2352" height="1040" data-path="images/studio/settings/developer-api.png" />
</Frame>

Send the key as a bearer token:

```bash theme={null}
curl -H "Authorization: Bearer tpk_..." "https://api.triggr-app.com/api/v1/workflows"
```

Every key can embed a Studio form as an already-signed-in user (Embedding Studio forms). To start a workflow from your own system, use the workflow's [Webhook trigger](/studio/workflows/triggers#webhook). For AI coding tools, use an [MCP token](/studio/mcp) instead.

## Add a webhook

For example, send every failed Studio run to your PSA so someone picks it up.

<Steps>
  <Step title="Add the endpoint">
    Go to **Settings > Webhooks** and click **Add Webhook**. Enter an https **Endpoint URL** on a public host, tick the Events you want (or All events) and click Add Webhook.

    <Frame>
      <img src="https://mintcdn.com/triggr/XztmSfsoAUpshfIO/images/studio/settings/webhooks-add.png?fit=max&auto=format&n=XztmSfsoAUpshfIO&q=85&s=af4c5afddb05f62ab9762be54d480610" alt="The Add Webhook dialog with Endpoint URL https://portal.yourmsp.com/hooks/triggr, Description Portal notifications, All events unticked, and execution.completed and execution.failed ticked among sixteen events." width="1024" height="1372" data-path="images/studio/settings/webhooks-add.png" />
    </Frame>
  </Step>

  <Step title="Copy the signing secret">
    Click **Copy** next to Signing secret and store it where your endpoint can read it. Studio shows it once.

    <Frame>
      <img src="https://mintcdn.com/triggr/XztmSfsoAUpshfIO/images/studio/settings/webhooks-secret.png?fit=max&auto=format&n=XztmSfsoAUpshfIO&q=85&s=5e2183148900e8838b1fdbb8a3e41238" alt="The Webhook added dialog warning the signing secret is shown once, a sample whsec_ secret with a Copy button, and a note that each delivery carries an X-Triggr-Signature header." width="1152" height="808" data-path="images/studio/settings/webhooks-secret.png" />
    </Frame>
  </Step>

  <Step title="Send a test">
    Click **Test** on the webhook's row; a toast reports your endpoint's answer. Deliveries lists what was sent, with Redeliver on each.

    <Frame>
      <img src="https://mintcdn.com/triggr/XztmSfsoAUpshfIO/images/studio/settings/webhooks-list.png?fit=max&auto=format&n=XztmSfsoAUpshfIO&q=85&s=8e96be3dc12abb6d391cd8c3e73ef392" alt="The Webhooks page listing two Active endpoints on yourmsp.com, one for execution.completed and execution.failed and one for all events, with Last delivery, Registered by, and Test, Rotate secret, Deliveries and Delete buttons." width="2368" height="1128" data-path="images/studio/settings/webhooks-list.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/triggr/XztmSfsoAUpshfIO/images/studio/settings/webhooks-deliveries.png?fit=max&auto=format&n=XztmSfsoAUpshfIO&q=85&s=e5ed1bfe421d1b319dcb3b816a5a1411" alt="The Recent deliveries dialog for https://portal.yourmsp.com/hooks/triggr listing execution.completed, execution.failed and ping deliveries, each delivered with an HTTP 200 or 204 code and a Redeliver button." width="1792" height="650" data-path="images/studio/settings/webhooks-deliveries.png" />
    </Frame>
  </Step>
</Steps>

| Event | Sent when |
| - | - |
| `execution.completed`, `execution.failed` | A Studio or Core run finishes or fails. |
| `approval.requested`, `approval.decided`, `approval.expired` | An approval is created, decided or expires. |
| `manual_step.created`, `manual_step.completed`, `manual_step.cancelled` | A manual step is created, completed or cancelled. |
| `form.created`, `form.updated`, `form.deleted` | A Studio form changes. |
| `client.created`, `client.updated`, `client.deleted` | A client changes. |
| `core.request.submitted`, `core_form.updated` | A Core form is submitted, or its settings change. |

Check each delivery's `X-Triggr-Signature` as shown in [Verify the signature](/core/manage/api-and-webhooks#verify-the-signature).

## Troubleshooting

<AccordionGroup>
  <Accordion title="“Only organisation admins can view or manage API keys.”">
    Ask an organisation admin to create the key or webhook, or to change your role.
  </Accordion>

  <Accordion title="Webhooks is missing from Settings">
    The page shows only for organisation admins.
  </Accordion>

  <Accordion title="Test says the ping wasn't delivered">
    The URL must be https on a public host and answer within 15 seconds without redirecting. Fix the endpoint, then click Test again.
  </Accordion>

  <Accordion title="A webhook shows Disabled">
    It failed too many deliveries in a row. Fix the endpoint and click **Enable** on its row.
  </Accordion>

  <Accordion title="401 “invalid or expired key”">
    The key is mistyped, revoked or over a year old: create a new one. `missing authorization header` means the request didn't send `Authorization: Bearer tpk_...`.
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.