# Delete a trigger (/en/docs/api/native/automation/deleteTrigger)





Delete the trigger and its firing history, returning 204. Runs already started are unaffected. Definition-managed triggers return 409 TRIGGER_MANAGED; remove schedule from the workflow and publish it again.

`DELETE /automation/v1/triggers/{id}`

## Authentication [#authentication]

`Authorization: Bearer $PRAXIS_API_KEY`

## Request fields [#request-fields]

| Parameter | Type | Description |
| --- | --- | --- |
| path: id | `string` | required; Trigger ID (trg_). |

## Examples [#examples]

[SDK installation and example environment](/en/docs/api/native/automation)

Set these environment variables to your own resources:

| Variable | Source |
| --- | --- |
| TRIGGER_ID | [Trigger id; resume before sending a webhook](/en/docs/api/native/automation/createTrigger) |

```bash
: "${TRIGGER_ID:?Set TRIGGER_ID}"
curl --fail-with-body -X DELETE "https://api.deepraxis.ai/automation/v1/triggers/${TRIGGER_ID}" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
```

```typescript
import { createAutomationClient } from '@deepraxis/sdk/automation';

function env(name: string): string {
  const value = process.env[name];
  if (!value) throw new Error(`Set ${name}`);
  return value;
}
const automation = createAutomationClient({
  apiKey: env('PRAXIS_API_KEY'),
  baseUrl: 'https://api.deepraxis.ai',
  maxRetries: 0,
  timeoutMs: 90_000,
});
const result = await automation.triggers.delete({
  "path": {
    "id": env("TRIGGER_ID")
  }
});
console.log(result);
```

## Response [#response]

### HTTP 204 [#http-204]

Deleted

### Measured response [#measured-response]

HTTP 204

```text

```

## Errors [#errors]

| HTTP | Codes and description |
| --- | --- |
| 400 | INVALID_PARAMS: Invalid request parameters, path, cursor, or body format. |
| 404 | TRIGGER_NOT_FOUND: The trigger does not exist or is inaccessible. Webhook authentication failures also use this code. |
| 409 | TRIGGER_MANAGED: The trigger is managed by a definition and cannot be modified directly. |
| default | RFC 9457 automation problem. 429 includes Retry-After. |

[Authentication and common errors](/en/docs/api/errors) · Retain the `X-Request-Id` response header for troubleshooting.
