> For the complete documentation index, see [llms.txt](https://docs.zaia.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zaia.app/documentation/api-reference-alpha/reference/chat-message-follow-ups.md).

# Chat Message Follow Ups

## GET /api/v1/chat-message-follow-ups

> Retrieves multiple chat message follow-ups.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/chat-message-follow-ups":{"get":{"description":"Retrieves multiple chat message follow-ups.","tags":["Chat Message Follow-Ups"],"parameters":[{"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}},{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}],"default":[]},"required":false,"name":"chatIds","in":"query"},{"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}},{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}],"default":[]},"required":false,"name":"chatMessageIds","in":"query"},{"schema":{"type":"number","minimum":1,"default":1,"description":"The page number."},"required":false,"description":"The page number.","name":"pageNumber","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":10,"description":"The page size."},"required":false,"description":"The page size.","name":"pageSize","in":"query"},{"schema":{"anyOf":[{"type":"array","items":{"type":"string","enum":["pending","sent","failed","cancelled"],"description":"The current status of the follow-up."}},{"type":"string","enum":["pending","sent","failed","cancelled"],"description":"The current status of the follow-up."}],"default":[]},"required":false,"name":"statuses","in":"query"},{"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}},{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}],"default":[]},"required":false,"name":"triggerChatMessageIds","in":"query"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"responses":{"200":{"description":"Retrieves all chat message follow-ups for the specified filters.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"updatedAt":{"type":"string","format":"date-time"},"chatId":{"type":"string","format":"uuid","description":"The id of the chat this follow-up belongs to."},"chatMessageId":{"type":"string","nullable":true,"format":"uuid","description":"The id of the chat message this follow-up belongs to."},"dueDate":{"type":"string","format":"date-time","description":"The date and time when the follow-up message should be sent."},"finishedAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time when the follow-up went from pending to any other status."},"message":{"type":"string","minLength":1,"description":"The follow-up message content."},"reason":{"type":"string","nullable":true,"description":"The reason why the follow-up failed."},"status":{"type":"string","enum":["pending","sent","failed","cancelled"],"description":"The current status of the follow-up."},"triggerChatMessageId":{"type":"string","format":"uuid","description":"The id of the chat message that triggered the follow-up."}},"required":["createdAt","id","updatedAt","chatId","chatMessageId","dueDate","finishedAt","message","reason","status","triggerChatMessageId"]}}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## POST /api/v1/chat-message-follow-ups

> Creates a chat message follow-up.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/chat-message-follow-ups":{"post":{"description":"Creates a chat message follow-up.","tags":["Chat Message Follow-Ups"],"parameters":[{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"type":"string","format":"uuid","description":"The id of the chat this follow-up belongs to."},"dueDate":{"type":"string","format":"date-time","description":"The date and time when the follow-up message should be sent."},"message":{"type":"string","minLength":1,"description":"The follow-up message content."}},"required":["chatId","dueDate","message"]}}}},"responses":{"201":{"description":"The chat message follow-up was created.","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"updatedAt":{"type":"string","format":"date-time"},"chatId":{"type":"string","format":"uuid","description":"The id of the chat this follow-up belongs to."},"chatMessageId":{"type":"string","nullable":true,"format":"uuid","description":"The id of the chat message this follow-up belongs to."},"dueDate":{"type":"string","format":"date-time","description":"The date and time when the follow-up message should be sent."},"finishedAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time when the follow-up went from pending to any other status."},"message":{"type":"string","minLength":1,"description":"The follow-up message content."},"reason":{"type":"string","nullable":true,"description":"The reason why the follow-up failed."},"status":{"type":"string","enum":["pending","sent","failed","cancelled"],"description":"The current status of the follow-up."},"triggerChatMessageId":{"type":"string","format":"uuid","description":"The id of the chat message that triggered the follow-up."}},"required":["createdAt","id","updatedAt","chatId","chatMessageId","dueDate","finishedAt","message","reason","status","triggerChatMessageId"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"The chat was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"412":{"description":"The chat has no messages or the last message is from the user.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## PATCH /api/v1/chat-message-follow-ups/{id}

> Updates a chat message follow-up.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/chat-message-follow-ups/{id}":{"patch":{"description":"Updates a chat message follow-up.","tags":["Chat Message Follow-Ups"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"id","in":"path"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"type":"string","format":"uuid","description":"The id of the chat this follow-up belongs to."},"chatMessageId":{"type":"string","nullable":true,"format":"uuid","description":"The id of the chat message this follow-up belongs to."},"dueDate":{"type":"string","format":"date-time","description":"The date and time when the follow-up message should be sent."},"finishedAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time when the follow-up went from pending to any other status."},"message":{"type":"string","minLength":1,"description":"The follow-up message content."},"reason":{"type":"string","nullable":true,"description":"The reason why the follow-up failed."},"status":{"type":"string","enum":["cancelled"]},"triggerChatMessageId":{"type":"string","format":"uuid","description":"The id of the chat message that triggered the follow-up."}}}}}},"responses":{"200":{"description":"The chat message follow-up was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"updatedAt":{"type":"string","format":"date-time"},"chatId":{"type":"string","format":"uuid","description":"The id of the chat this follow-up belongs to."},"chatMessageId":{"type":"string","nullable":true,"format":"uuid","description":"The id of the chat message this follow-up belongs to."},"dueDate":{"type":"string","format":"date-time","description":"The date and time when the follow-up message should be sent."},"finishedAt":{"type":"string","nullable":true,"format":"date-time","description":"The date and time when the follow-up went from pending to any other status."},"message":{"type":"string","minLength":1,"description":"The follow-up message content."},"reason":{"type":"string","nullable":true,"description":"The reason why the follow-up failed."},"status":{"type":"string","enum":["pending","sent","failed","cancelled"],"description":"The current status of the follow-up."},"triggerChatMessageId":{"type":"string","format":"uuid","description":"The id of the chat message that triggered the follow-up."}},"required":["createdAt","id","updatedAt","chatId","chatMessageId","dueDate","finishedAt","message","reason","status","triggerChatMessageId"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"The chat message follow-up was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"412":{"description":"Only pending follow-ups can be updated.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```
