---
title: "Record tracking data for VAST sponsorship units"
method: POST
path: "/v2/ads"
tags: ["sponsorship"]
---

# Record tracking data for VAST sponsorship units

`POST /v2/ads`

**Not** for use by NPR One clients (for whom sponsorship is already integrated into the Listening Service), this endpoint is designed to be used by our other client applications to submit tracking information for sponsorship units obtained from the `GET /sponsorship/v2/ads` endpoint.

The tracking information should be submitted in the body of the request in the form of a JSON object following the Collection.Doc+JSON specification.

## Headers

- `Authorization` string, required
- `X-Advertising-ID` string

## Request body

- UserAdDocument — All information relevant to a user who has requested sponsorship or submitted tracking information
  - `attributes` object, required — All information relevant to a user who has requested sponsorship or submitted tracking information
    - `ipAddress` string — The TCP/IP address of the client making the request. The server will attempt to grab this from the headers, so it probably does not need to be passed in the body unless you get back an error message stating that we were unable to determine an IP address from the request.
    - `userAgent` string — An identifying string for the browser making the request. The server will attempt to grab this from the headers, so it probably does not need to be passed in the body unless you get back an error message stating that we were unable to determine a User-Agent from the request.
  - `errors` object[], required — A list of encountered errors, ignored on POST, PUT
  - `href` string, required — A URL representation of the resource; should generally be ignored by clients unless noted otherwise
  - `items` object[], required — All the information needed for the Sponsorship Service to send back tracking information to our external sponsorship provider
    - `attributes` object, required — All the information needed for the Sponsorship Service to send back tracking information to our external sponsorship provider
      - `adId` string, required — The VAST Ad node `id` attribute value, (e.g. AdswizzAd12345)
      - `event` 'start' | 'firstQuartile' | 'midpoint' | 'thirdQuartile' | 'complete', required — The user-interaction event to submit tracking for
    - `errors` object[], required — A list of encountered errors, ignored on POST, PUT
    - `href` string, required — A URL representation of the resource; should generally be ignored by clients unless noted otherwise
    - `items` object[], required — Not used
    - `links` object, required
    - `version` string, required — The version of the Collection.Doc+JSON spec being used
  - `links` object, required
  - `version` string, required — The version of the Collection.Doc+JSON spec being used

## Response `204`

Request completed successfully, but there is nothing that we need to return to the caller.

## Other responses

- `400` — A bad request; generally, one or more parameters passed in were incorrect or missing
- `500` — A server error

---

[API](https://skmtc.net/npr/apis/sponsorship.md) · [All operations](https://skmtc.net/npr/apis/sponsorship/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/npr/sponsorship/versions/6ecbcc81450b/schema)
