# Get an app trigger

> The workflow step or genie it runs, the connection it watches, its tables with their record changes and filters, and whether it is on.

Source: https://docs.stacksync.com/api-reference/app-triggers/get_app_trigger

`GET https://api.stacksync.com/v1/workspaces/{workspace_id}/app-triggers/{app_trigger_id}`

- Operation: `get_app_trigger`
- Resource: App triggers
- Access: read-only

## Authentication

- `Authorization: Bearer <key>`: A workspace API key (workspace_…, created by a workspace owner under Workspace settings > Stacksync API) acts with editor rights on that workspace only; a user API key (user_…, created under Profile > Stacksync API) acts as that user in every workspace they belong to. POST, PUT and PATCH requests must send Content-Type: application/json. Every authentication failure answers 403.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | integer | Yes | The workspace. List the ones your key can reach with GET /v1/workspaces. |
| `app_trigger_id` | string (uuid) | Yes | The app trigger. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `region` | string (besg \| usnv) | Yes | Region of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them |

## Returns

### 200 OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `app_trigger_id` | string | Yes |  |
| `target` | object (AppTriggerTarget) | Yes | What runs on each change |
| `target.type` | string (workflow \| genie) | Yes |  |
| `target.id` | string | Yes | The workflow or the genie |
| `target.step_id` | string \| null | No | For a workflow: the sync trigger step that runs on each change (its workflow_module_instance_id) |
| `target.interface_id` | string \| null | No | For a genie: its Trigger interface (type app_trigger) |
| `connection_id` | string | Yes | The connection whose app is watched |
| `tables` | array of object (AppTriggerTable) | Yes | One entry per trigger: the table, its record changes, filters |
| `tables[].table_name` | string, at least 1 characters | Yes | A table of the connection's app, as the app's tables are listed for that connection (GET app schema; MCP: connections_tables) |
| `tables[].operations` | array of string (created \| updated \| deleted), at least 1 item | Yes | The record changes that run the target |
| `tables[].filters` | object (TriggerFilterGroup) | No | The conditions a changed record must meet, on the table's column names, as on a sync trigger. An empty `and` group matches every change |
| `tables[].filters.type` | string, default "group" | No | `group` |
| `tables[].filters.operator` | string (and \| or) | Yes | How the conditions combine |
| `tables[].filters.conditions` | array of object (TriggerFilterGroup) \| object (TriggerFilterCondition) | No | A list (never a single object): each entry is a condition or a nested group |
| `status` | string (on \| paused) | Yes |  |
| `region` | string (besg \| usnv) | Yes |  |

## Example request

```bash
curl -X GET "https://api.stacksync.com/v1/workspaces/{workspace_id}/app-triggers/{app_trigger_id}?region=besg" \
  -H "Authorization: Bearer $STACKSYNC_API_KEY"
```

## Example response (200)

```json
{
  "app_trigger_id": "<app_trigger_id>",
  "target": {
    "type": "workflow",
    "id": "<id>",
    "step_id": "<step_id>",
    "interface_id": "<interface_id>"
  },
  "connection_id": "<connection_id>",
  "tables": [
    {
      "table_name": "<table_name>",
      "operations": [
        "created"
      ],
      "filters": {
        "type": "group",
        "operator": "and"
      }
    }
  ],
  "status": "on",
  "region": "besg"
}
```

## Errors

| Status | Meaning | Body |
| --- | --- | --- |
| 400 | Bad Request | `{ "error": string, "msg": string, "field": string \| null }` |
| 403 | Forbidden | `{ "error": string, "msg": string, "field": string \| null }` |
| 404 | Not Found | `{ "error": string, "msg": string, "field": string \| null }` |

## Related

- [API Reference overview](https://docs.stacksync.com/api-reference): base URLs, regions, pagination, idempotency and errors
- [Authentication](https://docs.stacksync.com/api-reference/authentication): API keys and the 403 answers
- OpenAPI document: https://docs.stacksync.com/openapi.json
- [Create an app trigger](https://docs.stacksync.com/api-reference/app-triggers/create_app_trigger)
- [Update an app trigger](https://docs.stacksync.com/api-reference/app-triggers/update_app_trigger)
- [Delete an app trigger](https://docs.stacksync.com/api-reference/app-triggers/delete_app_trigger)