---
title: "Create a user subscription"
method: POST
path: "/v6/users/{user_id}/subscriptions"
tags: ["User Subscriptions"]
---

# Create a user subscription

`POST /v6/users/{user_id}/subscriptions`

Creates a new notification subscription for the specified user. The request body specifies the event type to subscribe to and the delivery channel (email, Slack, or webhook). Returns the created subscription.

## Path parameters

- `user_id` string, required

## Request body

- UserSubscriptionRequest
  - `channels` SubscriptionChannelRequest[]
    - union
      - EmailSubscriptionChannelRequest
        - `type` 'EMAIL', required
      - ExtoleClientSlackSubscriptionChannelRequest
        - `type` 'EXTOLE_CLIENT_SLACK', required
      - SlackSubscriptionChannelRequest
        - `type` 'SLACK', required
        - `webhook_url` string, required
      - ThirdPartyEmailSubscriptionChannelRequest
        - `type` 'THIRD_PARTY_EMAIL', required
        - `recipient` string, required
      - WebhookSubscriptionChannelRequest
        - `type` 'WEBHOOK', required
        - `webhook_id` string, required
  - `dedupe_duration_ms` integer
  - `filter_expression` union — Choose between static or dynamic filter expression
    - boolean — Static filter expression
    - string — Handlebars expression with [UserSubscriptionFilterContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/notification/subscription/UserSubscriptionFilterContext.d.ts).
    - string — Javascript expression with [UserSubscriptionFilterContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/notification/subscription/UserSubscriptionFilterContext.d.ts).
  - `filtering_level` 'ALL' | 'NONE' | 'NOTEWORTHY' | 'SOME', required
  - `having_all_tags` string[], required

## Response `200`

Successful response

- UserSubscriptionResponse
  - `channels` SubscriptionChannelResponse[], required
    - union
      - EmailSubscriptionChannelResponse
        - `id` string, required
        - `type` 'EMAIL', required
      - ExtoleClientSlackSubscriptionChannelResponse
        - `id` string, required
        - `type` 'EXTOLE_CLIENT_SLACK', required
      - SlackSubscriptionChannelResponse
        - `id` string, required
        - `type` 'SLACK', required
        - `webhook_url` string, required
      - ThirdPartyEmailSubscriptionChannelResponse
        - `id` string, required
        - `type` 'THIRD_PARTY_EMAIL', required
        - `recipient` string, required
      - WebhookSubscriptionChannelResponse
        - `id` string, required
        - `type` 'WEBHOOK', required
        - `webhook_id` string, required
  - `dedupe_duration_ms` integer, required
  - `filter_expression` union, required — The filter expression as configured: a literal value, or an expression (type:string) when defined dynamically.
    - boolean — Literal filter expression
    - string — Handlebars expression with [UserSubscriptionFilterContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/notification/subscription/UserSubscriptionFilterContext.d.ts).
    - string — Javascript expression with [UserSubscriptionFilterContext](https://github.com/extole/extole-specification/blob/main/openapi/expression-context/com/extole/api/notification/subscription/UserSubscriptionFilterContext.d.ts).
  - `filtering_level` 'ALL' | 'NONE' | 'NOTEWORTHY' | 'SOME', required
  - `having_all_tags` string[], required
  - `subscription_id` string, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required
- `403` — Forbidden
- `415` — Unsupported Media Type
- `429` — Too Many Requests

---

[API](https://skmtc.net/extole/apis/integration-api-server-to-extole.md) · [All operations](https://skmtc.net/extole/apis/integration-api-server-to-extole/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/extole/integration-api-server-to-extole/revisions/c16e62e66755/schema)
