InvestiFiPartner APIBeta
Prod Environment

Create Webhook Subscription

Requires the manage:webhooks scope.

Create a webhook subscription, issuing the financial institution's signing secret on first use.

The signing secret is returned only when this subscribe issued it (the financial institution's first subscription); on later subscribes it already exists and is omitted.

The subscription is pinned to the Partner API version this endpoint is mounted under, and links in its delivered payloads are built at that version. Moving to a newer API version means subscribing again through that version.

Parameters
body
The event type and callback URL to subscribe.
Returns

The created subscription, with the signing secret when first issued.

Raises
HTTPException
400 Bad Request when the callback URL fails validation.
https://partner-api.investifi.com/v1
POST
/webhooks/subscriptions

Authorization

APIKeyHeader
x-api-key<token>

Partner API key, required on every endpoint except "GET /health". Your financial institution issues and revokes these keys from the InvestiFi Ops Center. Each key carries an environment-identifying prefix such as "ifi_prod_" plus a fixed set of scopes, so a valid key still returns 403 Forbidden on an endpoint whose scope it was not granted; the response "detail" names the check that failed.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://partner-api.investifi.com/v1/webhooks/subscriptions" \  -H "Content-Type: application/json" \  -d '{    "event_type": "kyc",    "url": "string"  }'
{
  "subscription_id": "string",
  "event_type": "kyc",
  "url": "string",
  "api_version": "string",
  "signing_secret": "string",
  "created_at": "2019-08-24T14:15:22Z"
}
{
  "detail": "Key does not have the required scope: manage:webhooks."
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}