---
title: "Update Campaign"
method: PATCH
path: "/Campaign/{id}"
tags: ["Campaign"]
---

# Update Campaign

`PATCH /Campaign/{id}`

Update an existing 'Campaign' record.

## Request body

- Campaign
  - `id` string — An ID.
  - `name` string — A one-line string.
  - `status` 'Planning' | 'Active' | 'Inactive' | 'Complete'
  - `type` 'Email' | 'Newsletter' | 'Informational Email' | 'Web' | 'Television' | 'Radio' | 'Mail'
  - `startDate` string, date, nullable — A date.
  - `endDate` string, date, nullable — A date.
  - `description` string, nullable — A multi-line text.
  - `createdAt` string, nullable — A timestamp in UTC.
  - `modifiedAt` string, nullable — A timestamp in UTC.
  - `createdById` string, nullable — An ID of the record of the User type.
  - `createdByName` string, nullable — A foreign record name.
  - `modifiedById` string, nullable — An ID of the record of the User type.
  - `modifiedByName` string, nullable — A foreign record name.
  - `assignedUserId` string, nullable — An ID of the record of the User type.
  - `assignedUserName` string, nullable — A foreign record name.
  - `teamsIds` string[], nullable — IDs of records of the Team type.
  - `teamsNames` object, nullable — An {ID => record name} map.
  - `targetListsIds` string[], nullable — IDs of records of the TargetList type.
  - `targetListsNames` object, nullable — An {ID => record name} map.
  - `excludingTargetListsIds` string[], nullable — IDs of records of the TargetList type.
  - `excludingTargetListsNames` object, nullable — An {ID => record name} map.
  - `sentCount` integer, nullable
  - `openedCount` integer, nullable
  - `clickedCount` integer, nullable
  - `optedInCount` integer, nullable
  - `optedOutCount` integer, nullable
  - `bouncedCount` integer, nullable
  - `hardBouncedCount` integer, nullable
  - `softBouncedCount` integer, nullable
  - `leadCreatedCount` integer, nullable
  - `revenue` number, nullable — A currency amount.
  - `revenueCurrency` 'USD' | 'EUR', nullable — A code.
  - `budget` number, nullable — A currency amount.
  - `budgetCurrency` 'USD' | 'EUR', nullable — A code.
  - `contactsTemplateId` string, nullable — An ID of the record of the Template type.
  - `contactsTemplateName` string, nullable — A foreign record name.
  - `leadsTemplateId` string, nullable — An ID of the record of the Template type.
  - `leadsTemplateName` string, nullable — A foreign record name.
  - `accountsTemplateId` string, nullable — An ID of the record of the Template type.
  - `accountsTemplateName` string, nullable — A foreign record name.
  - `usersTemplateId` string, nullable — An ID of the record of the Template type.
  - `usersTemplateName` string, nullable — A foreign record name.
  - `mailMergeOnlyWithAddress` boolean
  - `revenueConverted` number, nullable — A currency amount converted to the default currency.
  - `budgetConverted` number, nullable — A currency amount converted to the default currency.

## Response `200`

Success.

- Campaign
  - `id` string — An ID.
  - `name` string — A one-line string.
  - `status` 'Planning' | 'Active' | 'Inactive' | 'Complete'
  - `type` 'Email' | 'Newsletter' | 'Informational Email' | 'Web' | 'Television' | 'Radio' | 'Mail'
  - `startDate` string, date, nullable — A date.
  - `endDate` string, date, nullable — A date.
  - `description` string, nullable — A multi-line text.
  - `createdAt` string, nullable — A timestamp in UTC.
  - `modifiedAt` string, nullable — A timestamp in UTC.
  - `createdById` string, nullable — An ID of the record of the User type.
  - `createdByName` string, nullable — A foreign record name.
  - `modifiedById` string, nullable — An ID of the record of the User type.
  - `modifiedByName` string, nullable — A foreign record name.
  - `assignedUserId` string, nullable — An ID of the record of the User type.
  - `assignedUserName` string, nullable — A foreign record name.
  - `teamsIds` string[], nullable — IDs of records of the Team type.
  - `teamsNames` object, nullable — An {ID => record name} map.
  - `targetListsIds` string[], nullable — IDs of records of the TargetList type.
  - `targetListsNames` object, nullable — An {ID => record name} map.
  - `excludingTargetListsIds` string[], nullable — IDs of records of the TargetList type.
  - `excludingTargetListsNames` object, nullable — An {ID => record name} map.
  - `sentCount` integer, nullable
  - `openedCount` integer, nullable
  - `clickedCount` integer, nullable
  - `optedInCount` integer, nullable
  - `optedOutCount` integer, nullable
  - `bouncedCount` integer, nullable
  - `hardBouncedCount` integer, nullable
  - `softBouncedCount` integer, nullable
  - `leadCreatedCount` integer, nullable
  - `revenue` number, nullable — A currency amount.
  - `revenueCurrency` 'USD' | 'EUR', nullable — A code.
  - `budget` number, nullable — A currency amount.
  - `budgetCurrency` 'USD' | 'EUR', nullable — A code.
  - `contactsTemplateId` string, nullable — An ID of the record of the Template type.
  - `contactsTemplateName` string, nullable — A foreign record name.
  - `leadsTemplateId` string, nullable — An ID of the record of the Template type.
  - `leadsTemplateName` string, nullable — A foreign record name.
  - `accountsTemplateId` string, nullable — An ID of the record of the Template type.
  - `accountsTemplateName` string, nullable — A foreign record name.
  - `usersTemplateId` string, nullable — An ID of the record of the Template type.
  - `usersTemplateName` string, nullable — A foreign record name.
  - `mailMergeOnlyWithAddress` boolean
  - `revenueConverted` number, nullable — A currency amount converted to the default currency.
  - `budgetConverted` number, nullable — A currency amount converted to the default currency.

## Other responses

- `400` — Bad request. Might be a validation error. Check logs for details.
- `403` — Forbidden. Might be an access control error. Check logs for details.
- `409` — Conflict.

---

[API](https://skmtc.net/espocrm/apis/espocrm-api.md) · [All operations](https://skmtc.net/espocrm/apis/espocrm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/espocrm/espocrm-api/versions/6622dabfccd3/schema)
