Messages
Messages are what conversations are made of in Protocol — they are the basic building blocks of your conversations with your Protocol contacts. On this page, we'll dive into the different message endpoints you can use to manage messages programmatically. We'll look at how to query, send, update, and delete messages.
The message model
The message model contains all the information about the messages and attachments you send to your contacts and groups, including how your contacts have reacted to them.
Properties
- Name
id- Type
- string
- Description
Unique identifier for the message.
- Name
conversation_id- Type
- string
- Description
Unique identifier for the conversation the message belongs to.
- Name
contact- Type
- object
- Description
The contact object for the contact who sent the message.
- Name
message- Type
- string
- Description
The message content.
- Name
reactions- Type
- array
- Description
An array of reaction objects associated with the message.
- Name
attachments- Type
- array
- Description
An array of attachment objects associated with the message.
- Name
read_at- Type
- timestamp
- Description
Timestamp of when the message was read.
- Name
created_at- Type
- timestamp
- Description
Timestamp of when the message was created.
- Name
updated_at- Type
- timestamp
- Description
Timestamp of when the message was last updated.
List all messages
This endpoint allows you to retrieve a paginated list of all your messages (in a conversation if a conversation id is provided). By default, a maximum of ten messages are shown per page.
Request
curl -G https://api.omnifuel.io/v1/organizations \
-H "Authorization: Bearer {token}"
Response
{
"data": [
{
"id": "f23402fd-69de-47e1-a83e-873a448fae83",
"name": "Organization Name"
}
]
}