Send a message
Adds a message to the referral’s conversation. There are two uses.
With author: borrower, you are relaying something the borrower said or uploaded inside your own product,
for example an answer typed into your chat, or a statement dropped into your inbox. O.J. treats it exactly
as if the borrower had said it on a hosted page. It answers a pending question, satisfies a document
request, or is read by O.J.’s agent. The borrower never has to leave your app.
With author: partner, you are telling O.J. something about the deal, such as “the owner is travelling
until the 12th” or “we already have the lease on file”. O.J.’s agent reads it, and if it changes what is
needed, the referral’s todos change too.
Posting a message does not contact the borrower on O.J.’s channels. O.J. decides on its own when to reply
and where, under your contact_channels policy. If you want O.J. to answer inside your product, register
a channel connector.
Authorizations
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
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.
255Path Parameters
"ref_01K5X3K7Q2"
Body
The body for posting a message into a referral's conversation from your side.
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.
borrower, partner 1The O.J. message the borrower is answering, if your UI knows it.
The action this message is about, if your UI knows it. O.J. works it out otherwise.
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.
"msg_01K5X6D2E8"
"conv_01K5X3K7Q2"
oj, borrower, partner 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.
embed, hosted_page, sms, imessage, email, voice, partner_channel, api "message"Display name to show: "O.J.", the borrower's first name, or your staff member's name.
"O.J."
From O.J.'s point of view. Outbound messages were sent by O.J.
inbound, outbound The id of the message this answers, when known.
Your own id for the message, if you posted it.
When the channel confirmed delivery, if it does.
When the recipient opened it, if the channel reports that.

