> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developers.beehiiv.com/api-reference/ad-network-offers/index/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.beehiiv.com/_mcp/server. # Get ad offers OAuth Scope: posts:read GET https://api.beehiiv.com/v2/publications/{publicationId}/ad_network/offers This feature is currently in beta and the API is subject to change. Retrieve a list of ad offers available for the publication. Reference: https://developers.beehiiv.com/api-reference/ad-network-offers/index ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `publicationId` (string, required) — The prefixed ID of the publication object ## Response ### 200 OK - `offers` (list of AdOffer, required) — A list of ad offers available for this publication. ## Errors ### 400 Bad Request Error Bad Request - `status` (integer, required) - `statusText` (string, required) - `errors` (list of ErrorDetail, required) ### 401 Unauthorized Error Unauthorized. The API key or OAuth access token is missing, invalid, or expired. - `status` (integer, required) - `statusText` (string, required) - `errors` (list of ErrorDetail, required) ### 403 Forbidden Error Forbidden - `status` (integer, required) - `statusText` (string, required) - `errors` (list of ErrorDetail, required) ### 404 Not Found Error Resource Not Found - `status` (integer, required) - `statusText` (string, required) - `errors` (list of ErrorDetail, required) ### 429 Too Many Requests Error Rate Limit Exceeded - `status` (integer, required) - `statusText` (string, required) - `errors` (list of ErrorDetail, required) ### 500 Internal Server Error Internal Server Error - `status` (integer, required) - `statusText` (string, required) - `errors` (list of ErrorDetail, required) ## Types ### AdOffer - `id` (string, required) — The ID of the offer or pending opportunity. - `payout_model` (string, required) — The payout model for the offer. - `payout_per_click` (string, required) — The formatted payout per eligible click. - `payout_per_mille` (string, required) — The formatted payout per thousand eligible opens. - `estimated_payout` (string, required) — The formatted estimated payout. - `campaign` (AdOfferCampaign, required) - `advertiser` (AdOfferAdvertiser, required) - `send_by` (datetime, optional) — The date the advertisement should be sent by. ### ErrorDetail - `message` (string, required) - `code` (string, required) ### AdOfferCampaign - `name` (string, required) — The campaign name. - `message_to_publisher` (string, optional) — The message from the advertiser to the publisher. - `promoted_item` (string, optional) — The item promoted by the campaign. - `promoted_item_other` (string, optional) — Additional promoted item details when applicable. ### AdOfferAdvertiser - `name` (string, required) — The advertiser name. - `description` (string, optional) — The advertiser description. - `url` (string, optional) — The advertiser website URL. ## Examples **Response** ```json { "offers": [ { "id": "00000000-0000-0000-0000-000000000000", "payout_model": "per_click", "payout_per_click": "$3.00", "payout_per_mille": "$0.00", "estimated_payout": "$300.00", "campaign": { "name": "World Cup", "message_to_publisher": "Run this campaign in an upcoming post.", "promoted_item": "product", "promoted_item_other": null }, "advertiser": { "name": "Kalshi", "description": "Prediction markets.", "url": "https://kalshi.com" }, "send_by": "2026-07-31T00:00:00Z" } ] } ``` **SDK Code** ```python import requests url = "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/ad_network/offers" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/ad_network/offers'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/ad_network/offers" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/ad_network/offers") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/ad_network/offers") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/ad_network/offers', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/ad_network/offers"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/ad_network/offers")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` > Build your audience with beehiiv's API and SDKs. Create new subscribers and posts, get real-time notifications of subscription activity, and more.