{
    "openapi": "3.1.0",
    "info": {
        "title": "Offerwall.GG Publisher API",
        "version": "1.0.0",
        "summary": "Rewarded offers, click tracking and conversion postbacks.",
        "description": "Two ways to integrate, and you can use both at once.\n\n**The hosted wall** — put `/wall/{publicKey}?userId=…` in an iframe and\nyou are done. We render the offers, track the clicks, take the network\npostbacks and send you one signed callback per conversion.\n\n**The JSON API** — call `/api/v1/offers` and draw your own wall. Same\ntargeting, same rewards, same click URLs. You still receive the same\nsigned conversion postback; the API is for presentation, never for\npayment.\n\n## Authentication\n\nEvery `/api/v1/*` call identifies the placement with `appId` (your\n32-character public key, safe to expose) and authenticates with the\nsecret key. Send the secret as the `X-Api-Key` header. If you cannot\nset headers, sign the request instead — see the `SignedQuery` scheme.\nNever put the secret itself in a URL.\n\n## Envelope\n\nEvery response, success or failure, has the same shape:\n\n```json\n{ \"success\": true,  \"data\": { } }\n{ \"success\": false, \"error\": \"Unknown appId.\" }\n```\n\n## Money\n\nReward amounts come back already converted into your app's own\ncurrency, at your app's exchange rate, and are already your\nearnings — there is no arithmetic left to do. Every amount is\nrecorded on the conversion as it stood that day, so changing your\nrate later never rewrites history.\n\n## Rate limits\n\n`/offers` allows 120 requests per minute per IP; the other endpoints\nallow 60. Over the limit you get `429` with a `Retry-After` header in\nseconds. These are per IP, not per key.\n\n## Conventions\n\n* All money is USD with 6 decimal places.\n* All timestamps are UTC, `YYYY-MM-DD HH:MM:SS`.\n* Countries are ISO 3166-1 alpha-2, uppercase. `*` means everywhere.\n* An offer is never deleted, only deactivated — a click made days ago\n  still has to resolve.",
        "contact": {
            "name": "Offerwall.GG support",
            "email": "support@offerwall.gg",
            "url": "https://offerwall.gg/contact"
        },
        "license": {
            "name": "Proprietary",
            "url": "https://offerwall.gg/terms"
        }
    },
    "servers": [
        {
            "url": "https://offerwall.gg",
            "description": "Production"
        }
    ],
    "tags": [
        {
            "name": "Offers",
            "description": "The inventory available to one placement, already targeted."
        },
        {
            "name": "Conversions",
            "description": "Completed offers. For reconciliation — real-time delivery is the postback."
        },
        {
            "name": "Reporting",
            "description": "Daily rollups and totals."
        },
        {
            "name": "Wall",
            "description": "The hosted offerwall and its click tracker. HTML and redirects, not JSON."
        },
        {
            "name": "Surveys",
            "description": "Paid surveys matched to one user by the survey panels. Called from your server with the user's IP, country and user agent."
        },
        {
            "name": "Traffic Tasks",
            "description": "Timed visits: the user keeps a sponsored site open for a set time on our view page, then passes a quick check. Completion sends the same postback as an offer."
        }
    ],
    "paths": {
        "/api/v1/offers": {
            "get": {
                "tags": [
                    "Offers"
                ],
                "operationId": "listOffers",
                "summary": "List the offers available to one user",
                "description": "Returns only what this placement may show: the offer targets the user's country and device, it is above your payout floor, and it is not on any of your blocklists.\n\nPass `userId` to get a ready-to-use `clickUrl` on every offer. Without it you get the catalogue but no click URLs — an unattributed click cannot become a conversion, so we do not hand one out.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AppId"
                    },
                    {
                        "name": "userId",
                        "in": "query",
                        "description": "Your own id for this user. Stable and opaque; we never see your usernames.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 191
                        },
                        "example": "user-1234"
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "description": "Override the detected country (ISO 3166-1 alpha-2).",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "pattern": "^[A-Za-z]{2}$"
                        },
                        "example": "DE"
                    },
                    {
                        "name": "device",
                        "in": "query",
                        "description": "Override the detected device. Read from `userAgent` when that is sent instead.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "macos",
                                "windows",
                                "android",
                                "iphone",
                                "ipad",
                                "other"
                            ]
                        },
                        "example": "android"
                    },
                    {
                        "name": "ip",
                        "in": "query",
                        "description": "The user's public IPv4 or IPv6 address. Your call comes from your server, so without it the offers matched to one person (PTC ads, articles, surveys and some app offers) are asked for your server's address and usually come back empty. Private and reserved ranges are refused.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "example": "93.184.216.34"
                    },
                    {
                        "name": "userAgent",
                        "in": "query",
                        "description": "The user's browser user agent. Send it with `ip`: a server's own user agent (curl, a PHP client) is treated as a bot and gets no per-user offers.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 512
                        },
                        "example": "Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 Chrome/126.0 Mobile Safari/537.36"
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "description": "Filter to one category key from /categories.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "example": "games"
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Filter by offer shape.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "singlestep",
                                "multistep"
                            ]
                        },
                        "example": "singlestep"
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Free-text match on the offer name.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 80
                        },
                        "example": "coin"
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "description": "Ordering. Defaults to recommended: offers ranked by what they actually earn per click on our traffic in the user's country, with offers the user already completed or keeps abandoning last. payout orders by the headline payout.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "recommended",
                                "payout",
                                "popular",
                                "epc",
                                "newest",
                                "name"
                            ],
                            "default": "recommended"
                        },
                        "example": "recommended"
                    },
                    {
                        "$ref": "#/components/parameters/Page"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Offers per page.",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        },
                        "example": 50
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The targeted catalogue.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "const": true
                                        },
                                        "data": {
                                            "type": "object",
                                            "required": [
                                                "offers",
                                                "pagination",
                                                "currency",
                                                "targeting"
                                            ],
                                            "properties": {
                                                "offers": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Offer"
                                                    }
                                                },
                                                "pagination": {
                                                    "$ref": "#/components/schemas/Pagination"
                                                },
                                                "currency": {
                                                    "$ref": "#/components/schemas/Currency"
                                                },
                                                "targeting": {
                                                    "$ref": "#/components/schemas/Targeting"
                                                }
                                            }
                                        }
                                    }
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "offers": [
                                            {
                                                "id": 4021,
                                                "externalId": "32-21022-15575424",
                                                "provider": "lootably",
                                                "name": "World of Sea Battle",
                                                "description": "Build a ship and win your first sea battle.",
                                                "requirements": "Reach level 10 within 7 days.",
                                                "image": "https://cdn.example/offers/4021.png",
                                                "previewUrl": "https://offerwall.gg/track/Xk9…?secure_hash=3f1c…",
                                                "type": "singlestep",
                                                "categories": [
                                                    "games"
                                                ],
                                                "devices": [
                                                    "desktop"
                                                ],
                                                "countries": [
                                                    "US",
                                                    "CA",
                                                    "GB"
                                                ],
                                                "reward": 1176,
                                                "rewardFormatted": "1,176 Gems",
                                                "rewardIsVariable": false,
                                                "rewardPer": null,
                                                "rewardUpTo": false,
                                                "paymentModel": "cpa",
                                                "multipleConversions": false,
                                                "featured": false,
                                                "clickUrl": "https://offerwall.gg/wall/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6/click/4021?userId=user-1234"
                                            }
                                        ],
                                        "pagination": {
                                            "page": 1,
                                            "pages": 11,
                                            "total": 546,
                                            "perPage": 50
                                        },
                                        "currency": {
                                            "name": "Gems",
                                            "nameSingular": "Gem",
                                            "perUsd": 1000
                                        },
                                        "targeting": {
                                            "country": "US",
                                            "device": "windows"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/api/v1/offers/{offer}": {
            "get": {
                "tags": [
                    "Offers"
                ],
                "operationId": "getOffer",
                "summary": "One offer, with its goal ladder",
                "description": "The same object `/offers` returns, plus `goals` — the steps of a multi-step offer and what each one pays. A single-step offer has an empty goal list. Blocked and inactive offers 404 here even if you have the id.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AppId"
                    },
                    {
                        "name": "offer",
                        "in": "path",
                        "description": "Our numeric offer id, from `id` in the list response.",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "example": 4021
                    },
                    {
                        "name": "userId",
                        "in": "query",
                        "description": "Include to receive a `clickUrl`.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "example": "user-1234"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The offer.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "const": true
                                        },
                                        "data": {
                                            "type": "object",
                                            "required": [
                                                "offer"
                                            ],
                                            "properties": {
                                                "offer": {
                                                    "$ref": "#/components/schemas/OfferDetail"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/api/v1/conversions": {
            "get": {
                "tags": [
                    "Conversions"
                ],
                "operationId": "listConversions",
                "summary": "Completed offers, for reconciliation",
                "description": "Use this to reconcile, not to deliver rewards. The postback is the real-time channel; polling this endpoint will always be behind it.\n\nA `reversed` conversion is one a network charged back. If you already paid the user, this is where you find out.\n\nPass `transactionId` to look up one conversion by the id its postback carried. A reversal re-sends the **same** `transactionId` with `status: reversed`, so one id addresses one conversion for its whole life — this is the authoritative source for `payoutUsd`, which is not covered by the postback signature.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AppId"
                    },
                    {
                        "name": "transactionId",
                        "in": "query",
                        "description": "Look up one conversion by the id its postback carried. Unique, so this returns at most one row.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 64
                        },
                        "example": "e794d89342e0c468f6dd81205999425b"
                    },
                    {
                        "name": "userId",
                        "in": "query",
                        "description": "Restrict to one of your users.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "example": "user-1234"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Restrict to one status.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pending",
                                "credited",
                                "rejected",
                                "reversed"
                            ]
                        },
                        "example": "credited"
                    },
                    {
                        "$ref": "#/components/parameters/Page"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Rows per page.",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        },
                        "example": 50
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Conversions, newest first.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "const": true
                                        },
                                        "data": {
                                            "type": "object",
                                            "required": [
                                                "conversions",
                                                "pagination"
                                            ],
                                            "properties": {
                                                "conversions": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Conversion"
                                                    }
                                                },
                                                "pagination": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/api/v1/stats": {
            "get": {
                "tags": [
                    "Reporting"
                ],
                "operationId": "getStats",
                "summary": "Daily series and totals for one placement",
                "description": "Read from the daily rollup table, so it is cheap to poll hourly. `payoutUsd` is what you earned, in USD.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AppId"
                    },
                    {
                        "name": "days",
                        "in": "query",
                        "description": "How many days back, ending today.",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 365,
                            "default": 30
                        },
                        "example": 30
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Totals and one row per day.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "const": true
                                        },
                                        "data": {
                                            "type": "object",
                                            "required": [
                                                "days",
                                                "totals",
                                                "series"
                                            ],
                                            "properties": {
                                                "days": {
                                                    "type": "integer"
                                                },
                                                "totals": {
                                                    "$ref": "#/components/schemas/StatsTotals"
                                                },
                                                "series": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/StatsDay"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/api/v1/categories": {
            "get": {
                "tags": [
                    "Offers"
                ],
                "operationId": "listCategories",
                "summary": "The category vocabulary, with live counts",
                "description": "Everything you need to build a filter UI. The counts are for this placement and this user's targeting, so a category with 0 offers can be hidden rather than shown empty.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AppId"
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "description": "Count against this country instead of the detected one.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "pattern": "^[A-Za-z]{2}$"
                        },
                        "example": "US"
                    },
                    {
                        "name": "device",
                        "in": "query",
                        "description": "Count against this device instead of the detected one.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "example": "android"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Categories and the sort keys /offers accepts.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "const": true
                                        },
                                        "data": {
                                            "type": "object",
                                            "required": [
                                                "categories",
                                                "sorts"
                                            ],
                                            "properties": {
                                                "categories": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Category"
                                                    }
                                                },
                                                "sorts": {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                        "type": "string"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/api/v1/surveys": {
            "get": {
                "tags": [
                    "Surveys"
                ],
                "operationId": "listSurveys",
                "summary": "List the surveys one user can take now",
                "description": "Survey panels decide per person: what a user is offered depends on their IP, device and the profile the panel already holds. Call this from YOUR server and pass the user's own `ip`, `country` and `userAgent` — the request's IP is your server's, and a panel asked with it answers for your data centre.\n\nEvery survey carries what it pays twice: `payoutUsd` is what you earn in US dollars, and `reward` is the same amount converted into your currency at your rate — the number to show the user and to credit them when the postback arrives.\n\nSend the user to `clickUrl` from their own browser. The list is kept for a few minutes per user, so calling again straight away returns the same surveys without asking the panels.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AppId"
                    },
                    {
                        "name": "userId",
                        "in": "query",
                        "description": "Your own id for this user.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 191
                        },
                        "example": "user-1234"
                    },
                    {
                        "name": "ip",
                        "in": "query",
                        "description": "The user's public IPv4 or IPv6 address. Private and reserved ranges are refused.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "93.184.216.34"
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "description": "The user's country (ISO 3166-1 alpha-2), from your own geo lookup.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^[A-Za-z]{2}$"
                        },
                        "example": "DE"
                    },
                    {
                        "name": "userAgent",
                        "in": "query",
                        "description": "The user's browser user agent. Strongly recommended: panels use it to match the device.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 512
                        },
                        "example": "Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 Chrome/126.0 Mobile Safari/537.36"
                    },
                    {
                        "name": "device",
                        "in": "query",
                        "description": "Set the device instead of reading it from `userAgent`.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "macos",
                                "windows",
                                "android",
                                "iphone",
                                "ipad",
                                "other"
                            ]
                        },
                        "example": "android"
                    },
                    {
                        "$ref": "#/components/parameters/Page"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Surveys per page.",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 50
                        },
                        "example": 50
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The surveys this user can take, best paying first.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "const": true
                                        },
                                        "data": {
                                            "type": "object",
                                            "required": [
                                                "surveys",
                                                "pagination",
                                                "currency",
                                                "user"
                                            ],
                                            "properties": {
                                                "surveys": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Survey"
                                                    }
                                                },
                                                "pagination": {
                                                    "$ref": "#/components/schemas/Pagination"
                                                },
                                                "currency": {
                                                    "$ref": "#/components/schemas/Currency"
                                                },
                                                "user": {
                                                    "type": "object",
                                                    "properties": {
                                                        "userId": {
                                                            "type": "string"
                                                        },
                                                        "ip": {
                                                            "type": "string"
                                                        },
                                                        "country": {
                                                            "type": "string"
                                                        },
                                                        "device": {
                                                            "type": "string"
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "example": {
                                    "surveys": [
                                        {
                                            "id": 51877,
                                            "title": "Survey · 12 min",
                                            "description": "A paid survey that takes about 12 minutes.",
                                            "image": "",
                                            "lengthMinutes": 12,
                                            "rating": 4.2,
                                            "payoutUsd": 0.875,
                                            "reward": 875,
                                            "rewardFormatted": "875 Gems",
                                            "rewardIsVariable": false,
                                            "clickUrl": "https://offerwall.gg/wall/0123456789abcdef0123456789abcdef/click/51877?userId=user-1234"
                                        }
                                    ],
                                    "pagination": {
                                        "page": 1,
                                        "pages": 1,
                                        "total": 1,
                                        "perPage": 50
                                    },
                                    "currency": {
                                        "name": "Gems",
                                        "nameSingular": "Gem",
                                        "perUsd": 1000,
                                        "decimals": 0
                                    },
                                    "user": {
                                        "userId": "user-1234",
                                        "ip": "93.184.216.34",
                                        "country": "DE",
                                        "device": "android"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "422": {
                        "description": "A required parameter is missing or not usable: `userId`, `ip` or `country`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/api/v1/traffic": {
            "get": {
                "tags": [
                    "Traffic Tasks"
                ],
                "operationId": "listTrafficTasks",
                "summary": "List the Traffic Tasks one user can start now",
                "description": "Timed visits for this user, targeted like offers. A task this user completed inside its repeat window, or has open in another tab, is left out.\n\nDraw the list however you like; the task itself always runs on our view page (`offerwall.gg/view.php`), because the timer and the check have to run where we can count them. Send the user to `startUrl` in a NEW TAB. On completion you receive the same postback as for an offer — same parameters, same signature, the reward in your currency.\n\nWithout `userId` you get the catalogue and no `startUrl`. PTC ads and articles are matched to one person at one address, so pass the user's own `ip` and `userAgent` too, or they are asked for your server and the list comes back without them.",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/AppId"
                    },
                    {
                        "name": "userId",
                        "in": "query",
                        "description": "Your own id for this user.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 191
                        },
                        "example": "user-1234"
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "description": "Override the detected country (ISO 3166-1 alpha-2).",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "pattern": "^[A-Za-z]{2}$"
                        },
                        "example": "DE"
                    },
                    {
                        "name": "device",
                        "in": "query",
                        "description": "Override the detected device. Read from `userAgent` when that is sent instead.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "macos",
                                "windows",
                                "android",
                                "iphone",
                                "ipad",
                                "other"
                            ]
                        },
                        "example": "android"
                    },
                    {
                        "name": "ip",
                        "in": "query",
                        "description": "The user's public IPv4 or IPv6 address. Your call comes from your server, so without it the offers matched to one person (PTC ads, articles, surveys and some app offers) are asked for your server's address and usually come back empty. Private and reserved ranges are refused.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "example": "93.184.216.34"
                    },
                    {
                        "name": "userAgent",
                        "in": "query",
                        "description": "The user's browser user agent. Send it with `ip`: a server's own user agent (curl, a PHP client) is treated as a bot and gets no per-user offers.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 512
                        },
                        "example": "Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 Chrome/126.0 Mobile Safari/537.36"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Most tasks to return.",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 50
                        },
                        "example": 50
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The tasks this user can start.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "const": true
                                        },
                                        "data": {
                                            "type": "object",
                                            "required": [
                                                "tasks",
                                                "total",
                                                "currency",
                                                "targeting"
                                            ],
                                            "properties": {
                                                "tasks": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/TrafficTask"
                                                    }
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "currency": {
                                                    "$ref": "#/components/schemas/Currency"
                                                },
                                                "targeting": {
                                                    "$ref": "#/components/schemas/Targeting"
                                                }
                                            }
                                        }
                                    }
                                },
                                "example": {
                                    "tasks": [
                                        {
                                            "id": 9210,
                                            "title": "Visit Example Shop",
                                            "description": "Browse the spring collection.",
                                            "site": "shop.example.com",
                                            "image": "",
                                            "durationSeconds": 30,
                                            "verified": false,
                                            "reward": 14,
                                            "rewardFormatted": "14 Gems",
                                            "countries": [
                                                "*"
                                            ],
                                            "devices": [],
                                            "startUrl": "https://offerwall.gg/wall/0123456789abcdef0123456789abcdef/click/9210?userId=user-1234"
                                        }
                                    ],
                                    "total": 1,
                                    "currency": {
                                        "name": "Gems",
                                        "nameSingular": "Gem",
                                        "perUsd": 1000
                                    },
                                    "targeting": {
                                        "country": "DE",
                                        "device": "android"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        },
        "/wall/{publicKey}": {
            "get": {
                "tags": [
                    "Wall"
                ],
                "operationId": "getWall",
                "summary": "The hosted offerwall (HTML, for an iframe)",
                "description": "This is the whole integration for most publishers. Put it in an iframe:\n\n```html\n<iframe src=\"https://offerwall.gg/wall/PUBLIC_KEY?userId=user-1234\"\n        style=\"width:100%;height:800px;border:0\"\n        allow=\"clipboard-write\"></iframe>\n```\n\nNo cookies are set on this page — it is served to *your* users, not ours, and a third-party cookie would be blocked anyway. The public key in the URL is the credential.\n\nWithout a `userId` the wall still renders but clicking is refused. That is preview mode, and it is what to use while you are building.\n\nIf you set **allowed domains** on the placement, we send `Content-Security-Policy: frame-ancestors` naming them, so the wall will only render inside your own pages.",
                "security": [
                    {}
                ],
                "parameters": [
                    {
                        "name": "publicKey",
                        "in": "path",
                        "description": "Your placement's 32-character public key.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{32}$"
                        },
                        "example": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
                    },
                    {
                        "name": "userId",
                        "in": "query",
                        "description": "Your id for this user. Omit for preview mode.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "example": "user-1234"
                    },
                    {
                        "name": "signature",
                        "in": "query",
                        "description": "Required when the placement has \"require signature\" on. See the SignedQuery scheme.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "ts",
                        "in": "query",
                        "description": "Unix seconds. Required alongside `signature` only when expiring links are enabled.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The wall.",
                        "content": {
                            "text/html": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/Forbidden"
                    },
                    "404": {
                        "$ref": "#/components/responses/NotFound"
                    }
                }
            }
        },
        "/wall/{publicKey}/click/{offer}": {
            "get": {
                "tags": [
                    "Wall"
                ],
                "operationId": "trackClick",
                "summary": "Record a click and redirect to the advertiser",
                "description": "Send the user here, never straight to the advertiser. The click row is written **before** the redirect and it is the only thing that makes a conversion attributable days later.\n\nIf you are drawing your own wall, this is the `clickUrl` the API already gave you — use it verbatim rather than building it yourself.",
                "security": [
                    {}
                ],
                "parameters": [
                    {
                        "name": "publicKey",
                        "in": "path",
                        "description": "Your placement's public key.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{32}$"
                        },
                        "example": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
                    },
                    {
                        "name": "offer",
                        "in": "path",
                        "description": "Our numeric offer id.",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "example": 4021
                    },
                    {
                        "name": "userId",
                        "in": "query",
                        "description": "Required — there is nobody to attribute an anonymous click to.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "user-1234"
                    }
                ],
                "responses": {
                    "302": {
                        "description": "Off to the advertiser.",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "A refusal page — the user is blocked, the offer is gone, or fraud checks declined the click.",
                        "content": {
                            "text/html": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "429": {
                        "$ref": "#/components/responses/TooManyRequests"
                    }
                }
            }
        }
    },
    "webhooks": {
        "conversion": {
            "get": {
                "operationId": "conversionPostback",
                "summary": "We call YOUR url when a user completes an offer",
                "description": "This is the only channel that is real-time and the only one you should\npay a user from. It fires once per conversion and once more if that\nconversion is later reversed.\n\n**Set your URL** in the placement's settings. Use `{macros}` and we\nsubstitute them; use no macros and we append the fields as a query\nstring. These aliases are understood too, so an existing integration\nusually needs no changes: `{user_id}` `{subid}` `{amount}` `{points}`\n`{reward}` `{txid}` `{trans_id}` `{offer_id}` `{sig}` `{hash}`.\n\n```\nhttps://you.example/callback?user={userId}&amount={currencyAmount}\n    &tx={transactionId}&status={status}&sig={signature}\n```\n\n**Verify the signature before crediting anybody.** It is\nHMAC-SHA256 over exactly three fields joined with colons, keyed with\nyour secret:\n\n```\nsignature = hmac_sha256(\"userId:transactionId:currencyAmount\", secretKey)\n```\n\nOnly those three, in that order, so the check still works when you\nonly asked for those macros.\n\n**Be idempotent.** `transactionId` is unique and stable. We retry a\nfailed delivery 60s, 300s, 900s, 3600s, 10800s, 21600s after each attempt, up to\nPOSTBACK_MAX_ATTEMPTS times, and a network can legitimately resend a\nconversion. Store the id and ignore one you have seen.\n\n**Handle reversals.** A chargeback arrives with `status=reversed` and a\n**negative** `currencyAmount`, so you can act on whichever your system\nalready reads.\n\n**Answer 200.** Any 2xx, or a body of `OK` or `1`. Anything else and we\nretry.",
                "security": [
                    {}
                ],
                "parameters": [
                    {
                        "name": "userId",
                        "required": true,
                        "description": "The id you sent us in the wall URL. Yours, unchanged.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "user-1234",
                        "in": "query"
                    },
                    {
                        "name": "transactionId",
                        "required": true,
                        "description": "Unique and stable. Your idempotency key.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "e794d89342e0c468f6dd81205999425b",
                        "in": "query"
                    },
                    {
                        "name": "offerId",
                        "required": true,
                        "description": "The network's own offer id.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "32-21022-15575424",
                        "in": "query"
                    },
                    {
                        "name": "offerName",
                        "required": true,
                        "description": "For your reward feed and your support desk.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "World of Sea Battle",
                        "in": "query"
                    },
                    {
                        "name": "goalId",
                        "required": true,
                        "description": "Which step of a multi-step offer completed. Empty for single-step.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "",
                        "in": "query"
                    },
                    {
                        "name": "currencyAmount",
                        "required": true,
                        "description": "What to credit, in YOUR currency. Negative on a reversal.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "1750",
                        "in": "query"
                    },
                    {
                        "name": "currencyName",
                        "required": true,
                        "description": "What you call it.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Gems",
                        "in": "query"
                    },
                    {
                        "name": "payoutUsd",
                        "required": true,
                        "description": "Your revenue for this conversion, in USD. Negative on a reversal.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "1.750000",
                        "in": "query"
                    },
                    {
                        "name": "status",
                        "required": true,
                        "description": "`credited` or `reversed`.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "credited",
                        "in": "query"
                    },
                    {
                        "name": "test",
                        "required": true,
                        "description": "`1` when sent from the dashboard test button. Never credit on a test.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "0",
                        "in": "query"
                    },
                    {
                        "name": "timestamp",
                        "required": true,
                        "description": "Unix seconds at send time.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "1756588800",
                        "in": "query"
                    },
                    {
                        "name": "signature",
                        "required": true,
                        "description": "HMAC-SHA256 of `userId:transactionId:currencyAmount`, keyed with your secret.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "a967cb02a0…",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Reward granted. Answer with any 2xx, or a body of `OK` or `1`.\n\nAnything else is a failure and we retry on the schedule above.",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string",
                                    "examples": [
                                        "OK"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "conversionPostbackPost",
                "summary": "The same callback, as a POST form body",
                "description": "Identical fields. Choose GET or POST per placement in your dashboard; POST sends the fields as `application/x-www-form-urlencoded` and leaves your URL untouched.",
                "security": [
                    {}
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "$ref": "#/components/schemas/PostbackPayload"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Reward granted."
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "ApiKeyAuth": {
                "type": "apiKey",
                "in": "header",
                "name": "X-Api-Key",
                "description": "Your placement's **secret** key. Server-side only — anything you put in browser JavaScript is public, and this key can read your revenue."
            },
            "SignedQuery": {
                "type": "apiKey",
                "in": "query",
                "name": "signature",
                "description": "For clients that cannot set a header. Sort every query parameter by name, join them `k=v&k=v`, and HMAC-SHA256 that string with your secret:\n\n```php\n$params = ['appId' => $publicKey, 'userId' => 'user-1234'];\nksort($params);\n$canonical = http_build_query($params);\n$signature = hash_hmac('sha256', $canonical, $secretKey);\n```\n\n`signature` itself is excluded from the string it signs. The secret never travels in the URL."
            }
        },
        "parameters": {
            "AppId": {
                "name": "appId",
                "in": "query",
                "description": "Your placement's public key. Safe to expose — it identifies, it does not authenticate.",
                "required": true,
                "schema": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32}$"
                },
                "example": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
            },
            "Page": {
                "name": "page",
                "in": "query",
                "description": "1-based page number.",
                "required": false,
                "schema": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 1
                },
                "example": 1
            }
        },
        "responses": {
            "Unauthorized": {
                "description": "The secret did not match, and no valid signature was supplied.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        },
                        "example": {
                            "success": false,
                            "error": "Send the app secret as X-Api-Key, or sign the request."
                        }
                    }
                }
            },
            "Forbidden": {
                "description": "The placement exists but is not serving — pending approval, paused, or the publisher is suspended.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        },
                        "example": {
                            "success": false,
                            "error": "This placement is not active."
                        }
                    }
                }
            },
            "NotFound": {
                "description": "No such placement or offer.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        },
                        "example": {
                            "success": false,
                            "error": "Unknown appId."
                        }
                    }
                }
            },
            "TooManyRequests": {
                "description": "Rate limited. Wait `Retry-After` seconds.",
                "headers": {
                    "Retry-After": {
                        "description": "Seconds to wait.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "required": [
                    "success",
                    "error"
                ],
                "properties": {
                    "success": {
                        "type": "boolean",
                        "const": false
                    },
                    "error": {
                        "type": "string",
                        "description": "Safe to show a developer, not a user."
                    }
                }
            },
            "Offer": {
                "type": "object",
                "description": "One offer, already priced in your currency.",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Our id. Use it for /offers/{offer} and the click URL."
                    },
                    "externalId": {
                        "type": "string",
                        "description": "The network's id. Appears on the postback as `offerId`."
                    },
                    "provider": {
                        "type": "string",
                        "description": "Which source it came from.",
                        "examples": [
                            "lootably"
                        ]
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "requirements": {
                        "type": "string",
                        "description": "What the user must do to convert. Show this."
                    },
                    "image": {
                        "type": "string",
                        "format": "uri"
                    },
                    "previewUrl": {
                        "type": "string",
                        "format": "uri",
                        "description": "The advertiser's own page, for a preview, through our /track link. It does not expire and is the same on every call, so it is safe to store. Not a click URL — it tracks nothing."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "singlestep",
                            "multistep"
                        ]
                    },
                    "categories": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "devices": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Empty means every device."
                    },
                    "countries": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "`[\"*\"]` means everywhere."
                    },
                    "reward": {
                        "type": "number",
                        "description": "What this offer pays the user, in your currency."
                    },
                    "rewardFormatted": {
                        "type": "string",
                        "description": "Ready to print.",
                        "examples": [
                            "1,750 Gems"
                        ]
                    },
                    "rewardIsVariable": {
                        "type": "boolean",
                        "description": "The network prices this per user. Show \"Varies\"; the real amount settles on conversion."
                    },
                    "rewardPer": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "examples": [
                            null,
                            "ZER",
                            "€1 spent"
                        ],
                        "description": "Set when `reward` is a RATE rather than a fixed amount: the user earns `reward` per one of this unit. The PTC offer is priced per ZER the user earns viewing ads, so show \"per ZER earned\" next to it; a cashback shop per unit of the shop's own money spent (\"€1 spent\", \"1 PLN spent\"), credited once the shop confirms the order. Null for an ordinary offer."
                    },
                    "rewardUpTo": {
                        "type": "boolean",
                        "description": "A cashback shop that pays different rates on different products: `reward` is the best of them, so show it as \"up to\"."
                    },
                    "paymentModel": {
                        "type": "string",
                        "examples": [
                            "cpa",
                            "PER_ZER",
                            "CASHBACK:EUR"
                        ]
                    },
                    "multipleConversions": {
                        "type": "boolean",
                        "description": "The same user may complete it more than once."
                    },
                    "featured": {
                        "type": "boolean"
                    },
                    "clickUrl": {
                        "type": "string",
                        "format": "uri",
                        "description": "Present only when you passed `userId`. Send the user here."
                    }
                }
            },
            "Survey": {
                "type": "object",
                "description": "One survey matched to this user, priced in dollars and in your currency.",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Our id. Appears in the click URL."
                    },
                    "title": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "image": {
                        "type": "string"
                    },
                    "lengthMinutes": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "How long the panel says it takes. Null when it does not say."
                    },
                    "rating": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "Average rating out of 5 from people who took it, when the panel publishes one."
                    },
                    "payoutUsd": {
                        "type": "number",
                        "description": "What you earn for a completion, in US dollars.",
                        "examples": [
                            0.875
                        ]
                    },
                    "reward": {
                        "type": "number",
                        "description": "The same amount in your currency, at your rate. Credit this.",
                        "examples": [
                            875
                        ]
                    },
                    "rewardFormatted": {
                        "type": "string",
                        "examples": [
                            "875 Gems"
                        ]
                    },
                    "rewardIsVariable": {
                        "type": "boolean"
                    },
                    "clickUrl": {
                        "type": "string",
                        "format": "uri",
                        "description": "Open it in the user's own browser."
                    }
                }
            },
            "TrafficTask": {
                "type": "object",
                "description": "One timed visit, priced in your currency.",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Our id. Appears in the click URL."
                    },
                    "title": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "site": {
                        "type": "string",
                        "description": "The host the user will visit.",
                        "examples": [
                            "shop.example.com"
                        ]
                    },
                    "image": {
                        "type": "string"
                    },
                    "durationSeconds": {
                        "type": "integer",
                        "description": "How long the site has to stay on screen.",
                        "examples": [
                            30
                        ]
                    },
                    "verified": {
                        "type": "boolean",
                        "description": "The advertiser confirms each view from their own site."
                    },
                    "reward": {
                        "type": "number",
                        "description": "What completing it pays the user, in your currency."
                    },
                    "rewardFormatted": {
                        "type": "string",
                        "examples": [
                            "14 Gems"
                        ]
                    },
                    "countries": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "`[\"*\"]` means everywhere."
                    },
                    "devices": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Empty means every device."
                    },
                    "startUrl": {
                        "type": "string",
                        "format": "uri",
                        "description": "Present only when you passed `userId`. Open it in a new tab."
                    }
                }
            },
            "OfferDetail": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Offer"
                    },
                    {
                        "type": "object",
                        "properties": {
                            "goals": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/Goal"
                                }
                            }
                        }
                    }
                ]
            },
            "Goal": {
                "type": "object",
                "properties": {
                    "goalId": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string",
                        "description": "What the user has to do."
                    },
                    "reward": {
                        "type": "number",
                        "description": "In your currency."
                    },
                    "optional": {
                        "type": "boolean",
                        "description": "A bonus step, not required to complete the offer."
                    }
                }
            },
            "Pagination": {
                "type": "object",
                "properties": {
                    "page": {
                        "type": "integer"
                    },
                    "pages": {
                        "type": "integer"
                    },
                    "total": {
                        "type": "integer"
                    },
                    "perPage": {
                        "type": "integer"
                    }
                }
            },
            "Currency": {
                "type": "object",
                "description": "Your placement's economics, echoed so you can label amounts without hard-coding them.",
                "properties": {
                    "name": {
                        "type": "string",
                        "examples": [
                            "Gems"
                        ]
                    },
                    "nameSingular": {
                        "type": "string",
                        "description": "What one unit is called. Empty when the placement has not set one, in which case use `name` for both.",
                        "examples": [
                            "Gem"
                        ]
                    },
                    "perUsd": {
                        "type": "number",
                        "description": "Units awarded per 1.00 USD you earn.",
                        "examples": [
                            1000
                        ]
                    },
                    "decimals": {
                        "type": "integer",
                        "description": "Decimal places your placement shows. Returned by /surveys.",
                        "examples": [
                            0
                        ]
                    }
                }
            },
            "Targeting": {
                "type": "object",
                "description": "What we detected or you forced. Useful when a user reports an empty wall.",
                "properties": {
                    "country": {
                        "type": "string",
                        "examples": [
                            "US"
                        ]
                    },
                    "device": {
                        "type": "string",
                        "examples": [
                            "android"
                        ]
                    }
                }
            },
            "Conversion": {
                "type": "object",
                "properties": {
                    "transactionId": {
                        "type": "string",
                        "description": "Same id the postback carried."
                    },
                    "userId": {
                        "type": "string"
                    },
                    "offerId": {
                        "type": "string"
                    },
                    "offerName": {
                        "type": "string"
                    },
                    "goalId": {
                        "type": "string"
                    },
                    "currencyAmount": {
                        "type": "number"
                    },
                    "payoutUsd": {
                        "type": "number",
                        "description": "What you earned, in USD."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "credited",
                            "rejected",
                            "reversed"
                        ]
                    },
                    "createdAt": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "StatsTotals": {
                "type": "object",
                "properties": {
                    "impressions": {
                        "type": "integer"
                    },
                    "clicks": {
                        "type": "integer"
                    },
                    "conversions": {
                        "type": "integer"
                    },
                    "reversals": {
                        "type": "integer"
                    },
                    "payoutUsd": {
                        "type": "number"
                    },
                    "conversionRate": {
                        "type": "number",
                        "description": "Conversions per click, as a percentage."
                    },
                    "epc": {
                        "type": "number",
                        "description": "Your earnings per click, USD."
                    }
                }
            },
            "StatsDay": {
                "type": "object",
                "properties": {
                    "date": {
                        "type": "string",
                        "format": "date"
                    },
                    "impressions": {
                        "type": "integer"
                    },
                    "clicks": {
                        "type": "integer"
                    },
                    "conversions": {
                        "type": "integer"
                    },
                    "payoutUsd": {
                        "type": "number"
                    }
                }
            },
            "Category": {
                "type": "object",
                "properties": {
                    "key": {
                        "type": "string",
                        "description": "Pass this to /offers?category=",
                        "examples": [
                            "games"
                        ]
                    },
                    "label": {
                        "type": "string",
                        "examples": [
                            "Games"
                        ]
                    },
                    "offers": {
                        "type": "integer",
                        "description": "How many are live for this user right now."
                    }
                }
            },
            "PostbackPayload": {
                "type": "object",
                "required": [
                    "userId",
                    "transactionId",
                    "offerId",
                    "offerName",
                    "goalId",
                    "currencyAmount",
                    "currencyName",
                    "payoutUsd",
                    "status",
                    "test",
                    "timestamp",
                    "signature"
                ],
                "properties": {
                    "userId": {
                        "type": "string",
                        "description": "The id you sent us in the wall URL. Yours, unchanged.",
                        "examples": [
                            "user-1234"
                        ]
                    },
                    "transactionId": {
                        "type": "string",
                        "description": "Unique and stable. Your idempotency key.",
                        "examples": [
                            "e794d89342e0c468f6dd81205999425b"
                        ]
                    },
                    "offerId": {
                        "type": "string",
                        "description": "The network's own offer id.",
                        "examples": [
                            "32-21022-15575424"
                        ]
                    },
                    "offerName": {
                        "type": "string",
                        "description": "For your reward feed and your support desk.",
                        "examples": [
                            "World of Sea Battle"
                        ]
                    },
                    "goalId": {
                        "type": "string",
                        "description": "Which step of a multi-step offer completed. Empty for single-step.",
                        "examples": [
                            ""
                        ]
                    },
                    "currencyAmount": {
                        "type": "string",
                        "description": "What to credit, in YOUR currency. Negative on a reversal.",
                        "examples": [
                            "1750"
                        ]
                    },
                    "currencyName": {
                        "type": "string",
                        "description": "What you call it.",
                        "examples": [
                            "Gems"
                        ]
                    },
                    "payoutUsd": {
                        "type": "string",
                        "description": "Your revenue for this conversion, in USD. Negative on a reversal.",
                        "examples": [
                            "1.750000"
                        ]
                    },
                    "status": {
                        "type": "string",
                        "description": "`credited` or `reversed`.",
                        "examples": [
                            "credited"
                        ]
                    },
                    "test": {
                        "type": "string",
                        "description": "`1` when sent from the dashboard test button. Never credit on a test.",
                        "examples": [
                            "0"
                        ]
                    },
                    "timestamp": {
                        "type": "string",
                        "description": "Unix seconds at send time.",
                        "examples": [
                            "1756588800"
                        ]
                    },
                    "signature": {
                        "type": "string",
                        "description": "HMAC-SHA256 of `userId:transactionId:currencyAmount`, keyed with your secret.",
                        "examples": [
                            "a967cb02a0…"
                        ]
                    }
                }
            }
        }
    },
    "security": [
        {
            "ApiKeyAuth": []
        },
        {
            "SignedQuery": []
        }
    ]
}