Skip to content

Subscriptions

Use these endpoints to create, view, and manage Subscriptions. Subscriptions provide Partners with the ability to subscribe to Events. Once subscribed, Events will be sent to the specified URL.

Create Subscription

Request

This endpoint creates a new webhook subscription to receive real-time notifications for specified events.

The request body requires a CreateSubscriptionRequest object, which includes the url for the webhook, the events to subscribe to, and a shared_secret for verifying request signatures.

Security
CodeBearer(Required scopes: subscriptions.write)
Bodyapplication/jsonrequired
descriptionstring(Description)

A description of the webhook's intended use.

Default:""
eventsArray of strings, non-empty(Events)required

Which types of events this webhook should be invoked for.

urlstring, (uri), [ 1 .. 2083 ] characters(Url)required

The webhook URL to invoke.

retry_policyRetryPolicy (object) or null
Any of:

The retry policy to use if Jiko encounters HTTP errors when calling subscription URLs.

shared_secretstring, >= 16 characters(Shared Secret)required

The shared secret used by the Partner API to sign requests made to the webhook. The shared secret needs to be minimum 16 characters long.

curl -i -X POST \
  https://api.business.jiko.io/api/v1/subscriptions/ \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "description": "",
    "events": [
      "string"
    ],
    "url": "http://example.com",
    "retry_policy": {
      "retry_on_status_codes": [
        0
      ],
      "backoff_coefficient": 1,
      "maximum_attempts": 1,
      "initial_interval_seconds": 30,
      "maximum_interval_seconds": 300
    },
    "shared_secret": "stringstringstri"
  }'

Responses

Successful Response

Bodyapplication/json
any
Response
// No response example