# Delete Function Trigger

`DELETE /functions/{name}/triggers/{triggerId}` · Core · Compute & Automation

Permanently removes the EVENT trigger `triggerId` from the named function, so writes to its collection no longer invoke the function. A scheduled trigger's id is `404 K9O_TRIGGER_NOT_FOUND` here; delete schedules with `DELETE /@{projectSlug}/forge/schedules/{trgId}`. Requires `PROJECT_ADMIN`.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `name` | path | yes | The function's name. A module's operation is named `<module>:<operation>`. Example: `"greet"`. |
| `triggerId` | path | yes | The trigger's id, a UUID. Example: `"3f6c1e2a-8b4d-4c7e-9a1f-2d5b6c7e8f90"`. |
| `projectSlug` | path | yes | The project's slug: the path segment after `@`. It is unique within the org. Example: `"storefront"`. |

## Responses

- **204**: The trigger was deleted. No body.

## Errors

| HTTP | Code | When |
|---|---|---|
| 401 | `K9O_UNAUTHENTICATED` | The caller presented no authenticated session. |
| 400 | `K9O_INVALID_FIELD_VALUE` | The project slug, the function name or the trigger id is not a valid identifier. |
| 403 | `K9O_ACCESS_DENIED` | The caller has no access to this project. |
| 403 | `K9O_IAM_POLICY_DENIED` | The bound IAM policy ceiling denies deleting function triggers; the default floor is PROJECT_ADMIN. |
| 404 | `K9O_FUNCTION_NOT_FOUND` | No function with that name exists in this project, or it is retired. |
| 404 | `K9O_TRIGGER_NOT_FOUND` | No event trigger with that id is attached to this function (a scheduled trigger's id is not found here). |

## Code samples

### cURL

```bash
curl -X DELETE 'https://<org>.api-<region>.k9o.io/@storefront/functions/<name>/triggers/<triggerId>' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/functions/<name>/triggers/<triggerId>', {
  method: 'DELETE',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`
  },
});
const { data, meta } = await res.json();
```

### k9o CLI

```bash
k9o function trigger delete <function> <trigger-id>
```

### @k9o/core

```typescript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.functions.triggers.delete('greet', '3f6c1e2a-8b4d-4c7e-9a1f-2d5b6c7e8f90')
```

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.functions.triggers.delete("greet", "3f6c1e2a-8b4d-4c7e-9a1f-2d5b6c7e8f90")
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.Functions.Triggers.Delete(ctx, "greet", "3f6c1e2a-8b4d-4c7e-9a1f-2d5b6c7e8f90")
```

### k9o

```rust
// let k9o = Client::new(ClientOpts { org_slug: "playground".into(), project_slug: "storefront".into(), api_key: "k9o_…".into() })?;
let resp = k9o.functions.triggers.delete("greet", "3f6c1e2a-8b4d-4c7e-9a1f-2d5b6c7e8f90").await?
```

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.functions().triggers().delete("greet", "3f6c1e2a-8b4d-4c7e-9a1f-2d5b6c7e8f90")
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.Functions.Triggers.DeleteAsync("greet", "3f6c1e2a-8b4d-4c7e-9a1f-2d5b6c7e8f90")
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.functions.triggers.delete("greet", "3f6c1e2a-8b4d-4c7e-9a1f-2d5b6c7e8f90")
```

### k9o/sdk

```php
// $k9o = K9oClient::create(['org_slug' => 'playground', 'project_slug' => 'storefront', 'api_key' => 'k9o_…']);
$response = $k9o->functions->triggers->delete('greet', '3f6c1e2a-8b4d-4c7e-9a1f-2d5b6c7e8f90')
```


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/delete-function-trigger
