Skip to main content
POST
Register a webhook endpoint

Authorizations

Authorization
string
header
required

One client per partner per environment. Access tokens expire after 15 minutes. Scopes are granted per client. Sandbox clients use https://sandbox.api.meet-oj.com/oauth/token.

Headers

Idempotency-Key
string
required

IETF Idempotency-Key semantics (draft-ietf-httpapi-idempotency-key-header). Send a fresh unique value (a UUID) with every new request. A retry with the same key and the same payload returns the original response with the header Idempotent-Replayed: true. The same key with a different payload is rejected with 422 and code idempotency_key_reused. Keys are kept for 24 hours.

Maximum string length: 255

Body

application/json
url
string<uri>
required
event_types
enum<string>[]

Omit to receive every event.

The kinds of events O.J. sends. The name is object.what_happened. The Webhooks section of the docs explains when each one fires.

Available options:
referral.received,
referral.matches_updated,
referral.needs_partner,
referral.needs_borrower,
message.sent,
message.received,
referral.reminder_due,
submission.awaiting_review,
submission.decided,
document_request.opened,
document_request.satisfied,
referral.submitted,
offer.received,
offer.accepted,
referral.funded,
referral.declined,
referral.closed,
payout.updated

Response

Endpoint registered

A URL on your server that O.J. sends events to. event_types limits which events are sent; leave it empty to receive all of them. secret is the key used to sign each delivery and is returned only when the endpoint is created, so store it then.

id
string
required
Example:

"whe_01K5X3Y1G5"

url
string<uri>
required
status
enum<string>
required
Available options:
enabled,
disabled
created_at
string<date-time>
required
object
string
Allowed value: "webhook_endpoint"
event_types
enum<string>[]

The kinds of events O.J. sends. The name is object.what_happened. The Webhooks section of the docs explains when each one fires.

Available options:
referral.received,
referral.matches_updated,
referral.needs_partner,
referral.needs_borrower,
message.sent,
message.received,
referral.reminder_due,
submission.awaiting_review,
submission.decided,
document_request.opened,
document_request.satisfied,
referral.submitted,
offer.received,
offer.accepted,
referral.funded,
referral.declined,
referral.closed,
payout.updated
secret
string

Returned once, on creation. whsec_…