> ## 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 recipient subscription

> # Description

Update a recipient where `recipientId` is the id of the recipient to be updated. 

# Body

```json
{
    "recipientsIds": array,
    "subscribe": boolean,
    "userId": string
}
```

where:

- `recipientsIds`: Array of recipients id to be updated.
- `subscribe`: Whether the recipients will be subscribed or unsubscribed.
- `userId`: User id of the user making the update.

# Response

No response with 204 status code.

# Description

Update a recipient where `recipientId` is the id of the recipient to be updated.

# Body

```json theme={null}
{
    "recipientsIds": array,
    "subscribe": boolean,
    "userId": string
}
```

where:

* `recipientsIds`: Array of recipients id to be updated.
* `subscribe`: Whether the recipients will be subscribed or unsubscribed.
* `userId`: User id of the user making the update.

# Response

No response with 204 status code.


## OpenAPI

````yaml PATCH /campaigns-service/v1/recipients/updateRecipientsSubscription
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/recipients/updateRecipientsSubscription:
    patch:
      summary: Update recipient subscription
      description: >-
        # Description


        Update a recipient where `recipientId` is the id of the recipient to be
        updated. 


        # Body


        ```json

        {
            "recipientsIds": array,
            "subscribe": boolean,
            "userId": string
        }

        ```


        where:


        - `recipientsIds`: Array of recipients id to be updated.

        - `subscribe`: Whether the recipients will be subscribed or
        unsubscribed.

        - `userId`: User id of the user making the update.


        # Response


        No response with 204 status code.
      operationId: >-
        update-recipient-subscription-patch-campaigns-service-v1-recipients-updaterecipientssubscription
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              recipientsIds:
                - recipient id 1
                - recipient id 2
              subscribe: false
              userId: user id
      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.

````