---
title: "Resolve Ad Accounts"
method: POST
path: "/ad_platforms/resolve-ad-accounts"
---

# Resolve Ad Accounts

`POST /ad_platforms/resolve-ad-accounts`

## Request

- Base URL: `https://app.runconverge.com/api`
- URL: `https://app.runconverge.com/api/ad_platforms/resolve-ad-accounts`
- Auth: none declared

Resolve the ad-account id for each target. Used by the agent plan
destinations popover to build bulk Ads Manager deep-links — those need
`?act=<account>` to land on the right account.

Single ClickHouse pass: campaign/ad-set/ad ids are namespace-unique
within a workspace, so we don't need to filter by level or channel at
the SQL layer — we just `OR` the three `IN` clauses and read which id
column matched on each row. The row carries `channel`, so multi-channel
requests disambiguate naturally on the way back.

## Headers

- `Authorization` string, nullable
- `X-User-Id` string, nullable

## Cookies

- `session_id` string, nullable

## Request body

- ResolveAdAccountsRequest
  - `targets` ResolveAdAccountsTarget[], required
    - `channel` string, required
    - `level` 'campaign' | 'adset' | 'ad', required
    - `id` string, required

## Response `200`

Successful Response

- ResolveAdAccountsResponse: Resolved targets. Inputs not present in this workspace's ad-metadata table are omitted; callers treat them as "couldn't resolve" and degrade the affordance (e.g. disable the bulk Ads Manager link).
  - `resolved` ResolvedAdAccount[], required
    - `channel` string, required
    - `level` 'campaign' | 'adset' | 'ad', required
    - `id` string, required
    - `ad_account_id` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/runconverge/apis/runconverge-api.md) - [All operations](https://skmtc.dev/runconverge/apis/runconverge-api/llms.txt) - [OpenAPI document](https://skmtc.dev/runconverge/apis/runconverge-api/revisions/f723e951cc0b?raw)
