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

# Add contact attribute



## OpenAPI

````yaml /api-reference/openapi-v2.json post /contacts/{contactId}/attributes
openapi: 3.1.0
info:
  title: Heyy API
  version: 2.0.0
servers:
  - url: https://api.heyy.io/v2
security:
  - bearerAuth: []
paths:
  /contacts/{contactId}/attributes:
    post:
      summary: Add contact attribute
      parameters:
        - name: contactId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                externalId:
                  type: string
                  pattern: ^[A-Za-z][A-Za-z0-9_]*$
                value:
                  type: string
              required:
                - externalId
                - value
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      attributes:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            value:
                              type: string
                          required:
                            - name
                            - value
                    required:
                      - id
                      - attributes
                required:
                  - success
                  - data
                additionalProperties: false
              example:
                success: true
                data:
                  id: string
                  attributes: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````