Skip to main content
POST
/
v1
/
webhooks
Create a webhook
curl --request POST \
  --url https://prod.truv.com/v1/webhooks/ \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Client-Id: <api-key>' \
  --header 'X-Access-Secret: <api-key>' \
  --data '
{
  "name": "<string>",
  "webhook_url": "http://example.com/",
  "env_type": "dev",
  "events": [
    "task-status-updated",
    "order-status-updated"
  ]
}
'
{
  "id": "48427a36d43c4d5aa6324bc06c692456",
  "name": "<string>",
  "webhook_url": "http://example.com/",
  "events": [
    "task-status-updated",
    "order-status-updated"
  ],
  "env_type": "dev",
  "created_at": "2022-05-04T11:30:00.000Z",
  "updated_at": "2022-05-04T12:00:00.000Z"
}

Authorizations

X-Access-Client-Id
string
header
required

Client ID

X-Access-Secret
string
header
required

Client Access Key

Body

application/json
name
string
required

Public name for this webhook config.

Maximum string length: 128
webhook_url
string<uri>
required

Webhook URL where event data will be sent.

Maximum string length: 2048
Example:

"http://example.com/"

env_type
enum<string>
required

Type of environment.

Available options:
sandbox,
dev,
prod
Example:

"dev"

events
enum<string>[]

List of events sent to this webhook URL.

Available options:
task-status-updated,
order-status-updated,
order-created,
link-connected,
link-disconnected,
order-refresh-failed,
link-deleted,
employment-created,
employment-updated,
profile-created,
profile-updated,
statements-created,
statements-updated,
shifts-created,
shifts-updated,
bank-accounts-created,
bank-accounts-updated
Example:
[
"task-status-updated",
"order-status-updated"
]

Response

id
string
required
read-only

Unique identifier of the webhook.

Maximum string length: 32
Example:

"48427a36d43c4d5aa6324bc06c692456"

name
string
required

Public name for this webhook config.

Maximum string length: 128
webhook_url
string<uri>
required

Webhook URL where event data will be sent.

Maximum string length: 2048
Example:

"http://example.com/"

events
enum<string>[]
required

List of events sent to this webhook URL.

Available options:
task-status-updated,
order-status-updated,
order-created,
link-connected,
link-disconnected,
order-refresh-failed,
link-deleted,
employment-created,
employment-updated,
profile-created,
profile-updated,
statements-created,
statements-updated,
shifts-created,
shifts-updated,
bank-accounts-created,
bank-accounts-updated
Example:
[
"task-status-updated",
"order-status-updated"
]
env_type
enum<string>
required

Type of environment.

Available options:
sandbox,
dev,
prod
Example:

"dev"

created_at
string<date-time>
required
read-only

Timestamp when the webhook was created.

Example:

"2022-05-04T11:30:00.000Z"

updated_at
string<date-time>
required
read-only

Timestamp when the webhook was updated last time.

Example:

"2022-05-04T12:00:00.000Z"