---
title: Delete Event Subscription
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Queues](https://developers.cloudflare.com/api/go/resources/queues)

[Subscriptions](https://developers.cloudflare.com/api/go/resources/queues/subresources/subscriptions)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Delete Event Subscription

client.Queues.Subscriptions.Delete(ctx, subscriptionID, body) (\*[SubscriptionDeleteResponse](<https://developers.cloudflare.com/api/go/resources/queues#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/event\_subscriptions/subscriptions/{subscription\_id}

Deletes an existing Queue event subscription.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Queues Write``Workers Scripts Write`

##### ParametersExpand Collapse

subscriptionID string

A Resource identifier.

maxLength32

[Link to this property](<#(resource)%20queues.subscriptions%20%3E%20(method)%20delete%20%3E%20(params)%20default%20%3E%20(param)%20subscription_id%20%3E%20(schema)>)

<details>

<summary>

body SubscriptionDeleteParams

</summary>

AccountID param.Field\[string]

A Resource identifier.

maxLength32

<a href="#(resource)%20queues.subscriptions%20%3E%20(method)%20delete%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20queues.subscriptions%20%3E%20(method)%20delete%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type SubscriptionDeleteResponse struct{…}

</summary>

ID string

Unique identifier for the subscription

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedAt Time

When the subscription was created

formatdate-time

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

<details>

<summary>

Destination SubscriptionDeleteResponseDestination

Destination configuration for the subscription

</summary>

QueueID string

ID of the target queue

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20destination%20%3E%20(property)%20queue_id">Link to this property</a>

Type SubscriptionDeleteResponseDestinationType

Type of destination

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20destination%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20destination">Link to this property</a>

Enabled bool

Whether the subscription is active

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

Events \[]string

List of event types this subscription handles

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20events">Link to this property</a>

ModifiedAt Time

When the subscription was last modified

formatdate-time

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20modified_at">Link to this property</a>

Name string

Name of the subscription

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

Source SubscriptionDeleteResponseSource

Source configuration for the subscription

</summary>

One of the following:

<details>

<summary>

type SubscriptionDeleteResponseSourceMqEventSourceImages struct{…}

</summary>

Type SubscriptionDeleteResponseSourceMqEventSourceImagesTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%200%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

type SubscriptionDeleteResponseSourceMqEventSourceKV struct{…}

</summary>

Type SubscriptionDeleteResponseSourceMqEventSourceKVTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%201%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

type SubscriptionDeleteResponseSourceMqEventSourceR2 struct{…}

</summary>

Type SubscriptionDeleteResponseSourceMqEventSourceR2TypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%202%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%202">Link to this property</a>

<details>

<summary>

type SubscriptionDeleteResponseSourceMqEventSourceSuperSlurper struct{…}

</summary>

Type SubscriptionDeleteResponseSourceMqEventSourceSuperSlurperTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%203%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%203">Link to this property</a>

<details>

<summary>

type SubscriptionDeleteResponseSourceMqEventSourceVectorize struct{…}

</summary>

Type SubscriptionDeleteResponseSourceMqEventSourceVectorizeTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%204%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%204">Link to this property</a>

<details>

<summary>

type SubscriptionDeleteResponseSourceMqEventSourceWorkersAIModel struct{…}

</summary>

ModelName stringOptional

Name of the Workers AI model

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%205%20%3E%20(property)%20model_name">Link to this property</a>

Type SubscriptionDeleteResponseSourceMqEventSourceWorkersAIModelTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%205%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%205">Link to this property</a>

<details>

<summary>

type SubscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorker struct{…}

</summary>

Type SubscriptionDeleteResponseSourceMqEventSourceWorkersBuildsWorkerTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%206%20%3E%20(property)%20type">Link to this property</a>

WorkerName stringOptional

Name of the worker

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%206%20%3E%20(property)%20worker_name">Link to this property</a>

</details>

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%206">Link to this property</a>

<details>

<summary>

type SubscriptionDeleteResponseSourceMqEventSourceWorkersScript struct{…}

</summary>

ScriptTag stringOptional

Tag of the Worker script

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%207%20%3E%20(property)%20script_tag">Link to this property</a>

Type SubscriptionDeleteResponseSourceMqEventSourceWorkersScriptTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%207%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%207">Link to this property</a>

<details>

<summary>

type SubscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflow struct{…}

</summary>

Type SubscriptionDeleteResponseSourceMqEventSourceWorkflowsWorkflowTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%208%20%3E%20(property)%20type">Link to this property</a>

WorkflowName stringOptional

Name of the workflow

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%208%20%3E%20(property)%20workflow_name">Link to this property</a>

</details>

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%208">Link to this property</a>

</details>

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)%20%3E%20(property)%20source">Link to this property</a>

</details>

[Link to this property](<#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionDeleteResponse%20%3E%20(schema)>)

### Delete Event Subscription

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/queues"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  subscription, err := client.Queues.Subscriptions.Delete(
    context.TODO(),
    "023e105f4ecef8ad9ca31a8372d0c353",
    queues.SubscriptionDeleteParams{
      AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", subscription.ID)
}
```

200 example

```
{
  "errors": [
    {
      "code": 7003,
      "message": "No route for the URI",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    "string"
  ],
  "result": {
    "id": "id",
    "created_at": "2019-12-27T18:11:19.117Z",
    "destination": {
      "queue_id": "queue_id",
      "type": "queues.queue"
    },
    "enabled": true,
    "events": [
      "string"
    ],
    "modified_at": "2019-12-27T18:11:19.117Z",
    "name": "name",
    "source": {
      "type": "images"
    }
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 7003,
      "message": "No route for the URI",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    "string"
  ],
  "result": {
    "id": "id",
    "created_at": "2019-12-27T18:11:19.117Z",
    "destination": {
      "queue_id": "queue_id",
      "type": "queues.queue"
    },
    "enabled": true,
    "events": [
      "string"
    ],
    "modified_at": "2019-12-27T18:11:19.117Z",
    "name": "name",
    "source": {
      "type": "images"
    }
  },
  "success": true
}
```