> ## Documentation Index > Fetch the complete documentation index at: https://help.awin.com/llms.txt > Use this file to discover all available pages before exploring further. # Approve a partnership application > Use this when an advertiser wants to accept a publisher's application to join their programme. Approves the pending application from that publisher and makes the partnership active. Only pending applications can be approved. The request body must contain a `message`, which is included for the publisher. Side effects: changes the partnership status to active and notifies the publisher by email. Repeating a successful call is safe: the second call returns `409` and sends no email, so no `Idempotency-Key` is required. The caller needs the Full Access role or higher on the advertiser account. Errors: - `400`: the body is missing or not valid JSON; `message` is missing or not a string; `message` contains HTML or is not 3 to 1000 characters after trimming; the body contains an unknown field; or a path parameter is malformed. - `404`: the advertiser or publisher does not exist, or the publisher has not applied to this advertiser. - `409`: the application was already approved. Repeating a successful call returns `409`. - `415`: the request does not carry a JSON content type. - `422`: the application is not pending for another reason, for example because it was rejected, or the publisher was invited or has left. ## OpenAPI ````json POST /v1/advertisers/{advertiserId}/publishers/{publisherId}/approve-application { "openapi": "3.0.3", "info": { "title": "Awin Public API", "version": "0.1.0" }, "servers": [ { "url": "https://api.awin.com/public", "description": "Production" } ], "tags": [ { "name": "Advertisers", "description": "Endpoints for advertiser accounts." }, { "name": "Advertisers > Partnerships", "description": "Advertiser partnerships with publishers." }, { "name": "Advertisers > Tracking links", "description": "Advertiser tracking links." }, { "name": "Advertisers > Billing", "description": "Advertiser billing and prepayments." }, { "name": "Publishers", "description": "Endpoints for publisher accounts." }, { "name": "Publishers > Partnerships", "description": "Publisher partnerships with advertisers." }, { "name": "Publishers > Transactions", "description": "Publisher transactions." }, { "name": "Publishers > Payments", "description": "Publisher payments and payment details." } ], "paths": { "/v1/advertisers/{advertiserId}/publishers/{publisherId}/approve-application": { "x-awin-owner": "hqteamorion", "parameters": [ { "$ref": "#/components/parameters/AdvertiserId" }, { "$ref": "#/components/parameters/PublisherId" } ], "post": { "tags": [ "Advertisers > Partnerships" ], "operationId": "approvePartnershipApplication", "x-awin-audience": "public", "summary": "Approve a partnership application", "description": "Use this when an advertiser wants to accept a publisher's application to\njoin their programme.\n\nApproves the pending application from that publisher and makes the\npartnership active. Only pending applications can be approved. The request\nbody must contain a `message`, which is included for the publisher.\n\nSide effects: changes the partnership status to active and notifies the\npublisher by email.\n\nRepeating a successful call is safe: the second call returns `409` and\nsends no email, so no `Idempotency-Key` is required.\n\nThe caller needs the Full Access role or higher on the advertiser account.\n\nErrors:\n- `400`: the body is missing or not valid JSON; `message` is missing or not\n a string; `message` contains HTML or is not 3 to 1000 characters after\n trimming; the body contains an unknown field; or a path parameter is\n malformed.\n- `404`: the advertiser or publisher does not exist, or the publisher has\n not applied to this advertiser.\n- `409`: the application was already approved. Repeating a successful call\n returns `409`.\n- `415`: the request does not carry a JSON content type.\n- `422`: the application is not pending for another reason, for example\n because it was rejected, or the publisher was invited or has left.", "x-awin-public-api-authorization": { "accountType": "advertiser", "minRole": "userFullAccess" }, "requestBody": { "$ref": "#/components/requestBodies/PartnershipApplicationApprove" }, "responses": { "204": { "description": "Application approved.", "headers": { "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/Conflict" }, "415": { "$ref": "#/components/responses/UnsupportedMediaType" }, "422": { "$ref": "#/components/responses/UnprocessableEntity" }, "429": { "$ref": "#/components/responses/TooManyRequests" }, "503": { "$ref": "#/components/responses/ServiceUnavailable" }, "default": { "$ref": "#/components/responses/UnexpectedError" } }, "security": [ { "patBearer": [] } ] } } }, "components": { "parameters": { "AdvertiserId": { "name": "advertiserId", "in": "path", "required": true, "description": "Identifier of the advertiser account.", "schema": { "type": "string", "pattern": "^[0-9]+$", "example": "1001" } }, "PublisherId": { "name": "publisherId", "in": "path", "required": true, "description": "Identifier of the publisher account.", "schema": { "type": "string", "pattern": "^[0-9]+$", "example": "45678" } } }, "requestBodies": { "PartnershipApplicationApprove": { "description": "The message to send to the publisher with the approval.", "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "message" ], "properties": { "message": { "type": "string", "minLength": 3, "maxLength": 1000, "description": "Message to the publisher. It is trimmed before its length is checked, so leading and trailing whitespace does not count towards the 3 to 1000 character limit. HTML is not allowed.", "example": "Welcome to our programme. We look forward to working with you." } } }, "example": { "message": "Welcome to our programme. We look forward to working with you." } } } } }, "headers": { "RateLimitLimit": { "description": "Maximum number of requests you can make in a burst under your own rate limit. Absent when the request did not count against your own limit.", "schema": { "type": "integer", "minimum": 1, "example": 5 } }, "RateLimitRemaining": { "description": "Number of requests you have left under your own rate limit. Absent when the request did not count against your own limit.", "schema": { "type": "integer", "minimum": 0, "example": 0 } }, "RateLimitReset": { "description": "Number of seconds until your own rate limit is fully restored. Absent when the request did not count against your own limit.", "schema": { "type": "integer", "minimum": 0, "example": 1 } }, "RetryAfter": { "description": "Number of seconds to wait before retrying the request.", "required": true, "schema": { "type": "integer", "minimum": 0, "example": 1 } } }, "responses": { "BadRequest": { "description": "Bad Request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ValidationProblem" }, "example": { "type": "https://help.awin.com/apis/error", "title": "Bad Request", "status": 400, "detail": "Required parameters are missing from the request", "code": "VALIDATION_FAILED", "errors": [ { "pointer": "/name", "detail": "must be 100 characters or fewer" } ] } } }, "headers": { "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } } }, "Unauthorized": { "description": "Unauthorized", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" }, "example": { "type": "https://help.awin.com/apis/error", "title": "Unauthorized", "status": 401, "detail": "No valid credentials were supplied with the request", "code": "UNAUTHORIZED" } } } }, "Forbidden": { "description": "Forbidden", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" }, "example": { "type": "https://help.awin.com/apis/error", "title": "Forbidden", "status": 403, "detail": "You do not have the correct privileges to access this resource", "code": "FORBIDDEN" } } }, "headers": { "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } } }, "NotFound": { "description": "Not Found", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" }, "example": { "type": "https://help.awin.com/apis/error", "title": "Not Found", "status": 404, "detail": "Resource not found with that ID", "code": "NOT_FOUND" } } }, "headers": { "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } } }, "Conflict": { "description": "Conflict", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" }, "example": { "type": "https://help.awin.com/apis/error", "title": "Conflict", "status": 409, "detail": "Conflict between request and current state of resource", "code": "CONFLICT" } } }, "headers": { "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } } }, "UnsupportedMediaType": { "description": "Unsupported Media Type", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" }, "example": { "type": "https://help.awin.com/apis/error", "title": "Unsupported Media Type", "status": 415, "detail": "Content-Type must be application/json", "code": "UNSUPPORTED_MEDIA_TYPE" } } }, "headers": { "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } } }, "UnprocessableEntity": { "description": "Unprocessable Content", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ValidationProblem" }, "example": { "type": "https://help.awin.com/apis/error", "title": "Unprocessable Content", "status": 422, "detail": "The request was well-formed but could not be processed", "code": "BUSINESS_RULE_VIOLATION", "errors": [ { "pointer": "/name", "detail": "value is too long after HTML sanitization" } ] } } }, "headers": { "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } } }, "TooManyRequests": { "description": "Too Many Requests", "headers": { "Retry-After": { "$ref": "#/components/headers/RetryAfter" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } }, "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" }, "examples": { "userRateLimitExceeded": { "value": { "type": "https://help.awin.com/apis/error", "title": "User rate limit exceeded", "status": 429, "detail": "You have exceeded your rate limit across the public API. Retry after the number of seconds in the Retry-After header", "code": "USER_RATE_LIMIT_EXCEEDED" } }, "routeRateLimitExceeded": { "value": { "type": "https://help.awin.com/apis/error", "title": "Route rate limit exceeded", "status": 429, "detail": "This endpoint is receiving more requests than it can accept right now. Retry after the number of seconds in the Retry-After header", "code": "ROUTE_RATE_LIMIT_EXCEEDED" } }, "tooManyRequests": { "value": { "type": "https://help.awin.com/apis/error", "title": "Too Many Requests", "status": 429, "detail": "Rate limit exceeded", "code": "TOO_MANY_REQUESTS" } } } } } }, "ServiceUnavailable": { "description": "Service Unavailable", "headers": { "Retry-After": { "$ref": "#/components/headers/RetryAfter" }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } }, "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" }, "example": { "type": "https://help.awin.com/apis/error", "title": "Service Unavailable", "status": 503, "detail": "The service is temporarily unavailable", "code": "SERVICE_UNAVAILABLE" } } } }, "UnexpectedError": { "description": "Internal Server Error", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" }, "example": { "type": "https://help.awin.com/apis/error", "title": "Internal Server Error", "status": 500, "detail": "An unexpected error occurred", "code": "INTERNAL_ERROR" } } }, "headers": { "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } } } }, "securitySchemes": { "patBearer": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Personal Access Token, sent as `Authorization: Bearer `." } }, "schemas": { "ValidationProblem": { "allOf": [ { "$ref": "#/components/schemas/Problem" }, { "type": "object", "description": "A problem detail carrying the RFC 9457 extension member `errors`, used where a request fails validation on one or more specific fields.", "properties": { "errors": { "type": "array", "description": "One entry per field that failed validation.", "items": { "type": "object", "required": [ "pointer", "detail" ], "properties": { "pointer": { "type": "string", "description": "An [RFC 6901](https://www.rfc-editor.org/rfc/rfc6901) JSON Pointer to the offending field in the request.", "example": "/name" }, "detail": { "type": "string", "description": "A human-readable explanation of this field's failure.", "example": "must be 100 characters or fewer" } } } } } } ] }, "Problem": { "type": "object", "description": "Problem details for an HTTP API error, as defined by [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457). Served as `application/problem+json`.", "required": [ "title", "status", "detail", "code" ], "properties": { "type": { "type": "string", "format": "uri-reference", "default": "https://help.awin.com/apis/error", "description": "A URI reference identifying the problem type. APIs SHOULD define a stable, dereferenceable URI per domain-specific problem type.", "example": "https://help.awin.com/apis/error" }, "title": { "type": "string", "description": "A short, human-readable summary of the problem type. Stable across occurrences; does not change from occurrence to occurrence.", "example": "Not Found" }, "status": { "type": "integer", "description": "The HTTP status code, repeated here for convenience.", "example": 404 }, "detail": { "type": "string", "description": "A human-readable explanation specific to this occurrence. Intended for the developer, not the end user — do not parse it.", "example": "Resource not found with that ID" }, "instance": { "type": "string", "format": "uri-reference", "description": "A URI reference identifying this specific occurrence, typically the request path.", "example": "/v1/advertisers/12345/prepayments" }, "code": { "type": "string", "description": "A stable, machine-readable error code. It does not change when `detail` is reworded, so clients branch on `code`, never on `detail`.", "enum": [ "VALIDATION_FAILED", "INVALID_SORT", "UNAUTHORIZED", "MISSING_TOKEN", "INVALID_TOKEN", "FORBIDDEN", "ACCESS_DENIED", "CLIENT_NOT_CONFIGURED", "NOT_FOUND", "METHOD_NOT_ALLOWED", "NOT_ACCEPTABLE", "CONFLICT", "CONTENT_TOO_LARGE", "UNSUPPORTED_MEDIA_TYPE", "BUSINESS_RULE_VIOLATION", "TOO_MANY_REQUESTS", "USER_RATE_LIMIT_EXCEEDED", "ROUTE_RATE_LIMIT_EXCEEDED", "LINK_SHORTENER_QUOTA_EXCEEDED", "INTERNAL_ERROR", "BAD_GATEWAY", "SERVICE_UNAVAILABLE", "DEPENDENCY_UNAVAILABLE", "GATEWAY_TIMEOUT", "FEATURE_NOT_ENABLED", "ACCOUNT_IN_DEBT", "DUPLICATE_ENQUIRY_ID", "TRANSACTION_QUERY_NOT_PENDING", "MEMBERSHIP_INACTIVE", "ORDER_REF_ALREADY_TRACKED", "ORDER_REF_ALREADY_QUERIED", "TRANSACTION_DATE_BEFORE_ADVERTISER_LIVE_DATE", "CURRENCY_NOT_SUPPORTED", "CURRENCY_MISMATCH", "TRANSACTION_DATE_IN_FUTURE", "TRANSACTION_DATE_TOO_OLD", "OVERRIDE_NOT_ALLOWED" ], "example": "NOT_FOUND" } } } } } } ````