# Upload a new thumbnail

| HTTP method | Endpoint                              |
| ----------- | ------------------------------------- |
| **POST**    | **/v1/offers/{offer\_id}/thumbnails** |

## Path parameters <a href="#path-parameters" id="path-parameters"></a>

| Parameter | Description                  |
| --------- | ---------------------------- |
| offer\_id | The unique id for the offer. |

***Note:The format of the thumbnail uploaded should be image/png, image/gif, image/jpeg, and the pixel size must be between 160 to 500.***

## Request body parameters <a href="#request-body-parameters" id="request-body-parameters"></a>

| Field | Type | Description      | Nullable |
| ----- | ---- | ---------------- | -------- |
| file  | file | Upload the file. | No       |

## Response body parameters <a href="#response-body-parameters" id="response-body-parameters"></a>

| Field     | Type    | Description                                                   |
| --------- | ------- | ------------------------------------------------------------- |
| id        | integer | A string that uniquely identifies this thumbnail.             |
| offer\_id | integer | A string that uniquely identifies this offer.                 |
| url       | string  | The url of the thumbnail preview.                             |
| mime      | string  | content-type.                                                 |
| size      | integer | The size of the file in bytes.                                |
| width     | integer | The width of the image.                                       |
| height    | integer | The height of the image.                                      |
| filename  | string  | The name of the file that was uploaded, optionally passed in. |

## Example request <a href="#example-request" id="example-request"></a>

**Request POST** <https://{networkname}.api.offerslook.com/v1/offers/23/thumbnails>

**Request POST** <http://{networkname}.api.offerslook.com/v1/offers/23/thumbnails>

## Example response <a href="#example-response" id="example-response"></a>

```
    {
      "code": 0,
      "message": "Success",
      "data": {
        "offer_thumbnail": {
          "id": 87,
          "offer_id": 23,
          "url": "https://files.offerslook.com/offerslook-bucket/partner_40/campaign/thumb_logo_d66f5ac4e2484a55ab55881167988321.png",
          "mime": "image/png",
          "size": 3901,
          "width": 160,
          "height": 160,
          "filename": "logo.png"
        }
      }
    }
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://offerslook-api.gitbook.io/api-documentation/networkapi/offers/sub-resources/thumbnails/upload_a_new_thumbnail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
