Chat API
- Introduction
- Endpoints
Admin API
- Getting started
- Concepts
- Endpoints
Files API
Tables API
- Getting Started
- Endpoints
Runtime API
- Getting Started
- Concepts
- Endpoints
- POSTcreateConversation
- GETlistConversations
- GETgetConversation
- PUTupdateConversation
- DELdeleteConversation
- POSTgetOrCreateConversation
- GETlistParticipants
- POSTaddParticipant
- GETgetParticipant
- DELremoveParticipant
- POSTcreateEvent
- GETlistEvents
- GETgetEvent
- POSTcreateMessage
- GETlistMessages
- POSTgetOrCreateMessage
- GETgetMessage
- PUTupdateMessage
- DELdeleteMessage
- POSTcreateUser
- GETlistUsers
- GETgetUser
- PUTupdateUser
- DELdeleteUser
- POSTgetOrCreateUser
- POSTsetStateExpiry
- GETgetState
- POSTsetState
- PATCHpatchState
- POSTgetOrSetState
- POSTcallAction
- POSTconfigureIntegration
- GETlistTagValues
- POST
getOrCreateMessage
Retrieves the Message object for a valid identifier. If the message does not exist, it will be created.
POST
/
v1
/
chat
/
messages
/
get-or-create
Copy
curl --request POST \
--url https://api.botpress.cloud/v1/chat/messages/get-or-create \
--header 'Content-Type: application/json' \
--data '{
"payload": {},
"userId": "<string>",
"conversationId": "<string>",
"type": "<string>",
"tags": {},
"schedule": {
"dateTime": "<string>",
"delay": 123
},
"discriminateByTags": [
"<string>"
]
}'
Copy
{
"message": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"type": "<string>",
"payload": {},
"direction": "incoming",
"userId": "<string>",
"conversationId": "<string>",
"tags": {}
}
}
Body
application/json
Message data
The body is of type object
.
Was this page helpful?
Copy
curl --request POST \
--url https://api.botpress.cloud/v1/chat/messages/get-or-create \
--header 'Content-Type: application/json' \
--data '{
"payload": {},
"userId": "<string>",
"conversationId": "<string>",
"type": "<string>",
"tags": {},
"schedule": {
"dateTime": "<string>",
"delay": 123
},
"discriminateByTags": [
"<string>"
]
}'
Copy
{
"message": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"type": "<string>",
"payload": {},
"direction": "incoming",
"userId": "<string>",
"conversationId": "<string>",
"tags": {}
}
}
Assistant
Responses are generated using AI and may contain mistakes.