PATCH
/
api
/
platform
/
v1
/
webhook_endpoints
/
{id}
curl --request PATCH \
  --url https://api.bspk.com/api/platform/v1/webhook_endpoints/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "target_url": "https://mycompany.com/incoming_webhooks/clients",
  "is_enabled": false,
  "events": [
    "client.created",
    "client.updated",
    "client.deleted",
    "file_import.finished"
  ]
}'
{
  "id": 6,
  "target_url": "https://taget_url.com/endpoint/to/hit_5",
  "events": [
    "client.created"
  ],
  "is_enabled": false,
  "created_at": "2024-08-07T12:29:12.038Z",
  "updated_at": "2024-08-07T12:29:12.076Z"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Webhook endpoint id.

Body

application/json
target_url
string
required
Example:

"https://mycompany.com/incoming_webhooks/clients"

is_enabled
boolean
required

When not specified it defaults to true thus enabling the endpoint.

Example:

false

events
string[]
required
Example:
[
  "client.created",
  "client.updated",
  "client.deleted",
  "file_import.finished"
]

Response

200 - application/json
Successful response, returns object

Creates a webhook webdpoints allowing external backend systems to be notified wheneve the event occurs on BSPK.

id
integer
required

Unique identifier of the store where the appointment was created (based on associate assignment)

target_url
string
required

Store name of where the appointment was created (based on associate assignment)

events
string[]
required
Example:
[
  "client.created",
  "client.updated",
  "client.deleted"
]
is_enabled
boolean
required

Whether or not the webhoook endpoint is enabled. If true events will be sent to it, otherwise it will not.

created_at
string
required

Timestamp of when the webhook endpoint was created

updated_at
string
required

Timestamp of when the webhook endpoint was last updated

secret
string

(Only returned while creating the endpoint). The secret that BSPK will send (via X-Bspk-Secret HTTP header) on every request to this endpoint so that your bakend can validate requests.