> For the complete documentation index, see [llms.txt](https://offerslook-api.gitbook.io/api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://offerslook-api.gitbook.io/api-documentation/affiliate_api/offer_postbacks/create_postback_for_an_offer.md).

# Create Postback for an offer

| HTTP method | Endpoint                     |
| ----------- | ---------------------------- |
| **POST**    | **/aff/v1/offer\_postbacks** |

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

| Field     | Type    | Description                                                                                   | Nullable |
| --------- | ------- | --------------------------------------------------------------------------------------------- | -------- |
| offer\_id | integer |                                                                                               | No       |
| event\_id | integer | Event id.                                                                                     |          |
| code      | string  | Must be URL format.                                                                           | No       |
| type      | integer | The type of Postback URL.   Allowed values:   1:Image Pixel;   2:Postback URL;   3:HTML Pixel | No       |

**Note:offer\_id = 0, representing the choice of offers all.**

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

| Field         | Type    | Description                                                                         |
| ------------- | ------- | ----------------------------------------------------------------------------------- |
| id            | integer | Affiliate postback id.                                                              |
| offer\_id     | integer | Offer id.                                                                           |
| affiliate\_id | integer | Affiliaite id                                                                       |
| event\_id     | integer | Event id.                                                                           |
| code          | string  | Code.                                                                               |
| status        | string  | Status of Postback.  Pending;  Approved;  rejected                                  |
| type          | string  | Type of code.  0: Global Postback   1:Image Pixel;   2:Postback URL;   3:HTML Pixel |
| create\_time  | integer | Create time.                                                                        |
| update\_time  | integer | Update time.                                                                        |

## Tracking Parameters

|                 |                 |                  |                 |
| --------------- | --------------- | ---------------- | --------------- |
| {click\_id}     | {offer\_id}     | **{event\_id}**  | {country\_id}   |
| {aff\_id}       | {adv\_id}       | **{adv\_sub1}**  | **{adv\_sub2}** |
| **{adv\_sub3}** | {aff\_sub1}     | {aff\_sub2}      | {aff\_sub3}     |
| {aff\_sub4}     | {aff\_sub5}     | {source\_id}     | {agent}         |
| {click\_time}   | {payout}        | {referer}        | {accept\_lan}   |
| {ip}            | {unique\_click} | {currency}       | {ios\_idfa}     |
| {android\_id}   | {google\_aid}   | {conversion\_ip} | {amount}        |

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

**Request POST** <https://{networkname}.api.offerslook.com/aff/v1/offer_postbacks>

**Request POST** <http://{networkname}.api.offerslook.com/aff/v1/offer_postbacks>

```
    {
      "offer_id": 5,
      "event_id": 1,
      "code": "http: //offerslook.com",
      "type": 2
    }
```

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

```
    {
      "code": 0,
      "message": "Success",
      "data": {
        "affiliate_postback": {
          "id": 51,
          "offer_id": 5,
          "affiliate_id": 7,
          "event_id": 1,
          "type": 2,
          "code": "http://offerslook.com",
          "status": "pending",
          "create_time": 1468315887,
          "update_time": 1468315887
        }
      }
    }
```
