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.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • GETList conversations
      • POSTCreate conversation
      • GETGet conversation
      • PUTUpdate conversation
      • DELDelete conversation
      • GETList messages
      • POSTCreate message
Dashboard
LogoLogo
Runtype APIMessaging Conversations

Create message

POST
/v1/messaging/conversations/:id/messages
POST
/v1/messaging/conversations/:id/messages
$curl -X POST https://api.runtype.com/v1/messaging/conversations/id/messages \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "content": "Hello, I need help with my account settings.",
> "role": "user"
>}'
1{
2 "content": "Hello, I need help with my account settings.",
3 "conversationId": "a1b2c3d4-e5f6-7890-ab12-cd34ef56gh78",
4 "createdAt": "2024-06-01T10:15:30Z",
5 "direction": "inbound",
6 "externalMessageId": "msg-20240601-101530-12345",
7 "flowStepResultId": "step-9876abcd-1234-ef56-7890-gh12ij34kl56",
8 "id": "msg-0001a2b3c4d5e6f7g8h9",
9 "metadata": {},
10 "role": "user"
11}
Add a message to a conversation.
Was this page helpful?
Previous

Trigger an immediate IMAP poll

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired

Request

This endpoint expects an object.
contentstringRequired>=1 character
roleenumRequired
Allowed values:
directionenumOptional
Allowed values:
externalMessageIdstringOptional<=500 characters
flowStepResultIdstringOptional
metadataobjectOptional

Response

Created message
contentstring
conversationIdstring
createdAtstring
directionstring or null
externalMessageIdstring or null
flowStepResultIdstring or null
idstring
metadatamap from strings to any
rolestring

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error