For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Login
HomeDocsAPI ReferenceMCP ServerChat SDKsRelease Notes
HomeDocsAPI ReferenceMCP ServerChat SDKsRelease Notes
  • Introduction
    • Overview
    • Authentication
    • Versioning
    • Limits
    • Pagination
    • Errors
    • Migrate to V2
    • Changelog
  • Knowledge
    • Overview
    • Sources
    • Articles
    • Tags
  • End Users
    • Overview
    • Getting started
    • Developer guide
  • Integrations
    • Overview
    • Getting started
  • Conversations
    • Overview
    • Getting started
      • POSTStart a conversation over Ada's email channel
      • POSTCreate a new conversation
      • GETGet a conversation
      • PATCHUpdate a conversation
      • GETGet conversation messages
      • POSTCreate a new message
      • POSTEnd a conversation
      • POSTEnd Handoff
      • POSTUpload a file attachment
  • Webhooks
    • Overview
  • Data Compliance
    • Overview
  • Data Export
    • Overview
    • Getting started
    • Conversations
    • Messages
Login
LogoLogo
ConversationsConversations

Create a new message

POST
https://example.ada.support/api/v2/conversations/:conversation_id/messages/
POST
/api/v2/conversations/:conversation_id/messages/
1import requests
2
3url = "https://example.ada.support/api/v2/conversations/conversation_id/messages/"
4
5payload = {
6 "author": {
7 "role": "end_user",
8 "id": "5df263b7db5a7e6ea03fae9b",
9 "avatar": "https://www.gravatar.com",
10 "display_name": "Ada Lovelace"
11 },
12 "content": {
13 "type": "text",
14 "body": "Hello, how can I help you?"
15 }
16}
17headers = {
18 "Authorization": "Bearer <token>",
19 "Content-Type": "application/json"
20}
21
22response = requests.post(url, json=payload, headers=headers)
23
24print(response.json())
1{
2 "id": "5df263b7db5a7e6ea03fae9b",
3 "conversation_id": "5df263b7db5a7e6ea03fae9b",
4 "author": {
5 "role": "end_user",
6 "id": "5df263b7db5a7e6ea03fae9b",
7 "avatar": "https://www.gravatar.com",
8 "display_name": "Ada Lovelace"
9 },
10 "content": {
11 "type": "text",
12 "body": "Hello, how can I help you?"
13 },
14 "created_at": "2020-09-20T00:00:00+00:00",
15 "updated_at": "2020-09-20T00:00:00+00:00"
16}
Create a new message in a conversation. The maximum request size is 10MB.
Was this page helpful?
Previous

End a conversation

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

conversation_idstringRequiredformat: "id"
The ID of the conversation

Request

This endpoint expects an object.
authorobjectRequired
Information about the message author
contentobjectRequired
The message content

Response

Message created
idstringRead-onlyformat: "id"
The ID of the message
conversation_idstringRead-onlyformat: "id"
The ID of the conversation
authorobject
Information about the message author
contentobject
The message content
created_atstringRead-onlyformat: "date-time"
The date and time the message was created
updated_atstringRead-onlyformat: "date-time"
The date and time the message was updated

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error