---
deprecated: true
search:
  tags:
    - subscriptions
    - POST
seo:
  description: >-
    Deprecated. This HTTPS ingest endpoint stays available until publishers
    finish moving… Reference for the POST /subscriptions endpoint in the ARD
    Eventhub API.
sidebar:
  label: Add a new subscription
  badge: POST
title: Add a new subscription
type: openapi-operation
---
Deprecated. This HTTPS ingest endpoint stays available until publishers finish moving to Eventhub Connect (MQTT), then it is removed.

`POST /subscriptions`

**Deprecated.**

**Request body** (`application/json`, required)

New event to be distributed to subscribers.

- `type` (string, required)
- `method` (string, required)
- `url` (string, required) — Publicly accessible URL that should receive the events
- `contact` (string, required) — Email address to be contacted in case of problems with this subscription
- `topic` (string, required) — ID of the topic to subscribe to

Request body example:

```json
{
  "type": "PUBSUB",
  "method": "PUSH",
  "url": "https://example.com/my/webhook/for/this/subscription",
  "contact": "my-emergency-and-notifications-contact@ard.de",
  "topic": "topic-id-to-subscribe-to"
}
```

**Responses**

- `201` — Subscription created
- `400` — Bad Request (invalid input)
- `401` — Missing authentication
- `403` — Invalid authorization
- `404` — Topic for subscription not found
- `413` — Payload Too Large (JSON body exceeds 400kb limit)
- `500` — Internal server error

Response example, 201:

```json
{
  "type": "PUBSUB",
  "method": "PUSH",
  "name": "de.ard.eventhub.subscription.subscription-id",
  "path": "projects/ard-eventhub/subscriptions/subscription-name",
  "topic": {
    "id": "urn:ard:permanent-livestream:topic-id",
    "name": "de.ard.eventhub.dev.urn%3Aard%3Apermanent-livestream%3Atopic-id",
    "path": "projects/ard-eventhub/topics/topic-name"
  },
  "ackDeadlineSeconds": 20,
  "retryPolicy": null,
  "serviceAccount": "name-of-service-account",
  "url": "https://example.com/my/webhook/for/this/subscription",
  "contact": "my-emergency-and-notifications-contact@ard.de",
  "institutionId": "urn:ard:institution:institution-id"
}
```
