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

# Update Definition



## OpenAPI

````yaml /openapi/mio-openapi.json patch /api/v1/teams/{team_id}/contact-attributes/{definition_id}
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}/contact-attributes/{definition_id}:
    patch:
      tags:
        - contact-attributes-admin
      summary: Update Definition
      operationId: >-
        contact_attributes_admin.patch_contact_attributes_admin_patch_teams_by_team_id_contact_attributes_by_definition_id
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: definition_id
          required: true
          schema:
            title: Definition Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/DefinitionUpdateEnvelope'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/DefinitionResponse'
          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:
    DefinitionUpdateEnvelope:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/DefinitionUpdateResource'
      required:
        - data
      title: DefinitionUpdateEnvelope
      type: object
    DefinitionResponse:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/DefinitionResource'
      required:
        - data
      title: DefinitionResponse
      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
    DefinitionUpdateResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/DefinitionUpdateAttributes'
        type:
          const: contact_attribute_definitions
          title: Type
          type: string
      required:
        - type
        - attributes
      title: DefinitionUpdateResource
      type: object
    DefinitionResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/DefinitionAttributes'
        id:
          title: Id
          type: string
        type:
          const: contact_attribute_definitions
          default: contact_attribute_definitions
          title: Type
          type: string
      required:
        - id
        - attributes
      title: DefinitionResource
      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
    DefinitionUpdateAttributes:
      additionalProperties: false
      description: PATCH — every field optional. ``type`` is immutable (not present).
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        is_contact_editable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Contact Editable
        name:
          anyOf:
            - maxLength: 200
              minLength: 1
              type: string
            - type: 'null'
          title: Name
        position:
          anyOf:
            - maximum: 2147483647
              minimum: 0
              type: integer
            - type: 'null'
          title: Position
        slug:
          anyOf:
            - maxLength: 80
              minLength: 1
              type: string
            - type: 'null'
          title: Slug
      title: DefinitionUpdateAttributes
      type: object
    DefinitionAttributes:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        is_contact_editable:
          title: Is Contact Editable
          type: boolean
        name:
          title: Name
          type: string
        position:
          title: Position
          type: integer
        slug:
          title: Slug
          type: string
        team_id:
          title: Team Id
          type: string
        type:
          enum:
            - text
            - number
            - boolean
            - date
            - multiple
            - single
          title: Type
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - team_id
        - slug
        - name
        - type
        - description
        - is_contact_editable
        - position
        - created_at
        - updated_at
      title: DefinitionAttributes
      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

````