Menú

Referencia de la API · Media Planner

Etiquetas

media_planner · labels · 5 operaciones

GET/v1/media-planner/labels

List campaign labels

media_planner.labels.list

LecturaIdempotenteDesde 2026-11-01

Lists the labels used to tag the rows of media plans (name, hex color, order). In an account, the workspace's labels come first with inherited: true (they can be used on the account's campaigns but are managed from the workspace), then the account's own; include_inherited=false returns only the own ones. Use their ids in label_ids of media_planner.campaigns.create/update. Requires view access to the Media Planner.

Alcance
media_planner:read
Permiso
Ver el módulo
Tool del MCP
media_planner_labels_listEn la superficie completa; en la compacta, mb_execute_operation con id: "media_planner.labels.list".

Costo declarado: hasta 402 lecturas y 0 escrituras por llamada (cuentan en el cupo diario).

Parámetros

include_inheritedbooleanqueryopcional

In an account, also the workspace labels it inherits (read-only there).

Por defecto: true

Respuesta

dataarray<object>

The labels, in their order.

Errores

Ejemplo

curl "https://api.mb-suite.com/v1/media-planner/labels" \
  -H "Authorization: Bearer $MB_API_KEY"

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

curl "https://api.mb-suite.com/v1/media-planner/labels" \
  -H "Authorization: Bearer $MB_TEST_KEY"
POST/v1/media-planner/labels

Create a campaign label

media_planner.labels.create

EscrituraDesde 2026-11-01

Creates a campaign label with a name (up to 80 characters) and an optional hex color (#rrggbb; default a color of the palette), placed last. A workspace's labels are inherited by its accounts. Up to 200 per organization (409 limit_reached, details.resource campaign_labels). Returns the label with its id. Requires full access to the Media Planner.

Alcance
media_planner:write
Permiso
Editar en el módulo
Tool del MCP
media_planner_labels_createEn la superficie completa; en la compacta, mb_execute_operation con id: "media_planner.labels.create".

Costo declarado: hasta 1 lecturas y 1 escrituras por llamada (cuentan en el cupo diario).

Parámetros

namestringcuerporequerido

Label name (up to 80 characters).

colorstringcuerpoopcional

Default: a color of the palette.

Respuesta

label_idstring

The new label's id.

labelobject

The new label.

Errores

Ejemplo

curl -X POST "https://api.mb-suite.com/v1/media-planner/labels" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME"
}'

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

curl -X POST "https://api.mb-suite.com/v1/media-planner/labels" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "NAME"
}'
PATCH/v1/media-planner/labels/{label_id}

Rename or recolor a campaign label

media_planner.labels.update

EscrituraIdempotenteDesde 2026-11-01

Updates the name and/or the color (#rrggbb) of a campaign label of this organization, sent inside updates ({ label_id, updates: { name, color } }); the rows that use it keep it. An inherited label is 404 here: update it from the workspace. Returns the updated label. Requires full access to the Media Planner.

Alcance
media_planner:write
Permiso
Editar en el módulo
Tool del MCP
media_planner_labels_updateEn la superficie completa; en la compacta, mb_execute_operation con id: "media_planner.labels.update".

Costo declarado: hasta 1 lecturas y 1 escrituras por llamada (cuentan en el cupo diario).

Parámetros

label_idstringrutarequerido

Campaign label id (from media_planner.labels.list).

updatesobjectcuerporequerido

The fields to change (name and/or color).

Respuesta

labelobject

The label as it is now.

Errores

Ejemplo

curl -X PATCH "https://api.mb-suite.com/v1/media-planner/labels/{label_id}" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {}
}'

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

curl -X PATCH "https://api.mb-suite.com/v1/media-planner/labels/{label_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "updates": {}
}'
POST/v1/media-planner/labels/reorder

Reorder campaign labels

media_planner.labels.reorder

EscrituraIdempotenteDesde 2026-11-01

Sets the order of this organization's campaign labels: label_ids in the new order (position = index). All or nothing: an id that is not a label of this organization stops the whole reorder (404). Requires full access to the Media Planner.

Alcance
media_planner:write
Permiso
Editar en el módulo
Tool del MCP
media_planner_labels_reorderEn la superficie completa; en la compacta, mb_execute_operation con id: "media_planner.labels.reorder".

Costo declarado: hasta 200 lecturas y 200 escrituras por llamada (cuentan en el cupo diario).

Parámetros

label_idsarray<string>cuerporequerido

The organization's label ids in the new order (from media_planner.labels.list).

Respuesta

countnumber

Labels reordered.

Errores

Ejemplo

curl -X POST "https://api.mb-suite.com/v1/media-planner/labels/reorder" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "label_ids": [
    "LABEL_ID"
  ]
}'

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

curl -X POST "https://api.mb-suite.com/v1/media-planner/labels/reorder" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "label_ids": [
    "LABEL_ID"
  ]
}'
DELETE/v1/media-planner/labels/{label_id}

Delete a campaign label

media_planner.labels.delete

IrreversibleDesde 2026-11-01

Deletes a campaign label and removes it from every row that has it, in this organization and, for a workspace label, in the accounts the person can reach. The label goes to the 30-day trash; restoring it brings the label back and puts it back on those rows (the ones that still exist; the trash keeps up to 5,000 of them, and with more the trash item says linked_truncated and the dry run warns). The dry run says how many rows have it. Outside the app it needs a dry run and a confirm_token, except a REST DELETE with a key allowed to delete. Returns how many rows were updated. Requires full access to the Media Planner.

Con una API key, este DELETE se ejecuta directo: el registro queda 30 días en la papelera y la respuesta trae su trash_item_id. Con un token OAuth, y por el MCP, pide dry_run → confirm_token.

Alcance
media_planner:write y «Permitir eliminar» (media_planner:delete en OAuth)
Permiso
Editar en el módulo
Tool del MCP
media_planner_labels_deleteEn la superficie completa; en la compacta, mb_execute_operation con id: "media_planner.labels.delete".

Costo declarado: hasta 1002 lecturas y 1001 escrituras por llamada (cuentan en el cupo diario).

Parámetros

label_idstringrutarequerido

Campaign label id (from media_planner.labels.list).

Respuesta

oktrue

Always true.

campaigns_updatednumber

Rows the label was taken off.

trash_item_idstring

The trash item this deletion left: the item_id of platform.trash.restore (POST /trash/{item_id}/restore). Missing if nothing went to the trash.

trash_item_idsarray<string>

Only when the deletion left more than one copy: all of them, the first being trash_item_id.

trash_expires_atnumber

When the copy leaves the trash for good (epoch ms): 30 days after the deletion.

Errores

Ejemplo

curl -X DELETE "https://api.mb-suite.com/v1/media-planner/labels/{label_id}" \
  -H "Authorization: Bearer $MB_API_KEY"

Probar con tu API key de prueba

Con una API key de prueba el pedido va siempre a tu organización de práctica: datos de ejemplo que puedes reiniciar.

curl -X DELETE "https://api.mb-suite.com/v1/media-planner/labels/{label_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"