List an attendee's messages
Early access. Tell us what you're building and we'll set you up. Contact us
api.lempile.com/api/v1/chat_attendees/{attendee_id}/messagesA MessageList: the messages of the account's chat with them. Opens the conversation only when the inbox can't answer (marks_seen: true when it opened messages the account hadn't seen).
Scope: accounts.read.
Authentication
X-API-KEY header·A Lempile API key, made in the dashboard under Access tokens.Path parameters
attendee_idstringrequiredThe person's
provider_id.
Query parameters
account_idstringrequiredThe connected Instagram account: its Lempile id (a UUID), its Instagram user id or its username.
limitinteger1 to 250 (default 20).
Default20≥ 1 · ≤ 250cursorstringThe previous page's
cursor.
Responses
200The messages.
›
application/json
objectanyAlwaysMessageListitemsarray of Message›Show fieldsHide fields
objectanyAlwaysMessageidstringmessage_idstringprovider_idstringInstagram's message id alone.
account_idstringchat_idstringchat_provider_idstringsender_idstringsender_attendee_idstringtextstring | nullattachmentsarray of object›Show fieldsHide fields
idstringtypestringOne ofimgvideoaudiomedia_shareprofileurlstringInstagram's own link, which expires:
GET /messages/{message_id}/attachments/{attachment_id}reads the file.voice_notebooleanpostobjectstoryobject
timestampstring · date-timeis_senderinteger1for the account's own messages.One of01reactionsarray of object›Show fieldsHide fields
valuestringsender_idstringis_senderboolean
seenintegerOne of01seen_byobjecthiddenintegerOne of01deletedintegerOne of01editedintegerOne of01is_eventintegerOne of01deliveredintegerOne of01behaviornulloriginalstringmessage_typestring | nullSTORY_MENTION: they mentioned the account in their story.STORY_REPLY: they answered one of its stories.null: a plain message.One ofSTORY_MENTIONSTORY_REPLYnullmarks_seenboolean
cursorstring | nullPass it back as
cursorfor the next page;nullwhen there's no more.
400errors/invalid_parameters: a field Lempile won't take; detail names it. Nothing was opened.
›
errors/invalid_parameters: a field Lempile won't take; detail names it. Nothing was opened.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
401A missing or invalid API key answers { "error": "unauthorized", "message" }. errors/disconnected_account (problem JSON): Instagram signed the account out; connect it again.
›
{ "error": "unauthorized", "message" }. errors/disconnected_account (problem JSON): Instagram signed the account out; connect it again.application/json
errorstringrequiredmessagestring
402subscription_required (in error): the workspace has no active trial or subscription.
›
subscription_required (in error): the workspace has no active trial or subscription.application/json
errorstringrequiredmessagestring
403errors/insufficient_permissions (the key lacks the scope), errors/account_restricted (Instagram blocked the action, restricted the account or asks for a check: someone has to look at it on Instagram) or errors/action_required (the account waits for something done on Instagram itself; account_status and reason say what).
›
errors/insufficient_permissions (the key lacks the scope), errors/account_restricted (Instagram blocked the action, restricted the account or asks for a check: someone has to look at it on Instagram) or errors/action_required (the account waits for something done on Instagram itself; account_status and reason say what).application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
404errors/resource_not_found: no such account in this workspace, or no such chat, message, person or post.
›
errors/resource_not_found: no such account in this workspace, or no such chat, message, person or post.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
429errors/too_many_requests: the account's pace (code: too_fast, daily_limit or hourly_limit; wait until retry_at), or Instagram's own "Try again later" (retry_after: 86400: wait a day before writing from the account again). Nothing was done.
›
errors/too_many_requests: the account's pace (code: too_fast, daily_limit or hourly_limit; wait until retry_at), or Instagram's own "Try again later" (retry_after: 86400: wait a day before writing from the account again). Nothing was done.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
501errors/feature_not_implemented: a field or option Lempile doesn't do for Instagram (detail says which), or an account of another network. Nothing was done.
›
errors/feature_not_implemented: a field or option Lempile doesn't do for Instagram (detail says which), or an account of another network. Nothing was done.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
503errors/service_unavailable: the account isn't ready yet, or its browser can't be reached right now. Nothing was done.
›
errors/service_unavailable: the account isn't ready yet, or its browser can't be reached right now. Nothing was done.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
504errors/request_timeout: Instagram didn't answer within 100 seconds. A read changed nothing: try again.
›
errors/request_timeout: Instagram didn't answer within 100 seconds. A read changed nothing: try again.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringWhat happened, in words, and whether anything was done.
codestringOn a
429:too_fast,daily_limitorhourly_limit.retry_afterintegerSeconds to wait.
retry_atstring · date-time
Was this page helpful?