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

# /2025-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove

> Add/remove identifiers to or from a retail-media contact list audience-segment, with external audience segment id.



## OpenAPI

````yaml https://api.criteo.com/2025-01/retailmedia/open-api-specifications.json post /2025-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove
openapi: 3.0.1
info:
  title: Criteo API
  description: Criteo API - RetailMedia
  version: 2025-01
servers:
  - url: https://api.criteo.com
security:
  - oauth: []
tags:
  - name: Accounts
  - name: Analytics
  - name: Audience
  - name: Balance
  - name: Campaign
  - name: Gateway
paths:
  /2025-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove:
    post:
      tags:
        - Audience
      summary: >-
        /2025-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove
      description: >-
        Add/remove identifiers to or from a retail-media contact list
        audience-segment, with external audience segment id.
      operationId: AddRemoveContactListByAudienceSegment
      parameters:
        - name: audience-segment-id
          in: path
          description: >-
            The id of the contact list audience-segment to amend, we only accept
            external Id here
          required: true
          schema:
            type: string
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetailMediaContactlistAmendmentRequest'
        required: true
        x-bodyName: body
      responses:
        '200':
          description: Summary of created request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetailMediaContactlistOperation'
              example:
                type: AddRemoveContactlistResult
                data:
                  contactListId: 568708742535471100
                  operation: add
                  requestDate: '2018-12-10T10:00:50.0000000+00:00'
                  identifierType: madid
                  nbValidIdentifiers: 7343
                  nbInvalidIdentifiers: 13
                  sampleInvalidIdentifiers:
                    - InvalidIdentifier
                errors:
                  - traceId: 667ac683ac797284.667ac683ac797284<:667ac683ac797284
                    type: availability
                    code: internal-error
                    instance: ''
                    title: Internal error
                warnings:
                  - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9
                    type: deprecation
                    code: deprecated-field
                    instance: /audiences/314195
                    title: '''nbValidIds'' is deprecated'
                    detail: >-
                      The field 'nbValidIds' is deprecated please use
                      'nbValidIdentifiers'
      security:
        - oauth:
            - RetailMedia_Audience_Manage
components:
  schemas:
    RetailMediaContactlistAmendmentRequest:
      required:
        - data
      type: object
      properties:
        data:
          $ref: '#/components/schemas/RetailMediaContactlistAmendment'
      description: Request of Retail Media contactlist
    RetailMediaContactlistOperation:
      required:
        - data
        - errors
        - warnings
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/RetailMediaContactlistOperationResponseAttributes
        errors:
          type: array
          items:
            $ref: '#/components/schemas/AudienceError'
        type:
          type: string
          description: the name of the entity type
          nullable: true
          example: AddRemoveContactlistResult
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/AudienceWarning'
      description: Operation on Retail Media contact list
    RetailMediaContactlistAmendment:
      required:
        - attributes
      type: object
      properties:
        attributes:
          required:
            - identifiers
            - operation
          type: object
          properties:
            identifiers:
              type: array
              items:
                type: string
              description: The users to add or remove, each in the schema specified
            identifierType:
              enum:
                - Email
                - UserIdentifier
                - IdentityLink
                - Gum
                - CustomerId
                - PhoneNumber
              type: string
              description: What type of identifiers are used
            operation:
              enum:
                - add
                - remove
              type: string
              description: Whether to add or remove users
          description: Attributes of retail media contact list amendment
        type:
          type: string
          description: User List
          example: AddRemoveContactlist
      description: Request data of retail media contact list amendment
    RetailMediaContactlistOperationResponseAttributes:
      required:
        - contactListId
        - operation
        - requestDate
      type: object
      properties:
        contactListId:
          type: integer
          description: The affected user list id
          format: int64
        identifierType:
          type: string
          description: The schema specified for of the identifiers
          nullable: true
        nbInvalidIdentifiers:
          type: integer
          description: How many identifiers were invalid for the specified schema
          format: int32
          nullable: true
        nbValidIdentifiers:
          type: integer
          description: How many identifiers were valid for the specified schema
          format: int32
          nullable: true
        operation:
          type: string
          description: The action recorded
        requestDate:
          type: string
          description: When the action was recorded
          format: date-time
        sampleInvalidIdentifiers:
          type: array
          items:
            type: string
          description: A sample of invalid identifiers if there is some
          nullable: true
      description: The attributes of Retail Media contact list operation
    AudienceError:
      required:
        - code
        - instance
        - type
      type: object
      properties:
        code:
          type: string
          description: >-
            (REQUIRED) A machine-readable unique error code, expressed as a
            string value. The format used must be kebab-case.
        detail:
          type: string
          description: >-
            (RECOMMENDED) A human-readable explanation specific to this
            occurrence of the problem
          nullable: true
        instance:
          type: string
          description: >-
            (REQUIRED) A URI reference that identifies the specific occurrence
            of the problem
        source:
          type: object
          description: >-
            (OPTIONAL) A machine-readable structure to reference to the exact
            location(s) causing the error(s)
          nullable: true
        stackTrace:
          type: array
          items:
            type: string
          description: >-
            (NEVER IN PRODUCTION) A human-readable stacktrace produced by the
            implementation technology
          nullable: true
        title:
          type: string
          description: (RECOMMENDED) A short, human-readable summary of the problem type
          nullable: true
        traceId:
          type: string
          description: >-
            (REQUIRED) The Correlation ID provided by the Gateway. It is also a
            unique identifier for this particular occurrence of the problem.
          nullable: true
        type:
          enum:
            - access-control
            - authentication
            - authorization
            - availability
            - deprecation
            - quota
            - validation
          type: string
          description: (REQUIRED) The classification of the error
      description: Definition of an audience error
    AudienceWarning:
      required:
        - code
        - detail
        - instance
        - type
      type: object
      properties:
        code:
          type: string
          description: >-
            (REQUIRED) A machine-readable unique error code, expressed as a
            string value. The format used must be kebab-case.
        detail:
          type: string
          description: >-
            (REQUIRED) A human-readable explanation specific to this occurrence
            of the problem
        instance:
          type: string
          description: >-
            (REQUIRED) A URI reference that identifies the specific occurrence
            of the problem
        source:
          type: object
          description: >-
            (OPTIONAL) A machine-readable structure to reference to the exact
            location(s) causing the error(s)
          nullable: true
        stackTrace:
          type: array
          items:
            type: string
          description: >-
            (NEVER IN PRODUCTION) A human-readable stacktrace produced by the
            implementation technology
          nullable: true
        title:
          type: string
          description: (RECOMMENDED) A short, human-readable summary of the problem type
          nullable: true
        traceId:
          type: string
          description: >-
            (REQUIRED) The Correlation ID provided by the Gateway. It is also a
            unique identifier for this particular occurrence of the problem.
          nullable: true
        type:
          enum:
            - access-control
            - authentication
            - authorization
            - availability
            - deprecation
            - quota
            - validation
          type: string
          description: (REQUIRED) The classification of the error
      description: Definition of the warning
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes: {}
        authorizationCode:
          authorizationUrl: https://api.criteo.com/oauth2
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes: {}

````