Conversations
Create Message
Creates a new message in the conversation
POST
/
api
/
v1
/
conversations
/
{conversation_id}
/
messages
curl --request POST \
--url https://api.evoai.app/api/v1/conversations/{conversation_id}/messages \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"content": "Hello, how are you?",
"message_type": "outgoing",
"private": false,
"content_type": "text",
"content_attributes": {}
}
'{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"content": "Hello, how can I help you?",
"message_type": "outgoing",
"content_type": "text",
"conversation_id": "660e8400-e29b-41d4-a716-446655440001",
"created_at": "2024-01-15T10:30:00Z"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z"
},
"message": "Message created successfully"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INVALID_TOKEN",
"message": "Invalid or missing authentication token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "You do not have permission to access this resource"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Conversation not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"content": [
"Content is required"
]
}
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal server error occurred"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}Authorizations
Path Parameters
Conversation ID (UUID)
Body
application/json
Message content
Example:
"Hello, how can I help you?"
Available options:
outgoing, incoming If true, creates a private note
Available options:
text, input_select, cards, form, article Additional content attributes
⌘I
curl --request POST \
--url https://api.evoai.app/api/v1/conversations/{conversation_id}/messages \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"content": "Hello, how are you?",
"message_type": "outgoing",
"private": false,
"content_type": "text",
"content_attributes": {}
}
'{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"content": "Hello, how can I help you?",
"message_type": "outgoing",
"content_type": "text",
"conversation_id": "660e8400-e29b-41d4-a716-446655440001",
"created_at": "2024-01-15T10:30:00Z"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z"
},
"message": "Message created successfully"
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INVALID_TOKEN",
"message": "Invalid or missing authentication token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "You do not have permission to access this resource"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Conversation not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": {
"content": [
"Content is required"
]
}
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal server error occurred"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/conversations/{conversation_id}/messages",
"method": "POST"
}
}