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

# Patch Contact Values



## OpenAPI

````yaml /openapi/mio-openapi.json patch /api/v1/teams/{team_id}/contacts/{team_contact_id}/attributes
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/contacts/{team_contact_id}/attributes:
    patch:
      tags:
        - contact-attributes-admin-values
      summary: Patch Contact Values
      operationId: >-
        contact_attributes_admin_values.patch_contact_attributes_admin_values_patch_teams_by_team_id_contacts_by_team_contact_id_attributes
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: team_contact_id
          required: true
          schema:
            title: Team Contact Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/BulkValuePatchEnvelope'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ContactValueListResponse'
          description: Successful Response
        '400':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Validation error
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Not authenticated
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Forbidden
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Resource not found
        '409':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Conflict
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Unprocessable entity
      security:
        - HTTPBearer: []
components:
  schemas:
    BulkValuePatchEnvelope:
      additionalProperties: false
      properties:
        data:
          items:
            discriminator:
              mapping:
                clear:
                  $ref: '#/components/schemas/ClearOperation'
                set:
                  $ref: '#/components/schemas/SetOperation'
              propertyName: type
            oneOf:
              - $ref: '#/components/schemas/SetOperation'
              - $ref: '#/components/schemas/ClearOperation'
          maxItems: 200
          minItems: 1
          title: Data
          type: array
      required:
        - data
      title: BulkValuePatchEnvelope
      type: object
    ContactValueListResponse:
      additionalProperties: false
      properties:
        data:
          items:
            $ref: '#/components/schemas/ContactValueResource'
          title: Data
          type: array
      required:
        - data
      title: ContactValueListResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    ClearOperation:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/ClearOperationAttributes'
        type:
          const: clear
          title: Type
          type: string
      required:
        - type
        - attributes
      title: ClearOperation
      type: object
    SetOperation:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/SetOperationAttributes'
        type:
          const: set
          title: Type
          type: string
      required:
        - type
        - attributes
      title: SetOperation
      type: object
    ContactValueResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/ContactValueAttributes'
        id:
          title: Id
          type: string
        type:
          const: contact_attribute_values
          default: contact_attribute_values
          title: Type
          type: string
      required:
        - id
        - attributes
      title: ContactValueResource
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
    ClearOperationAttributes:
      additionalProperties: false
      description: |-
        A single clear operation.

        Clears the full value for the identified attribute. For scalar defs the
        scalar row is removed; for multi-select, all selected options for this
        (contact, definition) are removed.
      properties:
        definition_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Definition Id
        definition_slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Definition Slug
      title: ClearOperationAttributes
      type: object
    SetOperationAttributes:
      additionalProperties: false
      description: |-
        A single set operation.

        Caller may identify the attribute by ``definition_id`` OR
        ``definition_slug``. For scalar defs, exactly one of value_text /
        value_number / value_boolean / value_date must be set. For multi-select
        defs, caller provides ``option_ids`` and/or ``option_slugs``.
      properties:
        definition_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Definition Id
        definition_slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Definition Slug
        option_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Option Ids
        option_slugs:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Option Slugs
        value_boolean:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Value Boolean
        value_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Value Date
        value_number:
          anyOf:
            - type: number
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              type: string
            - type: 'null'
          title: Value Number
        value_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Value Text
      title: SetOperationAttributes
      type: object
    ContactValueAttributes:
      additionalProperties: false
      description: >-
        Flat view of a contact's attribute value for a single definition.


        Scalar defs set exactly one of value_text / value_number / value_boolean
        /

        value_date. Multi-select defs set ``option_ids`` and leave the scalar

        fields None.
      properties:
        definition_id:
          title: Definition Id
          type: string
        definition_slug:
          title: Definition Slug
          type: string
        option_ids:
          items:
            type: string
          title: Option Ids
          type: array
        option_slugs:
          items:
            type: string
          title: Option Slugs
          type: array
        type:
          title: Type
          type: string
        value_boolean:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Value Boolean
        value_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Value Date
        value_number:
          anyOf:
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              type: string
            - type: 'null'
          title: Value Number
        value_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Value Text
      required:
        - definition_id
        - definition_slug
        - type
      title: ContactValueAttributes
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````