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

# How agents publish

> Every agent ad change is a preview, a summary you read, your yes, and a confirmed call. What each status means, what you see, and what comes back.

An agent never changes your ad account in one step. It previews, shows you exactly what
will happen, and acts only after your yes. This page explains each step so you can read
what your agent shows you.

## The two calls

<Steps>
  <Step title="The agent previews">
    It calls the tool without a confirm token. DATALYR checks the request, and the platform runs its own check where it has one. Nothing is created.
  </Step>

  <Step title="You read the summary">
    The agent shows the summary lines exactly as DATALYR wrote them. For Meta ads it also gives a link to every placement.
  </Step>

  <Step title="You say yes">
    Reply with a clear yes. Anything else means no.
  </Step>

  <Step title="The agent confirms">
    It repeats the same call with the confirm token from the preview. DATALYR does exactly what you saw, or nothing.
  </Step>
</Steps>

| Confirm token rule | Detail |
| - | - |
| Lifetime | 30 minutes |
| Uses | Once |
| Bound to | This exact request, workspace, ad account and person. A changed ad, budget or status means the agent must preview again. |
| What saying yes does | Also bound. If your access, the live ads switch or a spend limit changed since the preview, the agent must preview again. |
| Retries | The agent reuses the same `operation_id`. A retry returns the first result instead of creating a second copy. |

## Preview statuses

| Status | Meaning | What the agent does |
| - | - | - |
| `incomplete` | Something only you can answer is missing, such as a budget, a location or a call to action. | Asks you every question in one message, then previews again |
| `invalid` | Something is wrong or blocked. Each error carries a fix when there is one. | Applies each fix once and previews again. If it is still blocked, it tells you why. |
| `ready` | Every check passed. Warnings can remain. Warnings never block. | Shows you the summary and asks for a yes |

## What the summary shows

For new ads, the summary lists these lines:

| Line | Example |
| - | - |
| Platform and ad account | `Platform: Meta · Ad account: Example Store (act_123)` |
| Where the ads go | `Into: ad set "Spring sale" (campaign "Spring", sales). Budget and targeting unchanged.` |
| What is created | `Creates 2 ads, all PAUSED: "…", "…"` |
| Identity | `Runs as: Example Store + @examplestore`, with where the default came from |
| Link | The landing page with the tracking DATALYR adds |
| Enhancements | `Enhancements: all OFF`, or each one that is on |
| Platform check | `Meta validation: passed`, `TikTok checks: passed` or `Google Ads validation: passed` |
| What saying yes does | Only when it is more than a create, for example `Creating also turns on Meta for agents in this workspace.` |

Changes add their own lines: each object that turns on or pauses, each budget from and to,
and the new daily spend. See [Turn ads on within spend limits](/agent-ads/live-ads-and-spend-limits).

## See every placement (Meta)

A ready Meta preview comes with `all_placements_url`: a DATALYR page that draws the ad in
every Meta placement at once, grouped by **Feeds**, **Stories & Reels**, **Video**,
**Explore & search**, **Marketplace**, **Messenger**, **Threads** and **Apps**.

| On the page | Meaning |
| - | - |
| **DATALYR** / **Meta** toggle | Switch each tile between DATALYR's drawing and Meta's own preview |
| **Won't run here** | The ad set excludes this placement |
| **No Meta preview** | Meta has no preview for this placement |
| `4:5, cropped` or `1:1 on blurred fill` | The file's shape doesn't match the placement, so it is cropped or shown on a blurred fill |

The page needs a DATALYR sign-in as a member of the workspace, and it is kept for 24 hours.
TikTok previews come back as TikTok's own preview links. Google Ads has no rendered
preview, so the agent shows you the headlines, descriptions and link from the summary.

## What comes back after yes

| Result | Meaning |
| - | - |
| `created` / `changed` | Done. New ads come back paused, with their ids and Ads Manager links. |
| `partially_created` / `partially_changed` | Some succeeded. Each item says why the others failed. |
| `failed` | Nothing was created or changed. |
| `approval_required` | Your yes became an approval link. Share `approval_url` with an owner or admin. See [Access levels and approvals](/agent-ads/access-and-approvals). |
| `unknown` | The platform didn't answer, so DATALYR can't tell whether it happened. Anything created is paused. Check before a retry. |
| `not_created` / `not_changed` | The confirm step refused. The `code` says why, for example `confirm_token_invalid` after 30 minutes. |

The agent checks progress later with `get_ad_status` and the `operation_id`. For ads it
returns each ad's review state: `in_review`, `approved`, `rejected` with the platform's
reason, or `paused`.

## Links and tracking

DATALYR adds UTM and click parameters to every ad link, the same ones a tracking link
uses, so DATALYR attributes the ad. Agents don't add their own. Pass
`tracking.preset: "none"` to send the link unchanged.

| Link rule | Result |
| - | - |
| Not `https` | Refused, with the `https` form as the fix |
| An IP address or a username in the URL | Refused |
| A domain DATALYR doesn't track for this workspace | A warning: conversions from it won't be attributed |
| The same, with **Only allow links to my domains** on | The agent must ask you for another link |

Your domains are your verified domains, the sites your tracking runs on, and any you add
under **Settings → Ad publishing → My domains**.

## Find agent-made objects

| Platform | How to find them |
| - | - |
| Meta | The label `datalyr-agent` on campaigns, ad sets and ads |
| TikTok | Names that end in ` · dl-` and 8 characters |
| Google Ads | Names that end in ` · dl-` and 8 characters |

## Next

* [Access levels and approvals](/agent-ads/access-and-approvals): who can say yes to what.
* [Turn ads on within spend limits](/agent-ads/live-ads-and-spend-limits): the one step that starts spend.
* [Troubleshoot agent ads](/agent-ads/troubleshooting): refused tokens, approvals and unknown outcomes.


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