---
title: "Attach a Google Ads label"
method: POST
path: "/v1/ads/labels/{labelId}/assignments"
tags: ["Ad Accounts"]
---

# Attach a Google Ads label

`POST /v1/ads/labels/{labelId}/assignments`

Attaches the label to campaigns, ad groups, ads and keywords (Google CampaignLabel,
AdGroupLabel, AdGroupAdLabel and AdGroupCriterionLabel) in one mutate. Idempotent: a
target that already carries the label is counted in `unchanged` instead of failing the
call. All ids are Google's own: ads and keywords use the composite id Google puts in
their resource names, `{adGroupId}~{adId}` and `{adGroupId}~{criterionId}` (the keyword
form is the tail of `resourceName` on `GET /v1/ads/keywords`).

## Path parameters

- `labelId` string, required

## Request body

- GoogleAdLabelAssignments — At least one id across the four target lists. Up to 1000 ids per list.
  - `accountId` string, required — Zernio SocialAccount id (Google Ads)
  - `adAccountId` string — Google customer id. Required when the connection has multiple customers.
  - `customerId` string — Alias of adAccountId
  - `campaignIds` string[] — Google campaign ids
  - `adSetIds` string[] — Google ad group ids
  - `adIds` string[] — Google ad group ad ids, {adGroupId}~{adId}
  - `keywordIds` string[] — Google keyword criterion ids, {adGroupId}~{criterionId}

## Response `200`

Label attached

- object
  - `customerId` string
  - `labelId` string
  - `attached` integer — Links created by this call
  - `unchanged` integer — Targets that already carried the label

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `404` — Label not found on this customer, or account unavailable
- `409` — The account exists but is inactive or needs reconnection. Reconnect it, then read GET /v1/accounts for its current account ID before retrying. Code: ads_connection_required.
- `501` — Only available on Google Ads accounts

## Changes

- **2026-09-28** `1c23a639830f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/ads/labels/:labelId/assignments/post.md)

---

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