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

# Get a contact

> Returns a single contact.

**Two different shapes, depending on the ID you pass:**

- **Public portal ID** (a 10-character string) → a lightweight lookup returning only `{ "con_id": "..." }`, with message `"Contact ID Found"`.
- **Internal contact ID** → the full contact profile, with message `"success"`.

The full profile is **not** a flat contact object. It is keyed by bucket ID (e.g. `"1165"`), each bucket holding a `fields` map where every field carries its metadata (`label`, `type`, `visible`, `editable`, …) as well as its `value`. Alongside the buckets it returns `con_id`, `con_pid`, `name`, `first_name`, `last_name`, `urls`, `photo`, `deletable`, `archived` and `archived_at`.

If you only need field values, prefer [List contacts](/api-reference/contacts/list-contacts) with `filters` and `fields` — its result objects are flat.

Requires the **`contacts`** permission on the service account that owns your API key. A key whose service account lacks it fails with `"Lacking necessary permission contacts"`.

**Permission:** requires `contacts`.

**A missing contact does not return 404.** An unknown ID comes back as `200` with `status: "failed"` and the message `Cannot find contact`.



## OpenAPI

````yaml /api-reference/specs/contacts.json get /api/contacts/{id}
openapi: 3.1.0
info:
  title: ConveYour API — Contacts
  description: >-
    Contacts are the core data object in ConveYour. Every person in your system
    — a learner, rep, or prospect — is a contact.
  version: 1.0.0
servers:
  - url: https://{subdomain}.conveyour.com
    description: Your organization's ConveYour instance
    variables:
      subdomain:
        default: acme
        description: >-
          Your organization's slug — the subdomain you sign in on. Replace
          `acme` with yours: if you sign in at `bigco.conveyour.com`, enter
          `bigco`.
security:
  - conveyourToken: []
tags:
  - name: Contacts
    description: >-
      Contacts are the core data object in ConveYour. Every person in your
      system — a learner, rep, or prospect — is a contact.
paths:
  /api/contacts/{id}:
    get:
      tags:
        - Contacts
      summary: Get a contact
      description: >-
        Returns a single contact.


        **Two different shapes, depending on the ID you pass:**


        - **Public portal ID** (a 10-character string) → a lightweight lookup
        returning only `{ "con_id": "..." }`, with message `"Contact ID Found"`.

        - **Internal contact ID** → the full contact profile, with message
        `"success"`.


        The full profile is **not** a flat contact object. It is keyed by bucket
        ID (e.g. `"1165"`), each bucket holding a `fields` map where every field
        carries its metadata (`label`, `type`, `visible`, `editable`, …) as well
        as its `value`. Alongside the buckets it returns `con_id`, `con_pid`,
        `name`, `first_name`, `last_name`, `urls`, `photo`, `deletable`,
        `archived` and `archived_at`.


        If you only need field values, prefer [List
        contacts](/api-reference/contacts/list-contacts) with `filters` and
        `fields` — its result objects are flat.


        Requires the **`contacts`** permission on the service account that owns
        your API key. A key whose service account lacks it fails with `"Lacking
        necessary permission contacts"`.


        **Permission:** requires `contacts`.


        **A missing contact does not return 404.** An unknown ID comes back as
        `200` with `status: "failed"` and the message `Cannot find contact`.
      operationId: getContact
      parameters:
        - $ref: '#/components/parameters/contactId'
        - $ref: '#/components/parameters/teams'
      responses:
        '200':
          description: The contact record.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        oneOf:
                          - $ref: '#/components/schemas/ContactDetail'
                          - $ref: '#/components/schemas/ContactIdOnly'
                        description: >-
                          The nested, bucket-keyed contact when the path segment
                          is an ObjectId. When it is a 10-character pid, only
                          {con_id} is returned.
              examples:
                by_object_id:
                  summary: By ObjectId — full contact
                  description: The nested, bucket-keyed contact.
                  value:
                    status: ok
                    message: success
                    data:
                      '1165':
                        title: Profile
                        type: profile
                        order: 0
                        fields:
                          first_name:
                            id: 6553
                            label: name
                            type: string
                            name: first_name
                            editable: true
                            visible: guest
                            value: Jane
                      con_id: 6a1445f03af9bb089d10e1ad
                      con_pid: Ab3Kd9Xz1Q
                      name: Jane Doe
                      first_name: Jane
                      last_name: Doe
                      urls: []
                      photo: ''
                      deletable: true
                      archived: false
                      archived_at: false
                by_pid:
                  summary: By 10-character pid — id only
                  description: >-
                    When the path segment is a 10-character public ID, the
                    response is the ObjectId alone. No contact fields are
                    included.
                  value:
                    status: ok
                    message: Contact ID Found
                    data:
                      con_id: 6a1445f03af9bb089d10e1ad
                not_found:
                  summary: Not found — still HTTP 200
                  description: >-
                    Returned with **HTTP 200**, not 404 — branch on `status`. A
                    missing contact returns 200 with `status: "failed"` — branch
                    on `status`, not on the HTTP code.
                  value:
                    status: failed
                    message: Cannot find contact
                    data: []
components:
  parameters:
    contactId:
      name: id
      in: path
      required: true
      description: The contact's internal ID.
      schema:
        type: string
      example: 64a1b2c3d4e5f6a7b8c9d0e1
    teams:
      name: teams[]
      in: query
      description: >-
        Team scope for the request, as one or more team ObjectIds. The brackets
        are required: PHP keeps only the last value for a repeated plain key, so
        `teams=A&teams=B` silently resolves to B alone. On requests with a JSON
        body you may send `teams` (no brackets) in the body instead.


        **Values that are not valid ObjectIds are silently ignored** — a
        mistyped team ID behaves as if no team was sent. See the [teams section
        of the API conventions guide](/guides/api-conventions#team-scoping).
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
      example:
        - 64a1b2c3d4e5f6a7b8c9d0ff
  schemas:
    Envelope:
      type: object
      description: The common response envelope shared by all ConveYour endpoints.
      properties:
        status:
          type: string
          enum:
            - ok
            - failed
          description: '`ok` on success, `failed` on error.'
        message:
          type: string
          description: Human-readable description of the result.
        data:
          description: >-
            The response payload — an object or an array depending on the
            endpoint.
    ContactDetail:
      type: object
      description: >-
        A single contact. Unlike the list endpoint, this returns a **nested**
        shape rather than flat fields. Custom fields are grouped under one key
        per bucket ID, each holding a fields map whose values are the full field
        definition plus a value. The list endpoint returns a different, flat
        shape.
      properties:
        con_id:
          type: string
          description: Contact ID. Always present.
        con_pid:
          type: string
          description: Public ID. Always present in the nested form.
        name:
          type: string
          description: >-
            Display name. Falls back to the literal 'unknown' when it resolves
            empty.
        first_name:
          type: string
          description: Filled from the org's default bucket when not already mapped.
        last_name:
          type: string
          description: Filled from the org's default bucket when not already mapped.
      additionalProperties:
        oneOf:
          - type: object
            description: A bucket, keyed by its numeric bucket ID.
            properties:
              fields:
                type: object
                description: >-
                  Field definitions keyed by machine name, each carrying its
                  value.
                additionalProperties:
                  type: object
                  properties:
                    label:
                      type: string
                      description: Display label.
                    type:
                      type: string
                      description: Field type.
                    value:
                      description: The stored value, formatted per type.
                    suffix:
                      type: string
                      description: First or Last, when set.
                    from_now:
                      type: string
                      description: >-
                        Relative time. Added only for suffix First/Last and
                        relative-time fields.
          - type: integer
            description: >-
              A <field>_child_cnt count, for each related-contact field the org
              defines.
        description: >-
          Either a bucket object keyed by bucket ID, or a related-contact child
          count.
    ContactIdOnly:
      type: object
      description: >-
        Returned when the path segment is a 10-character public ID (pid) rather
        than an ObjectId. In that case only the id is returned.
      properties:
        con_id:
          type: string
          description: The resolved contact ObjectId.
      required:
        - con_id
  securitySchemes:
    conveyourToken:
      type: apiKey
      in: header
      name: x-conveyour-token
      description: >-
        Your API key token. Contacts endpoints require a **Server-only — Full
        API** key — see [Authentication](/quickstart).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.