Skip to main content
POST
Send a message to a program
This endpoint requires an API key with the messages.write scope.
You can message programs you’re enrolled in that have messaging turned on, and programs that have messaged you. Other programs return a 403 error. Sending a message marks the program’s earlier messages to you as read. You can send up to 10 messages a minute to the same program.

Authorizations

Authorization
string
header
required

Partner API key

Scopes

messages.write

Send messages to programs

Headers

Dub-Version
enum<string>

The API version to use. Defaults to the version your API key was created with.

Available options:
mozart

Body

application/json
programId
string
required

The ID or slug of the program to message.

Required string length: 1 - 255
text
string
required

The text of the message.

Required string length: 1 - 2000

Response

The sent message.

id
string
required

The message's unique ID on Dub.

text
string
required

The text of the message.

readInApp
string | null
required

The date and time when the message was read in the app. null if it hasn't been read there.

readInEmail
string | null
required

The date and time when the message was read in an email. null if it hasn't been read there.

createdAt
string
required

The date and time when the message was sent.

updatedAt
string
required

The date and time when the message was last updated.

attachments
object[]
required

The files attached to the message.

sourceType
enum<string>
required

Whether the program or you sent the message.

Available options:
program,
partner
program
object
required

The program in the conversation.