# Delete a sync trigger

> Remove a trigger from a sync, with its stored action.

Source: https://docs.stacksync.com/api-reference/syncs/triggers/delete_sync_trigger

`DELETE https://api.stacksync.com/v1/workspaces/{workspace_id}/bases/{base_id}/triggers/{trigger_id}`

- Operation: `delete_sync_trigger`
- Resource: Sync triggers
- Access: writes data

## 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 the resources belong to |
| `base_id` | string (uuid) | Yes | The sync (a sync is called a base in these paths) |
| `trigger_id` | string | Yes | The trigger to delete |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `region` | string (besg \| usnv) | Yes | Data region of the sync |

## Returns

### 200 The trigger deleted

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `msg` | string | Yes | What was done |

## Example request

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

## Example response (200)

```json
{
  "msg": "Trigger deleted successfully"
}
```

## Errors

| Status | Meaning | Body |
| --- | --- | --- |
| 400 | The `region` is missing or not one of besg, usnv; `base_id` is not a UUID; the trigger could not be deleted (`Error deleting trigger`) | `{ "error": string }` |
| 403 | Forbidden: invalid API key, API key of another workspace, insufficient scope, workspace unavailable, or a non-GET request without `Content-Type: application/json` | `{ "error": string }` |
| 404 | No trigger of the sync has this id | `{ "msg": string }` |

## 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
- [List sync triggers](https://docs.stacksync.com/api-reference/syncs/triggers/list_sync_triggers)
- [Get a sync trigger](https://docs.stacksync.com/api-reference/syncs/triggers/get_sync_trigger)
- [Create a sync trigger](https://docs.stacksync.com/api-reference/syncs/triggers/create_sync_trigger)
- [Update a sync trigger](https://docs.stacksync.com/api-reference/syncs/triggers/update_sync_trigger)
- [Pause or resume a sync trigger](https://docs.stacksync.com/api-reference/syncs/triggers/update_sync_trigger_status)