# Trigger automation

POST

/

workflow

/

/

/

trigger

Trigger automation

```
curl --request POST \
  --url https://api.mintlify.com/v1/workflow/{projectId}/{workflowSchemaId}/trigger \
  --header 'Authorization: Bearer <token>'
```

:::code-group
```title="202"
{
  "schemaId": "<string>",
  "instanceId": "<string>",
  "jobId": "<string>"
}
```

```title="400"
{
  "error": "<string>"
}
```

```title="404"
{
  "error": "<string>"
}
```
:::

Use this endpoint to trigger a scheduled automation on demand, instead of waiting for its next scheduled run. The automation behaves identically to a regular scheduled run: it picks up everything that has changed since the last completed run. This endpoint only supports automations configured with a **Custom schedule** trigger. Requests for automations with other triggers, like **Code change** or **Content update**, return a `400` error.

## Use cases

- **CI/CD pipelines**: Run the **Update from code changes** automation on every merge to `main`, so docs update at your release cadence rather than on a fixed schedule.
- **Release events**: Run the **Draft changelog** automation when you cut a release tag, so the changelog drafts at the same time the release ships.
- **Custom tooling**: Trigger automations from internal tools, Slack commands, or scheduled jobs you already run.

## Example

Trigger an automation from a GitHub Action whenever code merges to `main`:

```yaml title=".github/workflows/trigger-docs.yml"
on:

  push:

    branches: [main]

jobs:

  trigger:

    runs-on: ubuntu-latest

    steps:

      - run: |

          curl -fsS -X POST \

            "https://api.mintlify.com/v1/workflow/$PROJECT_ID/$WORKFLOW_ID/trigger" \

            -H "Authorization: Bearer ${{ secrets.MINTLIFY_API_KEY }}"

        env:

          PROJECT_ID: ${{ vars.MINTLIFY_PROJECT_ID }}

          WORKFLOW_ID: ${{ vars.MINTLIFY_WORKFLOW_ID }}
```

## Rate limits

This endpoint shares a rate limit with [Trigger update](/guides/admin-update-trigger): up to 10 requests per 10 seconds per organization. Triggered runs consume credits at the same rate as scheduled runs.

#### Authorizations

Authorization

string

header

required

The Authorization header expects a Bearer token. Use an admin API key. This is a server-side secret key. Generate one on the [API keys page](https://app.mintlify.com/settings/organization/api-keys) in your dashboard.

#### Path Parameters

projectId

string

required

Your project ID. Can be copied from the [API keys](https://app.mintlify.com/settings/organization/api-keys) page in your dashboard.

workflowSchemaId

string

required

The ID of the automation to trigger. Can be copied from the automation's settings panel on the [Automations](https://app.mintlify.com/products/automations) page in your dashboard.

#### Response

Automation run queued successfully.

schemaId

string

The ID of the triggered automation.

instanceId

string

The ID of the queued automation run. Appears in the run history on the [Automation Runs](https://app.mintlify.com/products/automations) page.

jobId

string

The ID of the background job processing the run.

⌘I

## Related pages

- [Admin](./admin-index.md)
- [Agent](./agent-2-index.md)
- [Agent](./agent-index.md)
- [Agent-ready content](./agent-ready-content-index.md)
- [AI](./ai-index.md)
- [Analytics](./analytics-index.md)
- [API docs](./api-docs-index.md)
- [API reference](./api-reference-index.md)
- [Assistant](./assistant-2-index.md)
- [Assistant](./assistant-index.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
