POST
/
webhook
curl --request POST \
  --url https://api.treasuryprime.com/webhook \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "basic_secret": "secret",
  "basic_user": "organization_name",
  "event": "ach.update",
  "url": "https://example.application.com/notify"
}'
{
  "basic_secret": null,
  "basic_user": "organization_name",
  "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

Second value in base64(basic_user:basic_secret), sent as Authorization for request validation. This will appear as null in all responses, for security.

basic_user
string

First value in base64(basic_user:basic_secret), sent as Authorization for request validation

userdata
object

Optional arbitrary user data

Response

200 - application/json
The webhook created
basic_secret
string

Second value in base64(basic_user:basic_secret), sent as Authorization for request validation. This will appear as null in all responses, for security.

basic_user
string

First value in base64(basic_user:basic_secret), sent as Authorization for request validation

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