> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snipp.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# List Live Chat

> Read a stream's chat, newest page first, then poll for new messages.

Read a stream's chat. The chat stays between broadcasts, so it can be read while the user is offline.

## Behavior

* Without `after`, returns the newest 50 messages, oldest first. Poll with `after` set to the previous response's `last_id` to get only new messages, again oldest first and up to 50 at a time. `last_id` counts messages that were left out, so a run of hidden messages never stalls your polling.
* Pass the previous response's `now` as `since` to learn which messages were removed since then: their ids come back in `removed`, at most 50. Drop them, or fetch the chat again to see them as removed; if 50 came back, fetch the chat again without `after` to catch any beyond that. See [Pagination](https://docs.snipp.gg/concepts/pagination.md).
* A removed message has `deleted: true` and `body: null`. `deleted_by` names who removed it, but only for the streamer, their moderators and staff; everyone else gets `null`. Messages deleted by their own author are left out entirely.
* `role` is `streamer` or `moderator` for those authors, otherwise `null`.
* `reply_to` quotes the message being replied to, with `body: null` and `deleted: true` if that message was removed. It is `null` if that message's author deleted it.
* Messages from users you blocked or who blocked you, and from suspended users, are left out.
* `restricted` is `timed_out` or `banned` while that author is timed out or banned from this chat, otherwise `null`. It is only included for the streamer, their moderators and staff.
* `restriction` says whether you yourself are timed out or banned here, with `expires_at` for a timeout and `null` for a ban. It is `null` when you can chat.
* While the streamer has the chat turned off, `chat_messages` and `removed` are empty.
* If the streamer blocked you, the response is `403` with type `blocked`.

## Example

```bash theme={null}
curl "https://api.snipp.gg/users/987654321098765432/live/chat?after=127" \
  -H "api-key: YOUR_API_KEY"
```


## OpenAPI

````yaml api-reference/openapi.json GET /users/{id}/live/chat
openapi: 3.0.0
info:
  title: Snipp.gg API
  description: Image and video hosting API. Upload, manage, and share media files.
  version: 3.0.0
servers:
  - url: https://api.snipp.gg
    description: Default. Load-balanced across regions. No upload cap.
  - url: https://eu-west-1.api.snipp.gg
    description: EU West regional endpoint. Pins uploads and storage to EU West.
  - url: https://us-west-1.api.snipp.gg
    description: US West regional endpoint. Pins uploads and storage to US West.
  - url: https://flux.snipp.gg
    description: Alternative host. Capped at 100 MB per upload.
security:
  - apiKeyAuth: []
paths:
  /users/{id}/live/chat:
    get:
      summary: List Live Chat
      description: Read a stream's chat, newest page first, then poll for new messages.
      operationId: listLiveChat
      parameters:
        - $ref: '#/components/parameters/UserId'
        - name: after
          in: query
          required: false
          schema:
            type: integer
          description: Only messages with an `id` greater than this, oldest first.
        - name: since
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            Pass the previous response's `now` to get the ids of messages
            removed since then in `removed`.
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  chat_messages:
                    type: array
                    maxItems: 50
                    items:
                      $ref: '#/components/schemas/ChatMessage'
                  removed:
                    type: array
                    items:
                      type: integer
                  last_id:
                    type: integer
                    description: >-
                      The highest message `id` this response read, counting
                      messages left out. Pass it as `after` on your next poll.
                      `null` when the chat is empty.
                    nullable: true
                  now:
                    type: string
                    format: date-time
                  restriction:
                    type: object
                    nullable: true
                    description: >-
                      Whether you are timed out or banned from this chat. `null`
                      when you can chat.
                    properties:
                      type:
                        type: string
                        enum:
                          - timed_out
                          - banned
                      expires_at:
                        type: string
                        format: date-time
                        nullable: true
                        description: When the timeout ends. `null` for a ban.
                    required:
                      - type
                      - expires_at
                required:
                  - chat_messages
                  - removed
                  - last_id
                  - now
                  - restriction
              example:
                chat_messages:
                  - id: 128
                    body: gg
                    created_at: '2026-11-03T08:05:12.000Z'
                    role: null
                    author:
                      id: '9876543210'
                      username: snipp
                      nickname: Snipp
                      avatar: https://cdn.snipp.gg/avatar.png
                      verified: true
                      plan: free
                    reply_to:
                      id: 127
                      author:
                        id: '1234567890'
                        username: nitcord
                        nickname: nitcord
                        avatar: https://cdn.snipp.gg/avatar.png
                        verified: true
                        plan: ultra
                      body: welcome to the stream
                      deleted: false
                    deleted: false
                    deleted_by: null
                removed: []
                last_id: 128
                now: '2026-11-03T08:05:20.000Z'
                restriction: null
          headers:
            request-id:
              $ref: '#/components/headers/RequestId'
        '400':
          $ref: '#/components/responses/E400'
        '401':
          $ref: '#/components/responses/E401'
        '403':
          $ref: '#/components/responses/E403'
        '404':
          $ref: '#/components/responses/E404'
        '405':
          $ref: '#/components/responses/E405'
        '429':
          $ref: '#/components/responses/E429'
        '500':
          $ref: '#/components/responses/E500'
components:
  parameters:
    UserId:
      name: id
      in: path
      required: true
      description: User ID, or `@me` for your own account.
      schema:
        type: string
      example: '@me'
  schemas:
    ChatMessage:
      type: object
      properties:
        id:
          type: integer
        body:
          type: string
          nullable: true
          maxLength: 200
          description: '`null` when a moderator removed the message.'
        created_at:
          type: string
          format: date-time
        role:
          type: string
          enum:
            - streamer
            - moderator
          nullable: true
        author:
          $ref: '#/components/schemas/UserRef'
        reply_to:
          allOf:
            - $ref: '#/components/schemas/ChatReply'
          nullable: true
        deleted:
          type: boolean
          description: A moderator, the streamer or staff removed it.
        deleted_by:
          allOf:
            - $ref: '#/components/schemas/UserRef'
          nullable: true
          description: >-
            Who removed it. Only shown to the streamer, their moderators and
            staff.
        restricted:
          type: string
          enum:
            - timed_out
            - banned
          nullable: true
          description: >-
            Whether the author is timed out or banned from this chat right now.
            Only included for the streamer, their moderators and staff.
      required:
        - id
        - body
        - created_at
        - role
        - author
        - reply_to
        - deleted
        - deleted_by
    UserRef:
      type: object
      properties:
        id:
          type: string
          description: User ID (snowflake).
        username:
          type: string
          nullable: true
        nickname:
          type: string
          nullable: true
        avatar:
          type: string
          description: Avatar URL. Falls back to `https://cdn.snipp.gg/avatar.png`.
        verified:
          type: boolean
        plan:
          $ref: '#/components/schemas/Plan'
      required:
        - id
        - username
        - nickname
        - avatar
        - verified
        - plan
      description: A user embedded inside another resource.
    ChatReply:
      type: object
      description: The message this one replies to.
      properties:
        id:
          type: integer
        author:
          $ref: '#/components/schemas/UserRef'
        body:
          type: string
          nullable: true
          description: '`null` when the original was removed.'
        deleted:
          type: boolean
      required:
        - id
        - author
        - body
        - deleted
    Error:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
      description: Every non-2xx response has this body.
    Plan:
      type: string
      enum:
        - free
        - plus
        - ultra
    ErrorDetail:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        message:
          type: string
          description: Human-readable sentence. Do not match on it; use `type`.
        username:
          type: string
          description: >-
            `suspended` on `GET /users/{id}` only: the suspended user's
            username.
        quota:
          type: integer
          description: '`quota_exceeded` only: weekly quota in bytes.'
        used:
          type: integer
          description: '`quota_exceeded` only: bytes used in the current window.'
        resets_at:
          type: string
          format: date-time
          description: '`quota_exceeded` only: when the weekly window resets.'
          nullable: true
        failed:
          type: array
          items:
            $ref: '#/components/schemas/FailedFile'
          description: '`upload_failed` only: one entry per file.'
        expires_at:
          type: string
          format: date-time
          description: '`timed_out` only: when the timeout ends.'
        retry_at:
          type: string
          format: date-time
          description: '`slow_mode` only: when you can send your next message.'
        missing:
          type: array
          items:
            type: integer
          description: >-
            `Missing chunks.` on the last piece of a chunked upload only:
            zero-based indexes of the pieces the server does not have. Send
            them, then the last piece again.
      required:
        - type
        - message
    ErrorType:
      type: string
      enum:
        - invalid_request
        - unauthorized
        - forbidden
        - suspended
        - blocked
        - moderated
        - plan_required
        - timed_out
        - banned
        - chat_off
        - slow_mode
        - not_found
        - method_not_allowed
        - file_too_large
        - unsupported_type
        - quota_exceeded
        - rate_limited
        - upload_failed
        - internal
        - unavailable
      description: Machine-readable error category. See [Errors](/concepts/errors).
    FailedFile:
      type: object
      properties:
        index:
          type: integer
          description: Zero-based position of the file in the request.
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - index
        - error
      description: >-
        A file that was not stored. `error` has the same shape as a top-level
        error.
  headers:
    RequestId:
      description: Unique ID for the request. Include it when contacting support.
      schema:
        type: string
        format: uuid
  responses:
    E400:
      description: Invalid request
      headers:
        request-id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E401:
      description: Missing or invalid key
      headers:
        request-id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E403:
      description: Not allowed
      headers:
        request-id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E404:
      description: Not found
      headers:
        request-id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E405:
      description: Method not allowed
      headers:
        request-id:
          $ref: '#/components/headers/RequestId'
        Allow:
          description: Methods this path accepts.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E429:
      description: Rate limited
      headers:
        request-id:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    E500:
      description: Internal error
      headers:
        request-id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: api-key
      description: Your API key from an app on snipp.gg/settings/apps

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.