Responses
-
OK
-
When 30 days message limit of your subscription plan is reached.
-
Request validation failure.
-
Sometimes response generation fails due to service overload or network issues. You can fetch the list of messages for the conversation to get the generated error message, or you can use your own error message.
POST
/messages
curl \
--request POST 'https://getcody.ai/api/v1/messages' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"content":"string","conversation_id":"string"}'
Request examples
{
"content": "string",
"conversation_id": "string"
}
Response examples (200)
{
"data": {
"id": "string",
"content": "string",
"conversation_id": "string",
"machine": true,
"failed_responding": true,
"flagged": true,
"created_at": 42
}
}
Response examples (402)
{
"message": "You have reached the message limit for last 30 days, please wait till tomorrow or upgrade your plan."
}
Response examples (422)
{
"message": "string",
"errors": {
"content": [
"string"
],
"conversation_id": [
"string"
]
}
}