---
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.
  - `filter` SubscriptionFilters — Filter criteria for subscription notifications.
    - `jsonPath` string — The JSON path expression to filter features on.
    - `spatialFilter` SpatialFilter — A spatial filter to filter features based on their geometric properties.
      - `geometry` Geometry — A Geometry object represents points, curves, and surfaces in coordinate space.
        - `type` string, required
        - `bbox` number[] — Describes the coordinate range of the GeoJSON object.
      - `radius` integer — Radius in meters which defines the diameter of the search request.
      - `clip` boolean — If set to true the features' geometries are clipped to the geometry of the tile, bounding box or input geometry. Default is false.

## 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.
  - `filter` SubscriptionFilters — Filter criteria for subscription notifications.
    - `jsonPath` string — The JSON path expression to filter features on.
    - `spatialFilter` SpatialFilter — A spatial filter to filter features based on their geometric properties.
      - `geometry` Geometry — A Geometry object represents points, curves, and surfaces in coordinate space.
        - `type` string, required
        - `bbox` number[] — Describes the coordinate range of the GeoJSON object.
      - `radius` integer — Radius in meters which defines the diameter of the search request.
      - `clip` boolean — If set to true the features' geometries are clipped to the geometry of the tile, bounding box or input geometry. Default is false.

## 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.

---

[API](https://skmtc.net/here/apis/here-xyz-hub.md) · [All operations](https://skmtc.net/here/apis/here-xyz-hub/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/here/here-xyz-hub/revisions/1c6c6a2bcac9/schema)
