Paginated message history, newest first. Prefer this over v2: page is 1-based and echoed back unchanged, page_size is configurable, and total/pages describe exactly what data contains β data.length never exceeds page_size, and summing data across all pages equals total. Unlike v2, the response contains only real messages: the synthetic βstageβ and βinteractive_noteβ entries that v2 injects are not messages and are not returned here. Also unlike v2, this endpoint is side-effect free: reading messages does NOT mark the conversation as read. Requesting a page beyond the last one returns an empty data with has_next_page: false.
GET
/
api
/
public
/
contact
/
v3
/
{aiContactId}
/
messages
Retrieve messages by AI contact with pagination
curl --request GET \ --url https://api.vambe.me/api/public/contact/v3/{aiContactId}/messages \ --header 'x-api-key: <x-api-key>'
Retrieve a contactβs messages with pagination, newest first. This is the recommended endpoint for reading message history.Use this instead of v2: page is 1-based and echoed back unchanged, page_size is configurable, and the counters describe exactly what you receive.
This list is exhaustive and identical on every channel β the response carries these fields and nothing else:
Field
Type
Description
id
string
Message identifier, always a string (some channels store it as an integer internally)
created_at
string (ISO)
Message timestamp
body
string
Message text
direction
string
inbound, outbound, internal_note, ai_note or task
type
string
Channel message type, e.g. text, image, audio, document
content
object | array | null
Structured payload for non-text messages, as delivered by the channel. Channel-defined shape β WhatsApp template messages carry an array of components. Do not assume a fixed shape
provider_message_id
string | null
Channel providerβs own message id
attribution_id
string | null
Attribution identifier, when set
user
object | null
Human sender (first_name, last_name) when sent by an agent
assistant
object | null
AI sender (id, name) when sent by an assistant
campaign
object | null
{ title } when the message came from a campaign
ticket_id
string | null
Ticket this message belongs to, when there is one
v3 returns a fixed projection, so integrating once works for every
channel. v2 instead returns the raw channel row β on WhatsApp that means the
whole message record nested under whatsapp_message on top of the flattened
fields, plus the ticket, summary and activity graph. If you depend on a field
that only exists there, tell us and we will consider adding it to v3 rather
than exposing the internal row.
Unlike v2, the response contains only real messages. The synthetic stage
and interactive_note entries that v2 mixes into its list are not messages
and are not returned here.
Order is newest first. Page 1 holds the most recent messages.
Reading is side-effect free. Unlike v2, fetching messages here does not mark the conversation as read, so polling this endpoint never changes what your agents see as unread.
Deleted Instagram messages are excluded from data, total and pages.
Cross-channel: works for every channel a contact may use.
Messages for this page, newest first. The shape below is exhaustive and identical across channels: no channel-specific or internal fields are returned.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Welcome π","colors":{"primary":"#2563EB","light":"#93C5FD","dark":"#1E3A8A"},"logo":"https://mintcdn.com/vambe-f69d5806/_YFOlf0qgMJ8Che1/images/fb1a23e-small-Vambe_Logo_Panda-White4x.png?fit=max\u0026auto=format\u0026n=_YFOlf0qgMJ8Che1\u0026q=85\u0026s=c84b8be7abfa14dd8e1674a247b9cc0b","favicon":"https://mintcdn.com/vambe-f69d5806/_YFOlf0qgMJ8Che1/df9628f-small-2NorthAm_Ops.png?fit=max\u0026auto=format\u0026n=_YFOlf0qgMJ8Che1\u0026q=85\u0026s=5d02cd83d033a951fa6d8bce17f58e33","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","javascript","python"]}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"vambe-f69d5806","hasAudioNarration":false,"actualSubdomain":"vambe-f69d5806","customDomains":["docs.vambe.me"],"gitSource":{"type":"github","owner":"vambeai","repo":"vambeai-backend","deployBranch":"main","contentDirectory":"public/documentation","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad9414d50b990b1d34cd94c","collectionId":"3212a895-ce74-46d1-acad-6010636aa2bd","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad9414d50b990b1d34cd94c"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae3908af981635292af10a8","clientVersion":"0.0.4054","searchFilterCounts":[{"language":"default","tag":"Messaging API","count":44},{"language":"default","tag":"CRM \u0026 Contacts","count":24},{"language":"default","tag":"Custom Ecommerce Apps","count":22},{"language":"default","tag":"Contact Management","count":16},{"language":"default","tag":"Webhooks","count":16},{"language":"default","tag":"Guides","count":12},{"language":"default","tag":"App management API","count":11},{"language":"default","tag":"Instagram Comment Automations","count":9},{"language":"default","tag":"Appointments","count":8},{"language":"default","tag":"Booking API","count":8}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"img.sidebar-group-icon[src$=\"/icons/notepad-text-dashed.svg\"]{background-color:currentColor!important;object-position:-9999px 0;-webkit-mask:url(/images/icons/notepad-text-dashed.svg) center/contain no-repeat;mask:url(/images/icons/notepad-text-dashed.svg) center/contain no-repeat}"}],"page":{"pagePath":"reference/contact/get-messages-paginated-v3","slug":"/reference/contact/get-messages-paginated-v3","pageMetadata":{"openapi":"get /api/public/contact/v3/{aiContactId}/messages","title":"Retrieve messages by AI contact with pagination","description":"Paginated message history, newest first. Prefer this over v2: `page` is 1-based and echoed back unchanged, `page_size` is configurable, and `total`/`pages` describe exactly what `data` contains β `data.length` never exceeds `page_size`, and summing `data` across all pages equals `total`. Unlike v2, the response contains only real messages: the synthetic \"stage\" and \"interactive_note\" entries that v2 injects are not messages and are not returned here. Also unlike v2, this endpoint is side-effect free: reading messages does NOT mark the conversation as read. Requesting a page beyond the last one returns an empty `data` with `has_next_page: false`.","href":"/reference/contact/get-messages-paginated-v3"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Paginated message history, newest first. Prefer this over v2: \", _jsx(_components.code, {\n children: \"page\"\n }), \" is 1-based and echoed back unchanged, \", _jsx(_components.code, {\n children: \"page_size\"\n }), \" is configurable, and \", _jsx(_components.code, {\n children: \"total\"\n }), \"/\", _jsx(_components.code, {\n children: \"pages\"\n }), \" describe exactly what \", _jsx(_components.code, {\n children: \"data\"\n }), \" contains β \", _jsx(_components.code, {\n children: \"data.length\"\n }), \" never exceeds \", _jsx(_components.code, {\n children: \"page_size\"\n }), \", and summing \", _jsx(_components.code, {\n children: \"data\"\n }), \" across all pages equals \", _jsx(_components.code, {\n children: \"total\"\n }), \". Unlike v2, the response contains only real messages: the synthetic βstageβ and βinteractive_noteβ entries that v2 injects are not messages and are not returned here. Also unlike v2, this endpoint is side-effect free: reading messages does NOT mark the conversation as read. Requesting a page beyond the last one returns an empty \", _jsx(_components.code, {\n children: \"data\"\n }), \" with \", _jsx(_components.code, {\n children: \"has_next_page: false\"\n }), \".\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`Retrieve a contactβs messages with pagination, `,_jsx(_components.strong,{children:`newest first`}),`. This is the recommended endpoint for reading message history.`]}),`\n`,_jsxs(_components.p,{children:[`Use this instead of `,_jsx(_components.a,{href:`/reference/contact/get-messages-paginated`,children:`v2`}),`: `,_jsx(_components.code,{children:`page`}),` is 1-based and echoed back unchanged, `,_jsx(_components.code,{children:`page_size`}),` is configurable, and the counters describe exactly what you receive.`]}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(_components.p,{children:`Include your API key in the request header:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`x-api-key: your_api_key_here`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`aiContactId`})}),_jsx(_components.td,{children:`string (UUID)`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Unique identifier of the contact`})]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`query-parameters`,children:`Query Parameters`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`page`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsxs(_components.td,{children:[`Page number, `,_jsx(_components.strong,{children:`1-based`}),`. Page 1 = newest messages`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`page_size`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`15`})}),_jsxs(_components.td,{children:[`Messages per page, between `,_jsx(_components.code,{children:`1`}),` and `,_jsx(_components.code,{children:`100`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Both parameters must be integers. `,_jsx(_components.code,{children:`page`}),` below 1, `,_jsx(_components.code,{children:`page_size`}),` outside 1β100, and fractional values are rejected with `,_jsx(_components.code,{children:`400`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response-structure`,children:`Response Structure`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Messages for this page, ordered newest first`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`page`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`The page you requested, echoed back`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`page_size`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`The page size in effect`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pages`})}),_jsx(_components.td,{children:`number`}),_jsxs(_components.td,{children:[`Total number of pages. Valid values for `,_jsx(_components.code,{children:`page`}),` are `,_jsx(_components.code,{children:`1..pages`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Total messages for this contact across all pages`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`has_next_page`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Whether a page after this one exists`})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The counters are self-consistent: `,_jsx(_components.code,{children:`data`}),` never holds more than `,_jsx(_components.code,{children:`page_size`}),`\nitems, and summing `,_jsx(_components.code,{children:`data`}),` across all pages equals `,_jsx(_components.code,{children:`total`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`message-object`,children:`Message Object`}),`\n`,_jsxs(_components.p,{children:[`This list is `,_jsx(_components.strong,{children:`exhaustive`}),` and identical on every channel β the response carries these fields and nothing else:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Message identifier, always a string (some channels store it as an integer internally)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`created_at`})}),_jsx(_components.td,{children:`string (ISO)`}),_jsx(_components.td,{children:`Message timestamp`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`body`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Message text`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`direction`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`inbound`}),`, `,_jsx(_components.code,{children:`outbound`}),`, `,_jsx(_components.code,{children:`internal_note`}),`, `,_jsx(_components.code,{children:`ai_note`}),` or `,_jsx(_components.code,{children:`task`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Channel message type, e.g. `,_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`image`}),`, `,_jsx(_components.code,{children:`audio`}),`, `,_jsx(_components.code,{children:`document`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`content`})}),_jsx(_components.td,{children:`object | array | null`}),_jsx(_components.td,{children:`Structured payload for non-text messages, as delivered by the channel. Channel-defined shape β WhatsApp template messages carry an array of components. Do not assume a fixed shape`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`provider_message_id`})}),_jsx(_components.td,{children:`string | null`}),_jsx(_components.td,{children:`Channel providerβs own message id`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`attribution_id`})}),_jsx(_components.td,{children:`string | null`}),_jsx(_components.td,{children:`Attribution identifier, when set`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`user`})}),_jsx(_components.td,{children:`object | null`}),_jsxs(_components.td,{children:[`Human sender (`,_jsx(_components.code,{children:`first_name`}),`, `,_jsx(_components.code,{children:`last_name`}),`) when sent by an agent`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`assistant`})}),_jsx(_components.td,{children:`object | null`}),_jsxs(_components.td,{children:[`AI sender (`,_jsx(_components.code,{children:`id`}),`, `,_jsx(_components.code,{children:`name`}),`) when sent by an assistant`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`campaign`})}),_jsx(_components.td,{children:`object | null`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`{ title }`}),` when the message came from a campaign`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ticket_id`})}),_jsx(_components.td,{children:`string | null`}),_jsx(_components.td,{children:`Ticket this message belongs to, when there is one`})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`v3 returns a `,_jsx(_components.strong,{children:`fixed projection`}),`, so integrating once works for every\nchannel. v2 instead returns the raw channel row β on WhatsApp that means the\nwhole message record nested under `,_jsx(_components.code,{children:`whatsapp_message`}),` on top of the flattened\nfields, plus the ticket, summary and activity graph. If you depend on a field\nthat only exists there, tell us and we will consider adding it to v3 rather\nthan exposing the internal row.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Unlike v2, the response contains `,_jsx(_components.strong,{children:`only real messages`}),`. The synthetic `,_jsx(_components.code,{children:`stage`}),`\nand `,_jsx(_components.code,{children:`interactive_note`}),` entries that v2 mixes into its list are not messages\nand are not returned here.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example Request`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.vambe.me/api/public/contact/v3/df980fc8-b6db-4820-bf22-2969482d106d/messages?page=1\u0026page_size=15'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'x-api-key: your_api_key_here'`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`example-response`,children:`Example Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`40`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`40`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"9f1c2b3a-5d6e-4f70-8a91-2b3c4d5e6f70\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-09-30T10:01:30.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Β‘Por supuesto! ΒΏCuΓ‘l es tu nΓΊmero de pedido?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"direction\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"outbound\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"provider_message_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"wamid.HBgLNTY5MTIzNDU2NzgVAgARGBI5QTND\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"attribution_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567-e89b-12d3-a456-426614174000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Vambe\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"campaign\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ticket_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7c3e4f21-9b8a-4d5e-8f60-1a2b3c4d5e6f\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"6b0d8e1f-2a34-4c56-9d78-0e1f2a3b4c56\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-09-30T10:00:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hola, necesito ayuda con mi pedido\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"direction\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"inbound\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"provider_message_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"wamid.HBgLNTY5ODc2NTQzMjEVAgASGBQzQjJE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"attribution_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"campaign\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ticket_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7c3e4f21-9b8a-4d5e-8f60-1a2b3c4d5e6f\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"page\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"page_size\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`15`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`9`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`127`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"has_next_page\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`fetching-the-full-history`,children:`Fetching the Full History`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getAllMessages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`contactId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` all`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` page`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `https://api.vambe.me/api/public/contact/v3/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`contactId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/messages?page=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`page`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"\u0026page_size=100`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'x-api-key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` all`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`push`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`has_next_page`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` all`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// all.length === result.total`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` page`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Requesting a page past the last one is not an error: it returns an empty `,_jsx(_components.code,{children:`data`}),` with `,_jsx(_components.code,{children:`has_next_page: false`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsxs(_components.td,{children:[`Invalid `,_jsx(_components.code,{children:`page`}),` or `,_jsx(_components.code,{children:`page_size`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:`Unauthorized β invalid or missing API key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:`Contact not found for this API keyβs account`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`500`}),_jsx(_components.td,{children:`Internal Server Error`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`important-notes`,children:`Important Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Order is newest first.`}),` Page 1 holds the most recent messages.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Reading is side-effect free.`}),` Unlike v2, fetching messages here does `,_jsx(_components.strong,{children:`not`}),` mark the conversation as read, so polling this endpoint never changes what your agents see as unread.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Deleted Instagram messages are excluded`}),` from `,_jsx(_components.code,{children:`data`}),`, `,_jsx(_components.code,{children:`total`}),` and `,_jsx(_components.code,{children:`pages`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cross-channel`}),`: works for every channel a contact may use.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related Endpoints`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.a,{href:`/reference/contact/get-messages-paginated`,children:[`GET /api/public/contact/v2/`,`/messages`]}),` β legacy paginated history`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.a,{href:`/reference/contact/get-conversations`,children:[`GET /api/public/contact/`,`/conversations`]}),` β messages grouped into conversations`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.a,{href:`/reference/contact/get-info-of-an-ai-contact`,children:[`GET /api/public/contact/`,`/info`]}),` β contact info`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"get /api/public/contact/v3/{aiContactId}/messages","title":"Retrieve messages by AI contact with pagination","description":"Paginated message history, newest first. Prefer this over v2: `page` is 1-based and echoed back unchanged, `page_size` is configurable, and `total`/`pages` describe exactly what `data` contains β `data.length` never exceeds `page_size`, and summing `data` across all pages equals `total`. Unlike v2, the response contains only real messages: the synthetic \"stage\" and \"interactive_note\" entries that v2 injects are not messages and are not returned here. Also unlike v2, this endpoint is side-effect free: reading messages does NOT mark the conversation as read. Requesting a page beyond the last one returns an empty `data` with `has_next_page: false`.","href":"/reference/contact/get-messages-paginated-v3"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Path Parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Query Parameters","slug":"query-parameters","depth":2,"children":[]},{"title":"Response Structure","slug":"response-structure","depth":2,"children":[{"title":"Message Object","slug":"message-object","depth":3,"children":[]}]},{"title":"Example Request","slug":"example-request","depth":2,"children":[]},{"title":"Example Response","slug":"example-response","depth":2,"children":[]},{"title":"Fetching the Full History","slug":"fetching-the-full-history","depth":2,"children":[]},{"title":"Error Responses","slug":"error-responses","depth":2,"children":[]},{"title":"Important Notes","slug":"important-notes","depth":2,"children":[]},{"title":"Related Endpoints","slug":"related-endpoints","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"PublicAiContactController_getMessagesV3","summary":"Retrieve messages by AI contact with pagination","description":"Paginated message history, newest first. Prefer this over v2: `page` is 1-based and echoed back unchanged, `page_size` is configurable, and `total`/`pages` describe exactly what `data` contains β `data.length` never exceeds `page_size`, and summing `data` across all pages equals `total`. Unlike v2, the response contains only real messages: the synthetic \"stage\" and \"interactive_note\" entries that v2 injects are not messages and are not returned here. Also unlike v2, this endpoint is side-effect free: reading messages does NOT mark the conversation as read. Requesting a page beyond the last one returns an empty `data` with `has_next_page: false`.","parameters":["b1a8c0dd-442f-4836-8d61-e8f3201fdb8d","1bdb1896-8a01-4a9d-958e-ecbb12ca7b19","8ee1f2f7-19ba-4dc7-b213-bf1d96f17aff","0602a279-daf3-4fd9-8c6d-2d863f7bb36e"],"responses":{"200":"50a3c9a7-819b-4e63-95d0-de73f7a650ca","400":"a1ae61b9-8b25-48fa-a42a-f6723e3debc4","404":"3888e6d8-e3be-427e-a3d2-b6d259444869"},"tags":["Contact"],"method":"get","type":"path","servers":["abaa9908-61aa-4d34-a710-743319019f66"],"security":[],"path":"/api/public/contact/v3/{aiContactId}/messages","baseUrlOptions":["https://api.vambe.me"],"title":"Retrieve messages by AI contact with pagination","codeSamples":[],"requestExampleLanguages":["bash","javascript","python"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"b1a8c0dd-442f-4836-8d61-e8f3201fdb8d":{"name":"x-api-key","in":"header","description":"API key required to authorize the request","required":true,"schema":{"type":"string","isRequired":true,"description":"API key required to authorize the request","uniqueKey":"","typeLabel":"string"}},"1bdb1896-8a01-4a9d-958e-ecbb12ca7b19":{"name":"aiContactId","required":true,"in":"path","description":"ID of the AI contact","schema":{"type":"string","isRequired":true,"description":"ID of the AI contact","uniqueKey":"","typeLabel":"string"}},"8ee1f2f7-19ba-4dc7-b213-bf1d96f17aff":{"name":"page","required":false,"in":"query","description":"Page number, 1-based. Page 1 returns the newest messages. Defaults to 1.","schema":{"minimum":1,"maximum":9007199254740991,"default":1,"example":1,"type":"number","isRequired":false,"description":"Page number, 1-based. Page 1 returns the newest messages. Defaults to 1.","uniqueKey":"","typeLabel":"number"}},"0602a279-daf3-4fd9-8c6d-2d863f7bb36e":{"name":"page_size","required":false,"in":"query","description":"Messages per page, between 1 and 100. Defaults to 15.","schema":{"minimum":1,"maximum":100,"default":15,"example":15,"type":"number","isRequired":false,"description":"Messages per page, between 1 and 100. Defaults to 15.","uniqueKey":"","typeLabel":"number"}}},"responses":{"50a3c9a7-819b-4e63-95d0-de73f7a650ca":{"description":"Messages retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Messages for this page, newest first. The shape below is exhaustive and identical across channels: no channel-specific or internal fields are returned.","items":{"type":"object","properties":{"id":{"type":"string","description":"Always a string, including on channels whose ids are numeric internally.","example":"df980fc8-b6db-4820-bf22-2969482d106d","uniqueKey":"data.items.[INDEX].id","typeLabel":"string"},"created_at":{"type":"string","example":"2024-09-30T10:00:00.000Z","uniqueKey":"data.items.[INDEX].created_at","typeLabel":"string"},"body":{"type":"string","example":"Hola, necesito ayuda","uniqueKey":"data.items.[INDEX].body","typeLabel":"string"},"direction":{"type":"string","enum":["inbound","outbound","internal_note","ai_note","task"],"example":"inbound","uniqueKey":"data.items.[INDEX].direction","typeLabel":"enum\u003cstring>"},"type":{"type":"string","example":"text","uniqueKey":"data.items.[INDEX].type","typeLabel":"string"},"content":{"description":"Structured payload for non-text messages, as delivered by the channel. Shape is channel-defined: an object, an array (WhatsApp template components) or null. Do not assume a fixed shape.","uniqueKey":"data.items.[INDEX].content","typeLabel":"any"},"provider_message_id":{"oneOf":[{"type":"string","example":"wamid.HBgLNTY5MTIzNDU2NzgVAgARGBI5QTND","uniqueKey":"data.items.[INDEX].provider_message_id.oneOf.0","typeLabel":"string"},{"type":"null","example":"wamid.HBgLNTY5MTIzNDU2NzgVAgARGBI5QTND","uniqueKey":"data.items.[INDEX].provider_message_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].provider_message_id","typeLabel":"string | null"},"attribution_id":{"oneOf":[{"type":"string","uniqueKey":"data.items.[INDEX].attribution_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"data.items.[INDEX].attribution_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].attribution_id","typeLabel":"string | null"},"user":{"oneOf":[{"type":"object","properties":{"first_name":{"type":"string","example":"Jane","uniqueKey":"data.items.[INDEX].user.oneOf.0.first_name","typeLabel":"string"},"last_name":{"type":"string","example":"Doe","uniqueKey":"data.items.[INDEX].user.oneOf.0.last_name","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].user.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"first_name":{"type":"string","example":"Jane"},"last_name":{"type":"string","example":"Doe"}},"uniqueKey":"data.items.[INDEX].user.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].user","typeLabel":"object | null"},"assistant":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000","uniqueKey":"data.items.[INDEX].assistant.oneOf.0.id","typeLabel":"string"},"name":{"type":"string","example":"Vambe","uniqueKey":"data.items.[INDEX].assistant.oneOf.0.name","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].assistant.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"id":{"type":"string","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","example":"Vambe"}},"uniqueKey":"data.items.[INDEX].assistant.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].assistant","typeLabel":"object | null"},"campaign":{"oneOf":[{"type":"object","properties":{"title":{"type":"string","example":"ReactivaciΓ³n agosto","uniqueKey":"data.items.[INDEX].campaign.oneOf.0.title","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].campaign.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"title":{"type":"string","example":"ReactivaciΓ³n agosto"}},"uniqueKey":"data.items.[INDEX].campaign.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].campaign","typeLabel":"object | null"},"ticket_id":{"oneOf":[{"type":"string","description":"Ticket this message belongs to, when there is one.","example":"7c3e4f21-9b8a-4d5e-8f60-1a2b3c4d5e6f","uniqueKey":"data.items.[INDEX].ticket_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Ticket this message belongs to, when there is one.","example":"7c3e4f21-9b8a-4d5e-8f60-1a2b3c4d5e6f","uniqueKey":"data.items.[INDEX].ticket_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].ticket_id","typeLabel":"string | null"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data","typeLabel":"object[]"},"page":{"type":"number","description":"The requested page, echoed back.","example":1,"uniqueKey":"page","typeLabel":"number"},"page_size":{"type":"number","example":15,"uniqueKey":"page_size","typeLabel":"number"},"pages":{"type":"number","description":"Total number of pages. Valid values for `page` are 1..pages.","example":3,"uniqueKey":"pages","typeLabel":"number"},"total":{"type":"number","description":"Total messages for this contact, across all pages.","example":45,"uniqueKey":"total","typeLabel":"number"},"has_next_page":{"type":"boolean","example":true,"uniqueKey":"has_next_page","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":[{"id":"df980fc8-b6db-4820-bf22-2969482d106d","created_at":"2024-09-30T10:00:00.000Z","body":"Hola, necesito ayuda","direction":"inbound","type":"text","content":"\u003cunknown>","provider_message_id":"wamid.HBgLNTY5MTIzNDU2NzgVAgARGBI5QTND","attribution_id":"\u003cstring>","user":{"first_name":"Jane","last_name":"Doe"},"assistant":{"id":"123e4567-e89b-12d3-a456-426614174000","name":"Vambe"},"campaign":{"title":"ReactivaciΓ³n agosto"},"ticket_id":"7c3e4f21-9b8a-4d5e-8f60-1a2b3c4d5e6f"}],"page":1,"page_size":15,"pages":3,"total":45,"has_next_page":true}}},"exampleType":"generated"}},"exampleType":"generated"},"a1ae61b9-8b25-48fa-a42a-f6723e3debc4":{"description":"Invalid pagination parameters.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"3888e6d8-e3be-427e-a3d2-b6d259444869":{"description":"AI contact not found.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{},"servers":{"abaa9908-61aa-4d34-a710-743319019f66":{"url":"https://api.vambe.me","description":"Production Server"}}},"originalFileLocation":"openapi.json"},"subdomain":"vambe-f69d5806","siteName":"Welcome π","title":"Retrieve messages by AI contact with pagination - Welcome π","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-05T21:29:07.510Z","originalFileLocation":"reference/contact/get-messages-paginated-v3.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Paginated message history, newest first. Prefer this over v2: page is 1-based and echoed back unchanged, page_size is configurable, and total/pages describe exactly what data contains β data.length never exceeds page_size, and summing data across all pages equals total. Unlike v2, the response contains only real messages: the synthetic \u0026quot;stage\u0026quot; and \u0026quot;interactive_note\u0026quot; entries that v2 injects are not messages and are not returned here. Also unlike v2, this endpoint is side-effect free: reading messages does NOT mark the conversation as read. Requesting a page beyond the last one returns an empty data with has_next_page: false.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Welcome π\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vambe-f69d5806/FNR-14vKPkm5-pk-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/vambe-f69d5806/FNR-14vKPkm5-pk-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vambe-f69d5806/FNR-14vKPkm5-pk-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/vambe-f69d5806/FNR-14vKPkm5-pk-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/vambe-f69d5806/FNR-14vKPkm5-pk-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vambe-f69d5806/FNR-14vKPkm5-pk-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vambe-f69d5806/FNR-14vKPkm5-pk-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/vambe-f69d5806/FNR-14vKPkm5-pk-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/vambe-f69d5806/FNR-14vKPkm5-pk-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Retrieve messages by AI contact with pagination - Welcome π\">\u003cmeta data-mint-head property=\"og:description\" content=\"Paginated message history, newest first. Prefer this over v2: page is 1-based and echoed back unchanged, page_size is configurable, and total/pages describe exactly what data contains β data.length never exceeds page_size, and summing data across all pages equals total. Unlike v2, the response contains only real messages: the synthetic \u0026quot;stage\u0026quot; and \u0026quot;interactive_note\u0026quot; entries that v2 injects are not messages and are not returned here. Also unlike v2, this endpoint is side-effect free: reading messages does NOT mark the conversation as read. Requesting a page beyond the last one returns an empty data with has_next_page: false.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Welcome π\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.vambe.me/reference/contact/get-messages-paginated-v3\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://vambe-f69d5806.mintlify.app/_mintlify/api/og/v2?division=Contact+Management\u0026amp;title=Retrieve+messages+by+AI+contact+with+pagination\u0026amp;description=Paginated+message+history%2C+newest+first.+Prefer+this+over+v2%3A+%60page%60+is+1-based+and+echoed+back+unchanged%2C+%60page_size%60+is+configurable%2C+and+%60total%60%2F%60pages%60+desc\u0026amp;theme=a9686f96850bea0982ba3441\u0026amp;signature=d170c98e8134998211dfe352a9625232d84dcb839a5364bde1ac136eec1a1b58\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Retrieve messages by AI contact with pagination - Welcome π\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Paginated message history, newest first. Prefer this over v2: page is 1-based and echoed back unchanged, page_size is configurable, and total/pages describe exactly what data contains β data.length never exceeds page_size, and summing data across all pages equals total. Unlike v2, the response contains only real messages: the synthetic \u0026quot;stage\u0026quot; and \u0026quot;interactive_note\u0026quot; entries that v2 injects are not messages and are not returned here. Also unlike v2, this endpoint is side-effect free: reading messages does NOT mark the conversation as read. Requesting a page beyond the last one returns an empty data with has_next_page: false.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vambe-f69d5806.mintlify.app/_mintlify/api/og/v2?division=Contact+Management\u0026amp;title=Retrieve+messages+by+AI+contact+with+pagination\u0026amp;description=Paginated+message+history%2C+newest+first.+Prefer+this+over+v2%3A+%60page%60+is+1-based+and+echoed+back+unchanged%2C+%60page_size%60+is+configurable%2C+and+%60total%60%2F%60pages%60+desc\u0026amp;theme=a9686f96850bea0982ba3441\u0026amp;signature=d170c98e8134998211dfe352a9625232d84dcb839a5364bde1ac136eec1a1b58\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/vambe-f69d5806/FNR-14vKPkm5-pk-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Welcome π\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.vambe.me/reference/contact/get-messages-paginated-v3\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/contact/get-messages-paginated-v3.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.vambe.me/#organization\",\"name\":\"Welcome π\",\"url\":\"https://docs.vambe.me\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/vambe-f69d5806/_YFOlf0qgMJ8Che1/images/fb1a23e-small-Vambe_Logo_Panda-White4x.png?fit=max\u0026auto=format\u0026n=_YFOlf0qgMJ8Che1\u0026q=85\u0026s=c84b8be7abfa14dd8e1674a247b9cc0b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.vambe.me#website\",\"name\":\"Welcome π\",\"url\":\"https://docs.vambe.me\",\"publisher\":{\"@id\":\"https://docs.vambe.me/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.vambe.me/reference/contact/get-messages-paginated-v3#webpage\",\"url\":\"https://docs.vambe.me/reference/contact/get-messages-paginated-v3\",\"name\":\"Retrieve messages by AI contact with pagination\",\"description\":\"Paginated message history, newest first. Prefer this over v2: page is 1-based and echoed back unchanged, page_size is configurable, and total/pages describe exactly what data contains β data.length never exceeds page_size, and summing data across all pages equals total. Unlike v2, the response contains only real messages: the synthetic \\\"stage\\\" and \\\"interactive_note\\\" entries that v2 injects are not messages and are not returned here. Also unlike v2, this endpoint is side-effect free: reading messages does NOT mark the conversation as read. Requesting a page beyond the last one returns an empty data with has_next_page: false.\",\"dateModified\":\"2026-08-05T21:29:07.510Z\",\"isPartOf\":{\"@id\":\"https://docs.vambe.me#website\"},\"breadcrumb\":{\"@id\":\"https://docs.vambe.me/reference/contact/get-messages-paginated-v3#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.vambe.me/reference/contact/get-messages-paginated-v3#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Contact Management\",\"item\":\"https://docs.vambe.me/reference/contact/get-contacts-by-days\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Retrieve messages by AI contact with pagination\",\"item\":\"https://docs.vambe.me/reference/contact/get-messages-paginated-v3\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.vambe.me/reference/contact/get-messages-paginated-v3#apireference\",\"headline\":\"Retrieve messages by AI contact with pagination\",\"name\":\"Retrieve messages by AI contact with pagination\",\"description\":\"Paginated message history, newest first. Prefer this over v2: page is 1-based and echoed back unchanged, page_size is configurable, and total/pages describe exactly what data contains β data.length never exceeds page_size, and summing data across all pages equals total. Unlike v2, the response contains only real messages: the synthetic \\\"stage\\\" and \\\"interactive_note\\\" entries that v2 injects are not messages and are not returned here. Also unlike v2, this endpoint is side-effect free: reading messages does NOT mark the conversation as read. Requesting a page beyond the last one returns an empty data with has_next_page: false.\",\"url\":\"https://docs.vambe.me/reference/contact/get-messages-paginated-v3\",\"mainEntityOfPage\":{\"@id\":\"https://docs.vambe.me/reference/contact/get-messages-paginated-v3#webpage\"},\"dateModified\":\"2026-08-05T21:29:07.510Z\",\"publisher\":{\"@id\":\"https://docs.vambe.me/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.vambe.me#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Welcome π\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Welcome π","nav":{"global":null,"tabs":[{"tab":"Guides","icon":"book-open","pages":[{"title":"Guides","href":"/docs/quickstart"}]},{"tab":"Messaging API","icon":"messages","pages":[{"title":"Messaging API","href":"/reference/campaigns/create-campaign"}]},{"tab":"CRM \u0026 Contacts","icon":"users","groups":[{"group":"Contact Management","icon":"user","expanded":false,"pages":[{"openapi":"get /api/public/contacts","title":"Get contacts by time filters","href":"/reference/contact/get-contacts-by-days"},{"openapi":"get /api/public/contacts/search","title":"Search contacts by phone or email","href":"/reference/contact/search-contacts"},{"title":"Create Merge Customers By Ai Contact","openapi":"post /api/public/ai-customer/merge-customers/by-ai-contact","href":"/reference/ai-customer/post-api-public-ai-customer-merge-customers-by-ai-contact"},{"openapi":"post /api/public/customer/upsert/info","title":"Upsert a contact","href":"/reference/customer/upsert-customer-info"},{"openapi":"post /api/public/webchat/contact/add-metadata","title":"Add metadata for a webchat contact","href":"/reference/webchat/add-webchat-contact-metadata"},{"title":"Get all tags for an AI contact","openapi":"get /api/public/contact/tags/{aiContactId}","description":"Returns the tags the contact shows: its customer's tags (CONTACT type, shared by every contact of the same customer) plus the tags of its open tickets (TICKET type). Each item is the tag itself (`id`, `value`) with the date it was assigned.","href":"/reference/contact/get-all-tags-for-an-ai-contact"},{"openapi":"get /api/public/contact/v3/{aiContactId}/messages","title":"Retrieve messages by AI contact with pagination","href":"/reference/contact/get-messages-paginated-v3"},{"openapi":"get /api/public/contact/v2/{aiContactId}/messages","title":"Retrieve messages by AI contact with pagination","description":"Replaces the old endpoint /public/ai-message/:aiContactId","href":"/reference/contact/get-messages-paginated"},{"openapi":"get /api/public/contact/whatsapp/{channelIdentifier}/info","title":"Retrieve info by channel identifier","href":"/reference/contact/retrieve-info-by-channel-identifier"},{"openapi":"get /api/public/contact/whatsapp/{channelIdentifier}/messages","title":"Retrieve messages by conversation","href":"/reference/contact/retrieve-messages-by-conversation"},{"openapi":"get /api/public/contact/{aiContactId}/conversations","title":"Retrieve conversations by AI contact","href":"/reference/contact/get-conversations"},{"openapi":"get /api/public/contact/{aiContactId}/info","title":"Get info of an AI contact","href":"/reference/contact/get-info-of-an-ai-contact"},{"openapi":"get /api/public/contact/{aiContactId}/messages","title":"Retrieve messages by AI contact","href":"/reference/contact/retrieve-messages-by-ai-contact"},{"openapi":"post /api/public/contact/{aiContactId}/update-metadata","title":"Update metadata to an AI contact","href":"/reference/contact/update-contact-metadata"},{"openapi":"patch /api/public/contact/tags/{aiContactId}","title":"Update all the tags from an AI contact","href":"/reference/tags/update-contact-tags"},{"openapi":"post /api/public/contact/{aiContactId}/assign-team-member/{teamMemberId}","title":"Assign an team member to an AI contact","href":"/reference/team-members/assign-team-member-to-contact"}]},{"group":"Pipeline \u0026 Stages","icon":"list-tree","expanded":false,"pages":[{"openapi":"get /api/public/pipeline","title":"Get Pipelines","href":"/reference/publicpipeline/get-pipelines"}]},{"group":"Tags \u0026 Labels","icon":"tags","expanded":false,"pages":[{"openapi":"get /api/public/tags","title":"Get all tags","href":"/reference/tags/get-all-tags"}]},{"group":"AI Run Logs","icon":"list-tree","expanded":false,"pages":[{"openapi":"get /api/public/run-logs","title":"Retrieve run logs by AI contact or by voice call","href":"/reference/run-logs/get-run-logs-by-ai-contact"}]},{"group":"Tickets \u0026 Support","icon":"ticket","expanded":false,"pages":[{"title":"List ticket feedbacks","openapi":"get /api/public/ticket-feedback","href":"/reference/ticket-feedback/list-ticket-feedbacks"}]},{"group":"Team Management","icon":"user-plus","expanded":false,"pages":[{"openapi":"get /api/public/team-members/all","title":"Get all team members","href":"/reference/team-members/get-all-team-members"}]},{"group":"Partners","icon":"handshake","expanded":false,"pages":[{"title":"List partner pipeline deals","openapi":"get /api/public/partners/pipeline","href":"/reference/public-partners/list-partner-pipeline-deals"},{"title":"Validate a partner code","openapi":"post /api/public/partners/auth/validate","href":"/reference/public-partners/validate-a-partner-code"}]},{"group":"Deprecated","icon":"clock","expanded":false,"pages":[{"title":"Get WhatsApp Contacts (Deprecated)","openapi":"get /api/public/whatsapp/contact/contacts","href":"/reference/whatsapp-contact/get-contacts"}]}]},{"tab":"Analytics \u0026 Reports","icon":"chart-line","pages":[{"title":"Analytics \u0026 Reports","href":"/reference/utm-events/create-custom-utm-event"}]},{"tab":"Knowledge Base","icon":"book-open","pages":[{"title":"Knowledge Base","href":"/reference/knowledge-base/get-folders"}]},{"tab":"Ecommerce","icon":"box","pages":[{"title":"Ecommerce","href":"/reference/product/get-product-blocks"}]},{"tab":"Appointments","icon":"calendar","pages":[{"title":"Appointments","href":"/reference/booking-url/get-api-public-booking-url-urlname"}]},{"tab":"Events","icon":"bolt","pages":[{"title":"Events","href":"/reference/events-api/ingest-a-customer-event"}]},{"tab":"Webhooks","icon":"webhook","pages":[{"title":"Webhooks","href":"/reference/webhooks/get-all-webhooks-for-the-authenticated-user"}]},{"tab":"Tasks","icon":"list-check","pages":[{"title":"Tasks","href":"/reference/tasks/get-tasks"}]},{"tab":"Custom Ecommerce Apps","icon":"puzzle-piece","pages":[{"title":"Custom Ecommerce Apps","href":"/docs/app-platform/introduction"}]}]},"basePath":"","title":"Retrieve messages by AI contact with pagination - Welcome π","buildId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","deploymentId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C8RPHPxo.js","utils-0BK-9q6z.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DfjzsUJT.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B4v9psJ4.js","snippetPresets-CpTQv-Ez.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BNP-Fvr0.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BSgu6h1D.js","shallow-Biv1i9Gs.js","getApiPlaygroundDisplay-BoGOXhtF.js","CodeSnippet-DvQoT18_.js","CodeSnippets-Dnpa15xT.js","Page-Buji1S4J.js","getPastedJson-xAIyhUFE.js","icon-S6FBih11.js","MethodPill-SaYeUZyk.js","DuplicateIcon-Cs-p3v2Q.js","createIcon-DjCFEoHq.js","DynamicMarkdown-BcnBltEQ.js","SectionHeading-BUBl0eEF.js","axios-vUo_bRtp.js","Markdown-h4cOoD8d.js","clsx-B2v50t8t.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DJnKvr0g.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BHrrjR1K.js"]}