> ## 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.

# /preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes

> Add/remove identifiers to or from a contact list.



## OpenAPI

````yaml https://api.criteo.com/preview/marketingsolutions/open-api-specifications.json patch /preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes
openapi: 3.0.1
info:
  title: Criteo API
  description: Criteo API - MarketingSolutions
  version: Preview
servers:
  - url: https://api.criteo.com
security:
  - oauth: []
tags:
  - name: Advertiser
  - name: Analytics
  - name: Audience
  - name: Campaign
  - name: Catalog
  - name: Creative
  - name: Gateway
  - name: OnSiteRecommendation
  - name: Reco
paths:
  /preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes:
    patch:
      tags:
        - Audience
      summary: >-
        /preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes
      description: Add/remove identifiers to or from a contact list.
      operationId: ModifyAudienceUsersWithAttributes
      parameters:
        - name: audience-id
          in: path
          description: The id of the contact list audience-segment to amend
          required: true
          schema:
            type: string
            format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactlistWithAttributesAmendmentRequest'
        required: true
        x-bodyName: body
      responses:
        '200':
          description: Summary of created request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModifyAudienceResponse'
              example:
                data:
                  type: ContactlistAmendment
                  attributes:
                    contactListId: 12
                    operation: add
                    requestDate: '2018-12-10T10:00:50.0000000+00:00'
                    identifierType: madid
                    nbValidIdentifiers: 7343
                    nbInvalidIdentifiers: 13
                    sampleInvalidIdentifiers:
                      - InvalidIdentifier
                errors: []
                warnings: []
      security:
        - oauth:
            - MarketingSolutions_Audience_Manage
components:
  schemas:
    ContactlistWithAttributesAmendmentRequest:
      required:
        - data
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ContactlistWithAttributesAmendment'
      description: Request for a contactlist amendment with user attributes
      example:
        data:
          type: ContactlistWithUserAttributesAmendment
          attributes:
            operation: add
            identifierType: email
            identifiers:
              - identifier: example1@gmail.com
                attributes:
                  - key: age
                    value: '12'
                  - key: country
                    value: FR
                  - key: size
                    value: S
              - identifier: example2@gmail.com
                attributes:
                  - key: age
                    value: '43'
                  - key: preferredColor
                    value: yellow
    ModifyAudienceResponse:
      required:
        - data
        - errors
        - warnings
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ContactlistOperation'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/AudienceError'
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/AudienceWarning'
      description: Parameters to modify an audience
    ContactlistWithAttributesAmendment:
      required:
        - attributes
        - type
      type: object
      properties:
        attributes:
          required:
            - identifiers
            - operation
            - identifierType
          type: object
          properties:
            gumCallerId:
              type: object
              description: >-
                The Gum caller id of the advertiser patching identifiers of type
                Gum
              readOnly: true
            identifiers:
              type: array
              items:
                $ref: '#/components/schemas/UserDef'
              description: >-
                The users to add or remove, each in the schema specified,
                defined with attributes
            identifierType:
              enum:
                - email
                - madid
                - identityLink
                - gum
                - phoneNumber
              type: string
              description: What type of identifiers are used
              example: email
            operation:
              enum:
                - add
                - remove
              type: string
              description: Whether to add or remove users
          description: the name of the entity type
        type:
          type: string
          description: the name of the entity type
          example: ContactlistWithUserAttributesAmendment
      description: Parameters for a contactlist amendment with user attributes
    ContactlistOperation:
      required:
        - attributes
        - type
      type: object
      properties:
        attributes:
          required:
            - operation
          type: object
          properties:
            contactListId:
              type: integer
              description: the affected user list id
              nullable: true
            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
              nullable: true
            nbValidIdentifiers:
              type: integer
              description: How many identifiers were valid for the specified schema
              nullable: true
            operation:
              type: string
              description: The action recorded
            requestDate:
              type: string
              description: When the action was recorded
              format: date-time
              nullable: true
            sampleInvalidIdentifiers:
              type: array
              items:
                type: string
              description: A sample of invalid identifiers if there is some
              nullable: true
          description: the contactlist operation attributes
        type:
          type: string
          description: the name of the entity type
      description: Response definition of a contactlist 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
    UserDef:
      required:
        - attributes
        - identifier
      type: object
      properties:
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Attribute'
        identifier:
          type: string
      description: >-
        User definition with an identifier (email, uid...) and attributes (key,
        value)
    Attribute:
      required:
        - key
        - value
      type: object
      properties:
        key:
          type: string
        value:
          type: string
      description: User attribute definition under the form (key, value)
  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: {}

````