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

# Update audience customers



## OpenAPI

````yaml openapi/audience-v1.json PATCH /v1/audiences/{audienceId}/customers
openapi: 3.0.4
info:
  title: Audience.Api
  version: v1
servers:
  - url: https://{host}/audience
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v1/audiences/{audienceId}/customers:
    patch:
      tags:
        - Audiences
      summary: Update audience customers
      parameters:
        - name: audienceId
          in: path
          description: ID of the audience to update.
          required: true
          schema:
            type: string
      requestBody:
        description: The list of customers Ids to add and remove.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeAudienceCustomersRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ChangeAudienceCustomersRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ChangeAudienceCustomersRequest'
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/WebServiceError'
            application/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
            text/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/WebServiceError'
            application/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
            text/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
components:
  schemas:
    ChangeAudienceCustomersRequest:
      type: object
      properties:
        membersToAdd:
          type: array
          items:
            type: string
          nullable: true
        membersToRemove:
          type: array
          items:
            type: string
          nullable: true
        membersReplaceAll:
          type: boolean
      additionalProperties: false
    WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````