Skip to content

Create a Subscriber

Request

Creates a new Subscriber.
Main purpose of Subscriber is to create a record to which later one or many subscriptions can be added. One Subscriber can have multiple methods of communication associated with it.
It also allows to set SAML NameID that can be then used to recognize Subscriber after sign-in into protected Hub Page.

Security
ApiKeyAuth
Path
subdomainstringrequired

Unique subdomain of requested Hub.

Query
api_versionstring

Api version

Value:"V3-R1"
Bodyapplication/json
idp_idstring or null

Identifier used to authenticate the subscriber for private Hubs that use authorization method providing user ID. For example for SAML protected Hubs.

Example:"internal-identifier-at-company.com"
subscriptionsArray of objects, non-emptyrequired
curl -i -X POST \
  'https://subdomain-of-your-account.app.statushub.io/api/v3/hubs/{subdomain}/subscribers?api_version=V3-R1' \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "idp_id": "internal-identifier-at-company.com",
    "subscriptions": [
      {
        "address": "example@statushub.com",
        "method_name": "email",
        "services_selection": {
          "all": false,
          "service_ids": [
            449,
            24221,
            2
          ]
        },
        "configuration": {
          "content_type": "application/json"
        },
        "label": "Responsible person name",
        "less_verbose": true,
        "protected": false,
        "subscriber_id": 9
      }
    ]
  }'

Responses

OK

Bodyapplication/json
idinteger, >= 1
Example:67
idp_idstring or null

Identifier used to authenticate the subscriber for private Hubs that use authorization method providing user ID. For example for SAML protected Hubs.

Example:"internal-identifier-at-company.com"
flagsobject
created_atstring, (date-time)

Timestamp of record creation.
ISO8601 formatted time (UTC).

Example:"2020-09-01T08:29:00Z"
updated_atstring, (date-time)

Timestamp of last modification of record.
ISO8601 formatted time (UTC).

Example:"2020-09-01T08:29:00Z"
Response
{ "id": 67, "idp_id": "internal-identifier-at-company.com", "flags": { "deleted": false }, "created_at": "2020-09-01T08:29:00Z", "updated_at": "2020-09-01T08:29:00Z" }