> ## 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.

# Create your first agent ad

> Turn a platform on for agents, connect Claude, ChatGPT, Claude Code or Codex with an ads access level, and have the agent create a paused ad.

When you finish, a paused ad that your agent made is in your ad account, and you have
seen its preview before saying yes.

## Before you start

| Requirement | Detail |
| - | - |
| Role | You are a workspace owner or admin. |
| Ad account | Meta, TikTok or Google Ads is connected in **Sources**, with the ad account selected. Agents use that one account per platform. |
| Connection age | If you connected the platform before agent ads existed, select **Reconnect** for it in **Sources**. The new connection includes the permission to create ads. |
| An ad set or ad group | For a first ad, use one that already exists. The agent can also build a campaign from scratch. |

## Set it up

<Steps>
  <Step title="Turn the platform on for agents">
    Open **Settings → Ad publishing**. Under **Platforms**, turn on the switch next to the platform.

    If you skip this, the first create from an owner or admin in chat turns it on. Any other request waits for an approval.
  </Step>

  <Step title="Connect your agent">
    Use the steps for your client in the table below.
  </Step>

  <Step title="Pick the access level">
    On the DATALYR consent page, keep the ads permission that matches the level you want. Untick the others. See the level table below.
  </Step>

  <Step title="Ask for an ad">
    Start a new conversation and ask for a paused ad. See the example below.
  </Step>

  <Step title="Read the preview and say yes">
    The agent shows a summary, and for Meta a link to every placement. Reply `yes` only when it is right.
  </Step>
</Steps>

### Connect your agent

| Client | Steps |
| - | - |
| Claude | Open **Customize → Connectors**. Select **+ → Add custom connector**. Enter `https://api.datalyr.com/mcp`. Select **Connect** and sign in. Full steps: [Connect Claude or Codex](/datalyr-mcp). |
| ChatGPT | Open **Settings → Apps**. Add `https://api.datalyr.com/mcp` as a connector and sign in to DATALYR. |
| Claude Code | Run `/plugin marketplace add datalyr/agent-skills`, then `/plugin install datalyr@datalyr`. Sign in when Claude Code asks. This adds the server and the `datalyr-ads` skill. |
| Codex | Run `codex mcp add datalyr --url https://api.datalyr.com/mcp`. Then run the login command below with the scopes for your level. |

```bash theme={null}
# Codex: Create paused. Add datalyr:publish:ads to also turn ads on.
codex mcp login datalyr --scopes datalyr:read,datalyr:write:ads
```

In Claude, if a file upload is refused, allow `api.datalyr.com` under
**Settings → Capabilities**. See [Add ad files](/agent-ads/files).

### Pick the access level

| Keep this consent row | Level | The agent can |
| - | - | - |
| None of the ads rows | Read-only | Read accounts, campaigns, files and activity |
| **Prepare paused ads for an owner or admin to approve (cannot create them)** | Propose | Preview. Every create waits for an approval. |
| **Upload creative and create paused ads, ad sets and campaigns in connected ad accounts** | Create paused | Create paused campaigns, ad sets and ads |
| **Turn ads on and change budgets in connected ad accounts, within the workspace's spend limits** | Publish live | Also turn ads on and raise budgets |

Pick **Create paused** for a first ad. To change the level later, remove the connector
and add it again. [Access levels and approvals](/agent-ads/access-and-approvals) has
the full rules.

## Example conversation

```text theme={null}
You:   Make a paused Meta ad in my "Spring sale" ad set. Use the image I attached.
       Link to https://shop.example.com/spring and say "20% off this week".

Agent: I checked the ad set. It takes single image ads, and your image fits the
       4:5 feed shape. Which call to action do you want: Shop now or Learn more?

You:   Shop now.

Agent: Here is the preview:
       Platform: Meta · Ad account: Example Store (act_123)
       Into: ad set "Spring sale" (campaign "Spring", sales). Budget and targeting unchanged.
       Creates 1 ad, all PAUSED: "20% off this week · Image · Oct 12"
       Runs as: Example Store + @examplestore (the only Page available)
       Link: https://shop.example.com/spring?utm_source=…
       Enhancements: all OFF
       Meta validation: passed
       Every placement: <link to DATALYR's preview page>
       Create it?

You:   Yes.

Agent: Created 1 paused ad: <Ads Manager link>. Turn it on there when you're ready, or ask me.
```

The agent writes the copy only within the platform's limits, and never invents prices
or offers. Claims and prices are yours to check in the preview.

## Turn the ad on

The ad stays paused. Turn it on yourself in Ads Manager, or ask the agent. An agent
turns it on directly only when you are the workspace owner, you connected with
**Publish live**, and live ads are on for the ad account. See
[Turn ads on within spend limits](/agent-ads/live-ads-and-spend-limits).

## Verify

1. Open Ads Manager for the ad account.
2. Find the new ad in the ad set. On Meta, filter by the label `datalyr-agent`.
3. Confirm the ad shows as paused.
4. Open **Settings → Ad publishing → Activity** in DATALYR.
5. Confirm the entry `Created 1 paused ad` names you and your agent.

## When it does not work

| Symptom | Cause | Fix |
| - | - | - |
| The agent says the account needs `reconnect` | The connection was made before agent ads. | Select **Reconnect** for the platform in **Sources**. |
| A create fails with `insufficient_scope` | You connected with read-only access. | Remove the connector, add it again, and keep an ads consent row. |
| The agent sends an approval link | Your level is Propose, or the platform is off and you aren't an owner or admin. | Open the link as an owner or admin and select **Approve**. |
| `This connection can only read ads` | You are a member. Members can't create ads. | Ask an owner or admin to connect their agent. |

More fixes: [Troubleshoot agent ads](/agent-ads/troubleshooting).

## Next

* [How agents publish](/agent-ads/how-publishing-works): the preview, the yes, and what comes back.
* [Add ad files](/agent-ads/files): attach, link, or upload images and videos.
* [Meta](/agent-ads/meta): objectives, targeting and formats an agent can use.


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