# API references

OptiView Ads exposes two APIs: the **Ads REST API** to manage your channels and breaks, and the **OptiView Ads SDK** to play the resulting ads in your player.

## Ads REST API

The Ads REST API manages channels, origins, marker rules, breaks, events, templates, and integrations under `/api/v1`.

### Authentication

Every request requires both:

* HTTP Basic authentication, with the API key as the username and API secret as the password.
* The `X-Org-ID` header identifying the organization.

```bash
curl 'https://us.ads.optiview.dolby.com/api/v1/channels' \
  -u "$ADS_API_KEY:$ADS_API_SECRET" \
  -H 'X-Org-ID: <org-id>'
```

Treat the secret like a password. The internal service authentication used between platform components is not a public API authentication method.

### Reference

Browse the [generated Ads REST API reference](https://docs-preview.optiview.dolby.com/pr-863/ads/api/reference/optiview-ads-api.md). Operations are grouped by resource.

## OptiView Ads SDK

The [OptiView Ads SDK](https://docs-preview.optiview.dolby.com/pr-863/ads/player-integration/optiview-ads-sdk.md) ships a generated API reference that documents the `OptiViewAds` entry point, its configuration and session types, the `PlayerAdapter` interface for custom players, and the ad events you can subscribe to.

> **Beta**
>
> The OptiView Ads SDK is in beta. Its API can still change before the first stable release, and the reference is regenerated with every SDK release.

* [Web API reference](https://docs-preview.optiview.dolby.com/pr-863/ads/v2/api-reference/web) for the `@dolby-optiview/ads-sdk` package.

References for the Android, iOS, and React Native SDKs will follow.
