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

# Xquik support ticket API for request media uploads

> Upload or download private support ticket screenshots and videos with authenticated multipart requests and attachment IDs. Video downloads accept 1 byte range.

<Panel>
  <Tabs defaultTabIndex={0} sync={false}>
    <Tab title="200" id="response-support-media-200">
      ```text theme={null}
      <string>
      ```
    </Tab>

    <Tab title="206" id="response-support-media-206">
      ```text theme={null}
      <string>
      ```
    </Tab>

    <Tab title="401" id="response-support-media-401">
      ```json theme={null}
      {
        "error": "unauthenticated",
        "message": "Authentication required. Provide a valid API key or bearer token."
      }
      ```
    </Tab>

    <Tab title="404" id="response-support-media-404">
      ```json theme={null}
      {
        "error": "not_found",
        "message": "Resource not found."
      }
      ```
    </Tab>

    <Tab title="416" id="response-support-media-416">
      ```json theme={null}
      {
        "error": "invalid_range",
        "message": "Use one valid byte range."
      }
      ```
    </Tab>

    <Tab title="429" id="response-support-media-429">
      ```json theme={null}
      {
        "error": "rate_limit_exceeded",
        "message": "Too many requests. Try again later.",
        "retryAfter": 60
      }
      ```
    </Tab>
  </Tabs>
</Panel>

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

Support attachments stay private. Every download requires authentication and access to the parent ticket.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://xquik.com/api/v1/support/attachments/att_a1b2c3d4e5f6a1b2c3d4e5f6 \
    -H "x-api-key: xq_YOUR_KEY_HERE" \
    --output attachment.bin
  ```

  ```javascript Node.js theme={null}
  const attachmentId = "att_a1b2c3d4e5f6a1b2c3d4e5f6";
  const response = await fetch(`https://xquik.com/api/v1/support/attachments/${attachmentId}`, {
    headers: { "x-api-key": "xq_YOUR_KEY_HERE" },
  });
  const bytes = new Uint8Array(await response.arrayBuffer());
  ```

  ```python Python theme={null}
  import requests

  attachment_id = "att_a1b2c3d4e5f6a1b2c3d4e5f6"
  response = requests.get(
      f"https://xquik.com/api/v1/support/attachments/{attachment_id}",
      headers={"x-api-key": "xq_YOUR_KEY_HERE"},
  )
  response.raise_for_status()
  media_bytes = response.content
  ```
</CodeGroup>

## Path parameters

<ParamField path="id" type="string" required>
  Attachment public ID from a ticket message or upload receipt.
</ParamField>

## Headers

<ParamField header="x-api-key" type="string" required>
  Your API key. Session cookie authentication is also supported.
</ParamField>

<ParamField header="Range" type="string">
  1 standard byte range for video seeking or resumable downloads. Example: `bytes=0-1048575`.
</ParamField>

## Supported media

| Kind | Formats | Per-file limit |
| - | - | -: |
| Image | JPEG, PNG, GIF, WebP | 10 MB |
| Video | MP4, MOV, WebM | 25 MB |

Each message accepts up to 4 files and 30 MB combined. Per-account upload limits also apply. A `429` response includes `Retry-After`.

Xquik validates file signatures and ignores the declared content type. A renamed file with the wrong format fails validation.

## Agent workflow

1. Send multipart fields named `attachments`.
2. Read each returned receipt.
3. Treat `ready` as downloadable.
4. Treat `failed` as unavailable and ask the user to retry.
5. Fetch the ticket before downloading media.
6. Use the returned authenticated `url` unchanged.
7. Reuse the submission `Idempotency-Key` when you retry after a network failure.

Ticket and reply retries return the original media receipts. A lost response then creates no duplicate ticket, message, or stored file.

Never convert the relative `url` into a public link. It requires the same account authentication as the ticket.

## Range example

Video downloads support 1 standard byte range. Use ranges for seeking or resumable playback.

```bash theme={null}
curl https://xquik.com/api/v1/support/attachments/att_a1b2c3d4e5f6a1b2c3d4e5f6 \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Range: bytes=0-1048575" \
  --output video-part.bin
```

## Response

<Tabs>
  <Tab title="200 OK">
    Returns the complete image or video body with its validated content type.
  </Tab>

  <Tab title="206 Partial content">
    Returns the requested byte range with `Content-Range` and `Accept-Ranges: bytes`.
  </Tab>

  <Tab title="401 Unauthenticated">
    Refresh authentication before retrying.
  </Tab>

  <Tab title="404 Not found">
    The media is missing, unavailable, or outside the authenticated account.
  </Tab>

  <Tab title="416 Range not satisfiable">
    Correct the `Range` header before retrying.
  </Tab>

  <Tab title="429 Rate limited">
    Wait for the `Retry-After` value.
  </Tab>
</Tabs>

## Agent status map

| Status | Meaning | Agent action |
| - | - | - |
| `200` | Complete media | Read or save the body. |
| `206` | Requested byte range | Continue range requests when needed. |
| `401` | Authentication failed | Refresh authentication. |
| `404` | Missing or unauthorized | Do not reveal which condition applied. |
| `416` | Invalid range | Correct the `Range` header. |
| `429` | Download limit reached | Wait for `Retry-After`. |

<Note>
  Create media with [Create Ticket](/api-reference/support/create) or [Reply to Ticket](/api-reference/support/reply). Read attachment metadata with [Get Ticket](/api-reference/support/get).
</Note>


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