---
title: "Approve or Reject a Campaign"
method: POST
path: "/api/v1/campaigns/{campaignId}/update"
---

# Approve or Reject a Campaign

`POST /api/v1/campaigns/{campaignId}/update`

## Request

- Base URL: `https://api.enterprise.appier.net`
- URL: `https://api.enterprise.appier.net/api/v1/campaigns/{campaignId}/update`
- Auth: API key in header `appId` and API key in header `Authorization`

Approve or reject a campaign.

## Path parameters

- `campaignId` integer, required

## Request body

- object
  - `action` 'approve' | 'reject', required: The action to take on the campaign. Case-sensitive.
  - `reason` string, nullable: The rejection reason, up to 1,000 characters. The reason is saved for rejections only. An empty string or `null` is accepted.

## Response `200`

The campaign was approved or rejected.

- object
  - `campaignId` integer: The ID of the campaign.
  - `requestId` string: A trace ID for this request, not an idempotency key. It matches the `X-Request-ID` response header. Include it when you contact Appier Support ([ess_support@appier.com](mailto:ess_support@appier.com)) or your customer success manager.
  - `status` 'Approved' | 'Rejected': The result of the action. This isn't the campaign's current delivery or display status.
  - `statusChangedAt` string, date-time: When the action was accepted, in ISO 8601 format.
  - `statusChangedBy` object: The AIQUA user associated with the API token. This isn't the person who approved or rejected the campaign in your system.
    - `type` 'apiToken': The type of actor. Always "apiToken".
    - `id` string: An ID derived from the API token.
    - `name` string: The full name, email address, or username of the user associated with the API token.
    - `role` string, nullable: The first user group of the user associated with the API token, in alphabetical order, or `null`. This may not be the user's effective role in the account.
  - `statusChangeSource` 'API': Where the action came from. Always "API" for this endpoint.

## Other responses

- `401`: Authentication failed. Check your `Authorization` header.
- `403`: Access denied. The approval workflow isn't enabled for the account, the campaign doesn't exist or isn't in your account, your API token can't access the account, or your IP address isn't allowed.
- `405`: The HTTP method isn't allowed. Use `POST`.
- `406`: The request's `Accept` header doesn't allow a JSON response. Accept `application/json`.
- `409`: The action isn't allowed for the campaign's current status, for example, sending an action again after it already succeeded. To avoid conflicting changes, send only one request at a time for each campaign. If you get this error on a retry, it doesn't confirm that your earlier request succeeded, because someone else may have approved or rejected the campaign in the meantime. Don't keep retrying, and contact Appier Support ([ess_support@appier.com](mailto:ess_support@appier.com)) with the `requestId` to confirm what happened.
- `415`: The request body isn't JSON. Send `Content-Type: application/json`.
- `422`: The request is invalid, or the campaign has required fields that aren't complete.
- `500`: The request wasn't processed because of a connection or service issue, or an unexpected error. The action usually wasn't applied, so you can usually retry with exponential backoff. If the error continues, contact Appier Support ([ess_support@appier.com](mailto:ess_support@appier.com)) with the `requestId`.
- `504`: The request was received, but no response was returned in time. The action may have already been applied, so don't retry. Contact Appier Support ([ess_support@appier.com](mailto:ess_support@appier.com)) with the `requestId` to confirm what happened.

---

[API](https://skmtc.dev/appier/apis/campaign-approval.md) - [All operations](https://skmtc.dev/appier/apis/campaign-approval/llms.txt) - [OpenAPI document](https://skmtc.dev/appier/apis/campaign-approval/revisions/c2584ce16c83?raw)
