PEPINO ZAPdocs
Referência da APICampanhas

Retoma uma campanha pausada

Ver como Markdown
POST
/v1/campaigns/{id}/resume

Retoma uma campanha pausada (PAUSED → RUNNING), inclusive apos auto-pausa por falhas. Zera o contador de falhas consecutivas. Exige assinatura ativa (igual a disparar).

Authorization

bearerAuth
AuthorizationBearer <token>

API key enviada como Authorization Bearer pzk_live_...

In: header

Path Parameters

id*string

Identificador da campanha (precisa estar PAUSED).

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/campaigns/string/resume"
{
  "id": "string",
  "name": "string",
  "status": "DRAFT",
  "pausedReason": "string",
  "template": "string",
  "officialTemplate": {
    "name": "string",
    "language": "string",
    "components": [
      {}
    ]
  },
  "totals": {
    "total": 0,
    "pending": 0,
    "sent": 0,
    "delivered": 0,
    "read": 0,
    "responded": 0,
    "failed": 0,
    "invalid": 0
  },
  "cadence": {
    "window": {
      "start": "string",
      "end": "string",
      "tz": "string"
    },
    "autoPause": {
      "consecutiveThreshold": 0
    }
  },
  "runtime": {
    "sentToday": 0,
    "lastSentAt": "2019-08-24T14:15:22Z",
    "nextSendAt": "2019-08-24T14:15:22Z"
  },
  "startedAt": "2019-08-24T14:15:22Z",
  "completedAt": "2019-08-24T14:15:22Z",
  "createdAt": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "API key ausente ou invalida"
  }
}
{
  "error": {
    "code": "PAYMENT_REQUIRED",
    "message": "E necessario um plano ativo para usar este recurso. Assine em \"Meu plano\"."
  }
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Projeto inativo ou sem permissao"
  }
}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Instancia nao encontrada"
  }
}