Skip to main content
POST
Send a message

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

Path Parameters

referral_id
string
required
Example:

"ref_01K5X3K7Q2"

Body

application/json

The body for posting a message into a referral's conversation from your side.

author
enum<string>
required

borrower when you are relaying what the borrower said or uploaded in your product. partner when your team or system is telling O.J. something.

Available options:
borrower,
partner
parts
object[]
required
Minimum array length: 1
author_name
string
in_reply_to
string

The O.J. message the borrower is answering, if your UI knows it.

next_action_id
string

The action this message is about, if your UI knows it. O.J. works it out otherwise.

external_id
string

Response

Message recorded

One turn in a referral's conversation. author is who said it: oj (O.J.'s agent or a reviewer), borrower, or partner (your staff or your system). channel is where it went through. parts is the content. next_action_id is set when the message is about a specific action, for example O.J. asking for statements, or the borrower's reply that satisfied the request.

Messages from the borrower on O.J.'s own channels appear here too, so your product always has the whole thread. The message carries the medium, not the number or address the borrower used.

id
string
required
Example:

"msg_01K5X6D2E8"

referral_id
string
required
conversation_id
string
required
Example:

"conv_01K5X3K7Q2"

author
enum<string>
required
Available options:
oj,
borrower,
partner
channel
enum<string>
required

Where a message went through. embed is the O.J. Embed component inside your product. hosted_page is an O.J.-hosted page. sms, imessage, email and voice are O.J.'s own channels, used only when your policy allows them. partner_channel means O.J. delivered through one of your channel connectors, in your brand. api means the message was posted by your system, your agent, or an A2A client.

Available options:
embed,
hosted_page,
sms,
imessage,
email,
voice,
partner_channel,
api
parts
object[]
required
created_at
string<date-time>
required
object
string
Allowed value: "message"
author_name
string

Display name to show: "O.J.", the borrower's first name, or your staff member's name.

Example:

"O.J."

direction
enum<string>

From O.J.'s point of view. Outbound messages were sent by O.J.

Available options:
inbound,
outbound
next_action_id
string
in_reply_to
string

The id of the message this answers, when known.

external_id
string

Your own id for the message, if you posted it.

delivered_at
string<date-time>

When the channel confirmed delivery, if it does.

read_at
string<date-time>

When the recipient opened it, if the channel reports that.