> ## Documentation Index
> Fetch the complete documentation index at: https://docs.repdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update campaign

> # Description

Update fields of a campaign.

## Request payload

This endpoint needs a `campaignObject` (described in the list campaigns endpoint) with the modified fields. It also needs a `recipientLists` property.

## recipientLists

This property is an array of objects:

```json
[
    {
        "id": "string",
        "campaignId": "string"
    }
]
```

- `id`: Id of the recipient list.
- `campaignId`: Id of the campaign.

# Description

Update fields of a campaign.

## Request payload

This endpoint needs a `campaignObject` (described in the list campaigns endpoint) with the modified fields. It also needs a `recipientLists` property.

## recipientLists

This property is an array of objects:

```json theme={null}
[
    {
        "id": "string",
        "campaignId": "string"
    }
]
```

* `id`: Id of the recipient list.
* `campaignId`: Id of the campaign.


## OpenAPI

````yaml PUT /campaigns-service/v1/campaigns/{campaignId}
openapi: 3.0.3
info:
  title: SightX API
  version: 1.0.0
  description: >-
    SightX REST API documentation. Most responses are JSON; some export
    endpoints return files. API access is a paid add-on — contact
    sales@sightx.io for details.
servers:
  - url: https://auth.admin.sightx.io
    description: Authentication (Production)
  - url: https://auth.staging-admin.sightx.io
    description: Authentication (Staging)
security:
  - AuthorizationHeader: []
paths:
  /campaigns-service/v1/campaigns/{campaignId}:
    put:
      summary: Update campaign
      description: >-
        # Description


        Update fields of a campaign.


        ## Request payload


        This endpoint needs a `campaignObject` (described in the list campaigns
        endpoint) with the modified fields. It also needs a `recipientLists`
        property.


        ## recipientLists


        This property is an array of objects:


        ```json

        [
            {
                "id": "string",
                "campaignId": "string"
            }
        ]

        ```


        - `id`: Id of the recipient list.

        - `campaignId`: Id of the campaign.
      operationId: update-campaign-put-campaigns-service-v1-campaigns-campaignid
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              campaign: campaignObject
              recipientLists: array
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://campaigns.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````