---
title: Get 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**

# Get Event Subscription

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

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

Returns 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)%20get%20%3E%20(params)%20default%20%3E%20(param)%20subscription_id%20%3E%20(schema)>)

<details>

<summary>

query SubscriptionGetParams

</summary>

AccountID param.Field\[string]

A Resource identifier.

maxLength32

<a href="#(resource)%20queues.subscriptions%20%3E%20(method)%20get%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)%20get%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type SubscriptionGetResponse struct{…}

</summary>

ID string

Unique identifier for the subscription

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

<details>

<summary>

Destination SubscriptionGetResponseDestination

Destination configuration for the subscription

</summary>

QueueID string

ID of the target queue

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

Type SubscriptionGetResponseDestinationType

Type of destination

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

Source SubscriptionGetResponseSource

Source configuration for the subscription

</summary>

One of the following:

<details>

<summary>

type SubscriptionGetResponseSourceMqEventSourceImages struct{…}

</summary>

Type SubscriptionGetResponseSourceMqEventSourceImagesTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

type SubscriptionGetResponseSourceMqEventSourceKV struct{…}

</summary>

Type SubscriptionGetResponseSourceMqEventSourceKVTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

type SubscriptionGetResponseSourceMqEventSourceR2 struct{…}

</summary>

Type SubscriptionGetResponseSourceMqEventSourceR2TypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%202">Link to this property</a>

<details>

<summary>

type SubscriptionGetResponseSourceMqEventSourceSuperSlurper struct{…}

</summary>

Type SubscriptionGetResponseSourceMqEventSourceSuperSlurperTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%203">Link to this property</a>

<details>

<summary>

type SubscriptionGetResponseSourceMqEventSourceVectorize struct{…}

</summary>

Type SubscriptionGetResponseSourceMqEventSourceVectorizeTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%204">Link to this property</a>

<details>

<summary>

type SubscriptionGetResponseSourceMqEventSourceWorkersAIModel struct{…}

</summary>

ModelName stringOptional

Name of the Workers AI model

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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 SubscriptionGetResponseSourceMqEventSourceWorkersAIModelTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%205">Link to this property</a>

<details>

<summary>

type SubscriptionGetResponseSourceMqEventSourceWorkersBuildsWorker struct{…}

</summary>

Type SubscriptionGetResponseSourceMqEventSourceWorkersBuildsWorkerTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%206">Link to this property</a>

<details>

<summary>

type SubscriptionGetResponseSourceMqEventSourceWorkersScript struct{…}

</summary>

ScriptTag stringOptional

Tag of the Worker script

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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 SubscriptionGetResponseSourceMqEventSourceWorkersScriptTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(variant)%207">Link to this property</a>

<details>

<summary>

type SubscriptionGetResponseSourceMqEventSourceWorkflowsWorkflow struct{…}

</summary>

Type SubscriptionGetResponseSourceMqEventSourceWorkflowsWorkflowTypeOptional

Type of source

<a href="#(resource)%20queues.subscriptions%20%3E%20(model)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%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)%20SubscriptionGetResponse%20%3E%20(schema)>)

### Get 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.Get(
    context.TODO(),
    "023e105f4ecef8ad9ca31a8372d0c353",
    queues.SubscriptionGetParams{
      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
}
```