> For the complete documentation index, see [llms.txt](https://answeringservicecare.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://answeringservicecare.com/docs/api-reference/user-portal-apis/messages/list-messages.md).

# List Messages

## List Messages

> Retrieve all messages for the authenticated user. Supports filtering by origin, delivery status, and date range.

```json
{"openapi":"3.0.3","info":{"title":"Answering Service Care API","version":"1.0.0"},"tags":[{"name":"List Messages"}],"servers":[{"url":"https://secure.answeringservicecare.com","description":"Answering Service Care host"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API token","description":"Answering Service Care uses bearer token authentication. Generate API tokens from your user profile under **Application Keys**."}},"schemas":{"MessageListEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}}},"Message":{"type":"object","description":"A message record. Retained for 180+ days per privacy policy. Custom fields appear alongside standard fields with the prefix `content_with_additional_details_table__{labelName}`.","properties":{"id":{"type":"integer"},"read":{"type":"boolean"},"phone_number":{"type":"string"},"extension":{"type":"string"},"caller_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"company_name":{"type":"string"},"content":{"type":"string"},"status":{"type":"string","enum":["new","delivered","archived","acknowledged"]},"account_id":{"type":"integer"},"agent_id":{"type":"integer"},"user_id":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"ivr":{"type":"string"},"pickup_date":{"type":"string","format":"date-time","nullable":true},"pickup_user_id":{"type":"integer","nullable":true},"contact_id":{"type":"integer"},"delivered_at":{"type":"string","format":"date-time"},"delivered_by":{"type":"integer"},"delivered_to":{"type":"integer","nullable":true},"phone":{"type":"string"},"email":{"type":"string"},"call_ref_id":{"type":"string"},"sale_id":{"type":"integer","nullable":true},"note":{"type":"string"},"did_id":{"type":"integer"},"address":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"how_you_hear_about_us":{"type":"string"},"is_emergency":{"type":"boolean"},"alt_phone":{"type":"string"},"positive_data_dip":{"type":"boolean"},"answers":{"type":"object","additionalProperties":true,"description":"Form answers submitted with the message."},"escalation_level_id":{"type":"integer"},"next_escalation_at":{"type":"string","format":"date-time","nullable":true},"receiver_name":{"type":"string"},"non_message_type":{"type":"string","description":"Set when the entry is not a true message. Standard values are `hang_up`, `wrong_number`, `caller_did_not_leave_message` and `training`. Accounts may define additional dispositions, so treat this as an open set."},"activities_count":{"type":"integer"},"closing_action_group_id":{"type":"integer"},"email_subject":{"type":"string"},"escalation_counter":{"type":"integer"},"origin":{"type":"string","nullable":true,"description":"Channel the message came from. `AI_SMS` and `AI_CALL` mark the message as handled by the AI assistant.","enum":["CALL","SMS","CHAT","TO_DO","AI_SMS","AI_CALL",null]},"message_received_date":{"type":"string","format":"date-time","nullable":true},"disposition":{"type":"string","nullable":true},"call_id":{"type":"integer","nullable":true},"chat_session_id":{"type":"integer","nullable":true},"to_do_task_id":{"type":"integer","nullable":true},"from_to_do":{"type":"boolean"},"send_at":{"type":"string","format":"date-time","nullable":true},"uuid":{"type":"string","format":"uuid"},"klass_names":{"type":"string"}}},"ErrorSimple":{"type":"object","description":"Compact error response (used for 401/422/400).","properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSimple"}}}}},"parameters":{"OriginFilter":{"name":"origin","in":"query","description":"Filter messages by origin channel. Matching is case-insensitive.","required":false,"schema":{"type":"string","enum":["CALL","SMS","CHAT","TO_DO","AI_SMS","AI_CALL"]}},"StatusFilter":{"name":"status","in":"query","description":"Filter messages by status.","required":false,"schema":{"type":"string","enum":["new","delivered","archived","acknowledged"]}},"FromDate":{"name":"from_date","in":"query","description":"Start of date range in `MM-DD-YYYY` format (e.g. `01-01-2025`).","required":false,"schema":{"type":"string","pattern":"^[0-1][0-9]-[0-3][0-9]-[0-9]{4}$"}},"ToDate":{"name":"to_date","in":"query","description":"End of date range in `MM-DD-YYYY` format (e.g. `01-31-2025`).","required":false,"schema":{"type":"string","pattern":"^[0-1][0-9]-[0-3][0-9]-[0-9]{4}$"}},"PageSize":{"name":"page_size","in":"query","description":"Maximum number of results per page (default 50).","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}}},"paths":{"/api/v2/messages":{"get":{"summary":"List Messages","description":"Retrieve all messages for the authenticated user. Supports filtering by origin, delivery status, and date range.","tags":["List Messages"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}},"parameters":[{"$ref":"#/components/parameters/OriginFilter"},{"$ref":"#/components/parameters/StatusFilter"},{"$ref":"#/components/parameters/FromDate"},{"$ref":"#/components/parameters/ToDate"},{"$ref":"#/components/parameters/PageSize"}]}}}}
```

## List Recent Messages

> Retrieve the most recent messages for the authenticated user.

```json
{"openapi":"3.0.3","info":{"title":"Answering Service Care API","version":"1.0.0"},"tags":[{"name":"List Messages"}],"servers":[{"url":"https://secure.answeringservicecare.com","description":"Answering Service Care host"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API token","description":"Answering Service Care uses bearer token authentication. Generate API tokens from your user profile under **Application Keys**."}},"schemas":{"MessageListEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}}},"Message":{"type":"object","description":"A message record. Retained for 180+ days per privacy policy. Custom fields appear alongside standard fields with the prefix `content_with_additional_details_table__{labelName}`.","properties":{"id":{"type":"integer"},"read":{"type":"boolean"},"phone_number":{"type":"string"},"extension":{"type":"string"},"caller_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"company_name":{"type":"string"},"content":{"type":"string"},"status":{"type":"string","enum":["new","delivered","archived","acknowledged"]},"account_id":{"type":"integer"},"agent_id":{"type":"integer"},"user_id":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"ivr":{"type":"string"},"pickup_date":{"type":"string","format":"date-time","nullable":true},"pickup_user_id":{"type":"integer","nullable":true},"contact_id":{"type":"integer"},"delivered_at":{"type":"string","format":"date-time"},"delivered_by":{"type":"integer"},"delivered_to":{"type":"integer","nullable":true},"phone":{"type":"string"},"email":{"type":"string"},"call_ref_id":{"type":"string"},"sale_id":{"type":"integer","nullable":true},"note":{"type":"string"},"did_id":{"type":"integer"},"address":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"how_you_hear_about_us":{"type":"string"},"is_emergency":{"type":"boolean"},"alt_phone":{"type":"string"},"positive_data_dip":{"type":"boolean"},"answers":{"type":"object","additionalProperties":true,"description":"Form answers submitted with the message."},"escalation_level_id":{"type":"integer"},"next_escalation_at":{"type":"string","format":"date-time","nullable":true},"receiver_name":{"type":"string"},"non_message_type":{"type":"string","description":"Set when the entry is not a true message. Standard values are `hang_up`, `wrong_number`, `caller_did_not_leave_message` and `training`. Accounts may define additional dispositions, so treat this as an open set."},"activities_count":{"type":"integer"},"closing_action_group_id":{"type":"integer"},"email_subject":{"type":"string"},"escalation_counter":{"type":"integer"},"origin":{"type":"string","nullable":true,"description":"Channel the message came from. `AI_SMS` and `AI_CALL` mark the message as handled by the AI assistant.","enum":["CALL","SMS","CHAT","TO_DO","AI_SMS","AI_CALL",null]},"message_received_date":{"type":"string","format":"date-time","nullable":true},"disposition":{"type":"string","nullable":true},"call_id":{"type":"integer","nullable":true},"chat_session_id":{"type":"integer","nullable":true},"to_do_task_id":{"type":"integer","nullable":true},"from_to_do":{"type":"boolean"},"send_at":{"type":"string","format":"date-time","nullable":true},"uuid":{"type":"string","format":"uuid"},"klass_names":{"type":"string"}}},"ErrorSimple":{"type":"object","description":"Compact error response (used for 401/422/400).","properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSimple"}}}}}},"paths":{"/api/v2/messages/recents":{"get":{"summary":"List Recent Messages","description":"Retrieve the most recent messages for the authenticated user.","tags":["List Messages"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://answeringservicecare.com/docs/api-reference/user-portal-apis/messages/list-messages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
