Docs menu

List a chat's files

GET/v1/profiles/{profile_id}/chats/{chat_id}/attachments

  • Scope messages:read
  • Pages with before

Photos and files shared in the chat, newest first. limit and before count messages (before is a message id).

Parameters

Path

  • profile_idstringrequired

    The line (prf_…).

  • chat_idstringrequired

    The chat (cht_…).

Query

  • limitinteger

    Items per page, 1–200 (default 50).

  • beforestring

    The next_before of the previous page.

Response

200 OKA page of files.

  • object"list"required

  • dataarray of ChatAttachmentrequired

    Fields of data
    • idstringrequired

      att_…

    • file_namestring or nullrequired

    • mime_typestring or nullrequired

    • size_bytesinteger or nullrequired

    • urlstringrequired

    • object"attachment"required

    • message_idstringrequired

      msg_…

    • direction"inbound" | "outbound"required

    • sent_attimestamprequired

  • has_morebooleanrequired

    More items exist after this page.

  • next_beforestring or nullrequired

    Pass as before for the next page; null on the last one.

Errors

StatusCodeMeans
400validation_failedA field is missing or invalid.
401unauthorizedThe API key is missing, unknown or revoked.
403insufficient_scopeThe API key lacks the scope this needs.
404not_foundNo such object, or the key can't see it.

Every error is { "error": { "code", "message" } }. All error codes.

Keys come with your first line.

Request an invite and we'll set up a line for your team. API access is part of every plan.

Request an invite