---
title: "Create a subscription"
method: POST
path: "/spaces/{spaceId}/subscriptions"
tags: ["Manage Subscriptions"]
---

# Create a subscription

`POST /spaces/{spaceId}/subscriptions`

Creates a subscription.

## Path parameters

- `spaceId` string, required

## Request body

- Subscription — A subscription object that contains notification information.
  - `id` string — The uniques identifier for the subscription.
  - `source` string — The source for the subscribed notification (usually the space).
  - `destination` string — The destination for the subscribed notification.
  - `config` SubscriptionConfig — The subscription configuration.
    - `type` 'PER_FEATURE' | 'PER_TRANSACTION' | 'CONTENT_CHANGE' — The type of subscribed notification.
    - `params` object — The additional parameters of the subscription config
  - `status` object — The status of the subscription.
    - `state` string — The state of the subscription.
    - `stateReason` string — The reason for the current state.

## Response `201`

The subscription

- Subscription — A subscription object that contains notification information.
  - `id` string — The uniques identifier for the subscription.
  - `source` string — The source for the subscribed notification (usually the space).
  - `destination` string — The destination for the subscribed notification.
  - `config` SubscriptionConfig — The subscription configuration.
    - `type` 'PER_FEATURE' | 'PER_TRANSACTION' | 'CONTENT_CHANGE' — The type of subscribed notification.
    - `params` object — The additional parameters of the subscription config
  - `status` object — The status of the subscription.
    - `state` string — The state of the subscription.
    - `stateReason` string — The reason for the current state.

## Other responses

- `400` — Malformed or Bad Request.
- `401` — Unauthorized to perform the request.
- `403` — Forbidden request. Insufficient rights to perform the request.
- `409` — An error response which indicates a conflict.

## Changes

- **2023-07-03** `fb8e107462aa` — 2 warning
  - removed the request property `filter`
  - removed the optional property `filter` from the response with the `201` status

[Change history](https://skmtc.dev/here/apis/here-xyz-hub/changes/spaces/:spaceId/subscriptions/post.md)

---

[API](https://skmtc.dev/here/apis/here-xyz-hub.md) · [All operations](https://skmtc.dev/here/apis/here-xyz-hub/llms.txt) · [OpenAPI document](https://skmtc.dev/here/apis/here-xyz-hub/revisions/a5a97b4943e2?raw)
