Update Subscriptions

Update the subscription scopes for webhooks

Use this API call if you want to update your webhook subscriptions.

API ENDPOINT

https://uat-api.synapsefi.com/v3.1/subscriptions/:subscription_id

PATH PARAMETER

subscription_id :
required
string

ID of the subscription

BODY PARAMETER

is_active :
boolean

This lets you toggle the subscription as active and inactive

url :
string

URL for the webhooks

scope :
array of strings

Scope of the subscription

EXAMPLE REQUEST

You cannot delete subscriptions. However, to unsubscribe from webhooks, set "is_active": false.

PATCH /v3.1/subscriptions/589b6adec83e17002122196c HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267
Content-Type: application/json

{
  "is_active": false
}
subs_id = '589b6adec83e17002122196c'
body = {
  'url': 'https://requestb.in/zp216zzp'
  'scope': [
    "USERS|POST",
    "USER|PATCH",
    "NODES|POST",
    ...
  ]
}

subs = client.update_subscription(subs_id, body)
const subscriptionID = '589b6adec83e17002122196c';
const body = {
  'url': 'https://requestb.in/zp216zzp'
  'scope': [
    "USERS|POST",
    "USER|PATCH",
    "NODES|POST",
    ...
  ]
};

client.updateSubscription(subscriptionID, body);
subscription_id= "589b6adec83e17002122196c"
payload= {
  "is_active": false
}

client.update_subscription(subscription_id: subscription_id, body: payload)
$body= (object) [
     'scope' => $scope_arr,
     'is_active' => false,
     'url' => 'https://requestb.in/zp216zzp'
];
$subscriptionid = '589b6adec83e17002122196c';

$client->update_subscription( $subscriptionid, $body );
subscriptionID := "589b6adec83e17002122196c"
body := `{
    "scope": [
        "USERS|POST",
        "USER|PATCH",
        "NODES|POST",
        ...
      ]
    }`

data, err := client.update_subscription(subscriptionID, body)

EXAMPLE RESPONSE

{
    "_id": "589b6adec83e17002122196c",
    "_links": {
        "self": {
            "href": "https://uat-api.synapsefi.com/v3.1/subscriptions/589b6adec83e17002122196c"
        }
    },
    "_v": 2,
    "client_id": "589acd9ecb3cd400fa75ac06",
    "is_active": false,
    "scope": [
        "USERS|POST",
        "USER|PATCH",
        "NODES|POST",
        "NODE|PATCH",
        "TRANS|POST",
        "TRAN|PATCH"
    ],
    "url": "https://requestb.in/zp216zzp"
}