# Postman Collections

Postman collections are available for our APIs, providing pre-configured requests you can import and start using immediately. Each collection includes descriptions on every request and handles authentication automatically.

## Available Collections

| API | Requests | Download |
|  --- | --- | --- |
| [Campaigns API V3](/apis/campaigns-api/openapi) | 151 | Download |


## Getting Started

### Import a Collection

1. Download the collection JSON file from the table above
2. In Postman, click **Import** (or press Ctrl+O / Cmd+O)
3. Drop the file or select it from your file system


### Environment Setup

After importing, create a Postman environment with the following variables:

| Variable | Description | Example |
|  --- | --- | --- |
| `baseurl` | API base URL (include trailing slash) | `https://api.mediamath.com/api/v3.0/` |
| `clientID` | OAuth2 client ID | *(provided by your account manager)* |
| `clientSecret` | OAuth2 client secret | *(provided by your account manager)* |
| `username` | Your login username | `user@example.com` |
| `password` | Your login password | *(your password)* |


Make sure the environment is selected in the top-right dropdown before sending requests.

### Authentication

The first request to run is **Authentication > Login / Generate Token**. This calls the OAuth2 token endpoint and automatically stores the bearer token for all subsequent requests.

Tokens expire after a period of inactivity. If you start receiving `401 Unauthorized` responses, re-run the login request to get a fresh token.

## Usage Tips

- **Run requests in order** within each folder. Create requests set collection variables (like entity IDs) that subsequent requests depend on.
- **`{{variable}}` placeholders** in URLs and request bodies are automatically populated from collection variables set by prior requests.
- **List endpoints** support `full=*` for complete field responses, `page_limit` and `page_offset` for pagination, `sort_by` for ordering, and `q` for filtering.