Skip to main content
POST
/
webhook
Create a Webhook
curl --request POST \
  --url https://api.treasuryprime.com/webhook \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event": "ach.update",
  "url": "https://example.application.com/notify"
}
'
{
  "created_at": "2018-12-03T19:46:45Z",
  "error": null,
  "event": "ach.update",
  "id": "wh_012345678923",
  "status": "enabled",
  "updated_at": "2018-12-03T19:46:45Z",
  "url": "https://example.application.com/notify",
  "userdata": null
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

The webhook to create

event
string
required

The event to listen for. Available events

url
string
required

The HTTPS URL where the event notification will be sent

basic_secret
string

The password value sent as part of basic Authorization for request validation. Always shown as null in all responses.

basic_user
string

The user value sent as part of basic Authorization for request validation. Use is optional.

userdata
object

Optional arbitrary user data

Response

200 - application/json

The webhook created

basic_secret
string

The password value sent as part of basic Authorization for request validation. Always shown as null in all responses.

basic_user
string

The user value sent as part of basic Authorization for request validation. Use is optional.

error
string

The error reason, if the webhook has transitioned status to error

event
string

The event to listen for. Available events

id
string

Unique identifier for object

status
string

One of enabled, disabled, or error. Filterable.

url
string

The HTTPS URL where the event notification will be sent

userdata
object

Optional arbitrary user data