# `Twilio.Events.V1.SubscriptionService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/events/v1/subscription_service.ex#L2)

Subscription to send Event Types to a Sink

Operations: `list`, `create`, `fetch`, `update`, `delete`

# `create`

```elixir
@spec create(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Events.V1.Subscription.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Create a new Subscription.

Operation: `CreateSubscription` | Tags: EventsV1Subscription

## Required Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `Description` | string | A human readable description for the Subscription **This value should not contain PII.** |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `SinkSid` | string | The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. |
| `Types` | array | An array of objects containing the subscribed Event Types |

# `delete`

```elixir
@spec delete(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
```

Delete a specific Subscription.

Operation: `DeleteSubscription` | Tags: EventsV1Subscription

# `fetch`

```elixir
@spec fetch(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Events.V1.Subscription.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Fetch a specific Subscription.

Operation: `FetchSubscription` | Tags: EventsV1Subscription

# `list`

```elixir
@spec list(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Retrieve a paginated list of Subscriptions belonging to the account used to make the request.

Operation: `ListSubscription` | Tags: EventsV1Subscription

## Query Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `SinkSid` | string | The SID of the sink that the list of Subscriptions should be filtered by. |

# `stream`

```elixir
@spec stream(Twilio.Client.t(), map(), keyword()) :: Enumerable.t()
```

Stream: Retrieve a paginated list of Subscriptions belonging to the account used to make the request. (lazy auto-pagination).

# `update`

```elixir
@spec update(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Events.V1.Subscription.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Update a Subscription.

Operation: `UpdateSubscription` | Tags: EventsV1Subscription

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `Description` | string | A human readable description for the Subscription. |

---

*Consult [api-reference.md](api-reference.md) for complete listing*
