# POST /v1/projects/:projectId/ads/:platform/pending/:pendingId/{approve,reject} (/docs/api/reference/ads/approve-pending)



<Endpoint method="POST" path="/v1/projects/:projectId/ads/{platform}/pending/:pendingId/approve" scope="ads:write:pending" phase="1" />

<Endpoint method="POST" path="/v1/projects/:projectId/ads/{platform}/pending/:pendingId/reject" scope="ads:write:pending" phase="1" />

Approve or reject a pending optimizer action. Approved actions dispatch on the optimizer's next 6h tick (or earlier if you trigger a fresh [optimizer run](/docs/api/reference/ads/optimizer-run)). Rejected actions are flagged and never dispatch.

## Approve body [#approve-body]

<Parameters
  title="Body (optional)"
  rows="[
  { name: 'comment', type: 'string', description: 'Free-form note attached to the approval audit row.' },
]"
/>

## Reject body [#reject-body]

<Parameters
  title="Body"
  rows="[
  { name: 'reason', type: 'string', required: true, description: 'Why the action was rejected. Surfaces in the audit log + on customer-side optimizer dashboard.' },
]"
/>

## Approve request [#approve-request]

```bash
curl -X POST https://api.layers.com/v1/projects/$PROJECT_ID/ads/meta/pending/$PENDING_ID/approve \
  -H "Authorization: Bearer $LAYERS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "comment": "Looks good — spend pacing is on target." }'
```

## Response [#response]

```json
{
  "pendingId": "pa_01HZX9...",
  "status": "approved",
  "dispatched": false,
  "dispatchedAt": null,
  "verdictId": "ver_01HZX9..."
}
```

`dispatched: false` is the immediate state — the optimizer's next tick (within 6 hours) executes the approved action. The `approval.dispatched` webhook fires when the platform-side mutation lands; `dispatchedAt` populates on the next read.

## Errors [#errors]

| Code              | When                                                    |
| ----------------- | ------------------------------------------------------- |
| `NOT_FOUND`       | Pending action doesn't exist or is already terminal.    |
| `FORBIDDEN_SCOPE` | Key lacks `ads:write:pending`.                          |
| `CONFLICT`        | Pending action is already approved/rejected/dispatched. |

## See also [#see-also]

* [`GET …/pending`](/docs/api/reference/ads/list-pending)
* [Run ads as partner](/docs/api/guides/run-ads-as-partner)
* [Webhooks](/docs/api/operational/webhooks)
