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

# Get a contact by ID



## OpenAPI

````yaml GET /contacts/{contactId}
openapi: 3.1.0
info:
  title: Cogfy Messenger Public API
  version: 1.0.0
  description: API for interacting with the Cogfy Messenger platform
servers:
  - url: https://messenger-public-api.cogfy.com
    description: Production server
  - url: http://localhost:3100
    description: Local server
security:
  - ApiKeyAuth: []
paths:
  /contacts/{contactId}:
    get:
      tags:
        - Contacts
      summary: Get a contact by id
      parameters:
        - in: path
          name: contactId
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          required: true
      responses:
        '200':
          description: Contact details
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  waId:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: WhatsApp id of the contact
                  waProfileName:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Name in the WhatsApp profile of the contact
                  firstName:
                    anyOf:
                      - type: string
                      - type: 'null'
                  lastName:
                    anyOf:
                      - type: string
                      - type: 'null'
                  fullName:
                    anyOf:
                      - type: string
                      - type: 'null'
                  email:
                    anyOf:
                      - type: string
                      - type: 'null'
                  phone:
                    anyOf:
                      - type: string
                      - type: 'null'
                  occupation:
                    anyOf:
                      - type: string
                      - type: 'null'
                  gender:
                    anyOf:
                      - type: string
                      - type: 'null'
                  birthdate:
                    anyOf:
                      - type: string
                      - type: 'null'
                  age:
                    anyOf:
                      - type: number
                      - type: 'null'
                  notes:
                    anyOf:
                      - type: string
                      - type: 'null'
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        name:
                          type: string
                      required:
                        - id
                        - name
                      additionalProperties: false
                  createDate:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  updateDate:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  customProperties:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                        - type: 'null'
                    description: >-
                      Values of the custom contact properties of the workspace,
                      keyed by property name
                required:
                  - id
                  - waId
                  - waProfileName
                  - firstName
                  - lastName
                  - fullName
                  - email
                  - phone
                  - occupation
                  - gender
                  - birthdate
                  - age
                  - notes
                  - tags
                  - createDate
                  - updateDate
                  - customProperties
                additionalProperties: false
        '401':
          description: Unauthorized
        '404':
          description: Contact not found
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api-key

````