> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myunite.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OOH pre-test

> Create an out-of-home pre-test.

Use `channel: "ooh"` for out-of-home pieces (billboards, building wraps, street furniture and similar).

## Fields

| Field | Required | Description |
| - | - | - |
| `uploadId` | Yes | Id returned by `POST /uploads`, after uploading the file. Image or video up to 30 s. |
| `channel` | Yes | `ooh`. |
| `ooh.format` | Yes | The `key` of a format in `GET /catalog`, under `ooh.formats`. |
| `title` | No | Pre-test name (up to 200 characters). Without it, Unite generates one. |
| `brandId` | No | Id of a brand in `GET /catalog`. Turns on the brand checks. |
| `locale` | No | `pt`, `en` or `es`: language of the result texts. Without it, `Accept-Language` applies and, after that, `pt`. |
| `metadata` | No | Up to 20 text key and value pairs (key up to 40 characters, value up to 500). Comes back on the pre-test. |

An unknown format responds [`invalid_ooh_format`](https://docs.myunite.ai/en/errors#invalid_ooh_format). A brand that does not exist in the workspace responds [`brand_not_found`](https://docs.myunite.ai/en/errors#brand_not_found).

## Example

```bash curl theme={null}
curl -X POST https://myunite.ai/api/v1/pretests \
  -H "Authorization: Bearer $UNITE_API_KEY" \
  -H "Idempotency-Key: summer-urban-clock-ooh-001" \
  -H "Content-Type: application/json" \
  -d '{
    "uploadId": "upl_0123456789abcdef0123456789abcdef.png",
    "title": "Summer · urban clock",
    "channel": "ooh",
    "ooh": { "format": "CATALOG_FORMAT" },
    "brandId": "BRAND_ID",
    "metadata": { "campaign": "summer-2027" }
  }'
```

```javascript JavaScript theme={null}
const res = await fetch("https://myunite.ai/api/v1/pretests", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UNITE_API_KEY}`,
    "Idempotency-Key": "summer-urban-clock-ooh-001",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    uploadId: "upl_0123456789abcdef0123456789abcdef.png",
    title: "Summer · urban clock",
    channel: "ooh",
    ooh: { format: "CATALOG_FORMAT" },
    brandId: "BRAND_ID",
    metadata: { campaign: "summer-2027" },
  }),
});
console.log(res.status, await res.json()); // 202
```

```python Python theme={null}
import os
import requests

res = requests.post(
    "https://myunite.ai/api/v1/pretests",
    headers={
        "Authorization": f"Bearer {os.environ['UNITE_API_KEY']}",
        "Idempotency-Key": "summer-urban-clock-ooh-001",
    },
    json={
        "uploadId": "upl_0123456789abcdef0123456789abcdef.png",
        "title": "Summer · urban clock",
        "channel": "ooh",
        "ooh": {"format": "CATALOG_FORMAT"},
        "brandId": "BRAND_ID",
        "metadata": {"campaign": "summer-2027"},
    },
)
print(res.status_code, res.json())  # 202
```

The response is `202` with the pre-test as `queued` and the `Location` header. Continue with [polling the status](https://docs.myunite.ai/en/quickstart.md) and reading the [result](https://docs.myunite.ai/en/results.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.