---
title: "Create a new subscription"
method: POST
path: "/customers/my-subscriptions"
tags: ["Subscriptions"]
---

# Create a new subscription

`POST /customers/my-subscriptions`

Subscribes the authenticated user to a new notification type for a given site.

## Request body

- object
  - `notification_type` 'failed_payments' | 'expiring_soon' | 'new_signups' | 'revoked_mandate', required — The type of notification to subscribe to
  - `site_id` string, uuid, required — The site ID to subscribe to events for

## Response `201`

The subscription was successfully retrieved or created.

- object
  - `data` Subscription, required — A `Subscription` represents the authenticated user's opt-in to receive a particular notification (e.g. `failed_payments`, `expiring_soon`) for a specific `Site`.
    - `id` string, uuid, required — The ID of the subscription
    - `site_id` string, uuid, required — The site ID which this subscription relates to
    - `notification_type` 'failed_payments' | 'expiring_soon' | 'new_signups' | 'revoked_mandate', required — The type of notification this subscription is for
    - `created_at` string, date-time, required — The date-time when this subscription was created
    - `updated_at` string, date-time, required — The date-time when this subscription was last updated

## Other responses

- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `422` — The request didn't pass validation

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
