curl --request PUT \
--url https://api.metrito.com/v3/connections/{connection_id}/objects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "campaign",
"updates": [
{
"id": "120215678901234567",
"status": "PAUSED"
}
]
}
'{
"success": true,
"summary": {
"total": 2,
"successful": 2,
"failed": 0
},
"results": [
{
"id": "120215678901234567",
"success": true,
"error": null
},
{
"id": "120215678901234568",
"success": true,
"error": null
}
]
}{
"success": false,
"summary": {
"total": 2,
"successful": 1,
"failed": 1
},
"results": [
{
"id": "120215678901234567",
"success": true,
"error": null
},
{
"id": "120215678901234568",
"success": false,
"error": {
"message": "Campaign is not active and cannot be paused",
"code": 1487065
}
}
]
}{
"success": false,
"error": {
"type": "validation_error",
"code": "invalid_parameter",
"message": "type must be one of: campaign, adset, ad"
}
}{
"success": false,
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"type": "not_found_error",
"code": "resource_not_found",
"message": "Connection \"act_123456789\" not found in this workspace."
}
}{
"success": false,
"error": {
"type": "platform_error",
"code": "PLATFORM_NOT_SUPPORTED",
"message": "Platform \"google-ads\" does not support ad management operations yet."
}
}Plataforma
Atualizar Objetos de Anúncios
Pausar, ativar ou alterar o orçamento de campanhas, conjuntos de anúncios ou anúncios em lote.
Cada item no array updates recebe exatamente um dos campos status ou budget — nunca ambos.
O orçamento deve ser enviado em centavos da moeda da conta (ex: 5000 = R50,00ouUS 50,00).
O Metrito detecta automaticamente se a campanha usa orçamento diário ou vitalício.
PUT
/
v3
/
connections
/
{connection_id}
/
objects
curl --request PUT \
--url https://api.metrito.com/v3/connections/{connection_id}/objects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "campaign",
"updates": [
{
"id": "120215678901234567",
"status": "PAUSED"
}
]
}
'{
"success": true,
"summary": {
"total": 2,
"successful": 2,
"failed": 0
},
"results": [
{
"id": "120215678901234567",
"success": true,
"error": null
},
{
"id": "120215678901234568",
"success": true,
"error": null
}
]
}{
"success": false,
"summary": {
"total": 2,
"successful": 1,
"failed": 1
},
"results": [
{
"id": "120215678901234567",
"success": true,
"error": null
},
{
"id": "120215678901234568",
"success": false,
"error": {
"message": "Campaign is not active and cannot be paused",
"code": 1487065
}
}
]
}{
"success": false,
"error": {
"type": "validation_error",
"code": "invalid_parameter",
"message": "type must be one of: campaign, adset, ad"
}
}{
"success": false,
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>"
}
}{
"success": false,
"error": {
"type": "not_found_error",
"code": "resource_not_found",
"message": "Connection \"act_123456789\" not found in this workspace."
}
}{
"success": false,
"error": {
"type": "platform_error",
"code": "PLATFORM_NOT_SUPPORTED",
"message": "Platform \"google-ads\" does not support ad management operations yet."
}
}Autorizações
bearerAuthapiKeyAuth
JWT da plataforma ou API key mtk_live_... enviada no header Authorization
Parâmetros de caminho
ID da conexão no Metrito (64a1b2c3d4e5f6a7b8c9d0e1) ou ID da conta de anúncios na plataforma (act_123456789 para Meta Ads).
Exemplo:
"64a1b2c3d4e5f6a7b8c9d0e1"
Corpo
application/json
Tipo do objeto a ser atualizado.
Opções disponíveis:
campaign, adset, ad Exemplo:
"campaign"
Lista de objetos a atualizar. Cada item deve conter id e exatamente um de status ou budget.
Minimum array length:
1- Alterar status
- Alterar orçamento
Show child attributes
Show child attributes