GET
/
webhook-subscriptions
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.{gr4vy_id}.gr4vy.app/webhook-subscriptions"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
{
  "items": [
    {
      "type": "webhook-subscription",
      "id": "8fd77b13-a5e3-43de-bd54-26a8a714ac18",
      "merchant_account_id": "default",
      "active": true,
      "url": "https://example.com/webhooks",
      "authentication": {
        "kind": "basic",
        "username": "username",
        "password": "password"
      },
      "secret": "234567890abcdef1234567890abcdef",
      "rotating": false
    }
  ],
  "limit": 1,
  "next_cursor": "ZXhhbXBsZTE",
  "previous_cursor": null
}

This endpoint requires the webhook-subscriptions.read scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Gr4vy-Merchant-Account-ID
string

The ID of the merchant account to act upon. When not or provided, this value will default to the first merchant account a user has access to. This value can be set to * on some APIs to fetch resources from all merchant accounts.

Maximum length: 255
Example:

"default"

Response

200
application/json

Returns a list of webhook subscriptions.

The response is of type object.