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

# Create a patient

> Creates a patient under your account and returns the created record. Seven fields are required: first and last name, sex assigned at birth, date of birth, email, phone, and a complete `address`. These are also what the eligibility check needs, so a patient created this way can order immediately. A patient matching an existing record on first name + last name + date of birth + gender is rejected with `400`, carrying the existing `patientId`.

Creates a patient under your account and returns the created record.

## Required fields

| | |
| :- | :- |
| `patientFirstName` | `patientLastName` |
| `patientGender` | `patientDateOfBirth` |
| `patientEmail` | `patientPhoneNumber` |
| `address` — with `street`, `city`, `state`, `zipCode`, `country` | |

Omitting any of them returns `400` listing exactly which are missing. Everything else in the schema
is optional.

These are also the fields the eligibility check needs, so a patient created this way can order
immediately.

`patientGender` is **sex assigned at birth** — `Female` or `Male`, and nothing else. Laboratory
reference ranges depend on it. `patientDateOfBirth` must be a real date in `YYYY-MM-DD` format.
Invalid dates and other formats return `400`.

> [!NOTE]
>
> Duplicates are detected on **first name + last name + date of birth + gender** within your clinic.
> A duplicate is rejected with `400` carrying the existing `patientId` — reconcile with that id
> rather than retrying. The key is `patientId`, the same name the create response uses.


## OpenAPI

````yaml POST /patients
openapi: 3.1.0
info:
  title: Vibrant Wellness Portal API
  version: 2026-07-01-draft
  description: >-
    Order lab tests and retrieve results programmatically. Authenticate once
    with OAuth2 client credentials, browse the catalog, quote and
    eligibility-check an order, create patients, place orders, and pull results
    with their report status and issues.


    This reference documents the target external contract (v1).
  contact:
    name: Vibrant Wellness Developer Support
    email: portal-api@vibrant-wellness.com
    url: https://developers.vibrant-wellness.com
  license:
    name: Proprietary
servers:
  - url: https://api.vibrant-america.com/v1
    description: Production
  - url: https://api-sandbox.vibrant-america.com/v1
    description: Staging (sandbox)
security:
  - oauth2: []
tags:
  - name: Catalog
    description: Browse orderable tests and panels.
  - name: Pricing
    description: Get an authoritative price and eligibility check before ordering.
  - name: Patients
    description: Create patients.
  - name: Orders
    description: Place lab orders.
  - name: Reports
    description: Retrieve results, report status, and issues.
paths:
  /patients:
    post:
      tags:
        - Patients
      summary: Create a patient
      description: >-
        Creates a patient under your account and returns the created record.
        Seven fields are required: first and last name, sex assigned at birth,
        date of birth, email, phone, and a complete `address`. These are also
        what the eligibility check needs, so a patient created this way can
        order immediately. A patient matching an existing record on first name +
        last name + date of birth + gender is rejected with `400`, carrying the
        existing `patientId`.
      operationId: createPatient
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePatientRequest'
            example:
              patientFirstName: Jane
              patientLastName: Doe
              patientGender: Female
              patientDateOfBirth: '1990-05-21'
              patientEmail: jane.doe@example.com
              patientPhoneNumber: '4085550100'
              address:
                street: 1 Main St
                apt: ''
                city: San Jose
                state: CA
                zipCode: '95112'
                country: US
      responses:
        '201':
          description: Patient created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientSummary'
              example:
                patientId: 750123
                patientFirstName: Jane
                patientMiddleName: null
                patientLastName: Doe
                patientGender: Female
                patientDateOfBirth: '1990-05-21'
                patientEmail: jane.doe@example.com
                patientPhoneNumber: '4085550100'
                guardianEmail: null
                patientHeight: '65'
                patientWeight: '150'
                address:
                  street: 1 Main St
                  apt: ''
                  city: San Jose
                  state: CA
                  zipCode: '95112'
                  country: US
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreatePatientRequest:
      type: object
      required:
        - patientFirstName
        - patientLastName
        - patientGender
        - patientDateOfBirth
        - patientEmail
        - patientPhoneNumber
        - address
      properties:
        patientFirstName:
          type: string
          example: Jane
        patientLastName:
          type: string
          example: Doe
        patientMiddleName:
          type: string
        patientGender:
          type: string
          enum:
            - Female
            - Male
          example: Female
          description: >-
            Sex assigned at birth — `Female` or `Male`. Laboratory reference
            ranges depend on it, so this is not a gender-identity field and no
            other value is accepted.
        patientDateOfBirth:
          type: string
          format: date
          description: Date of birth, `YYYY-MM-DD`.
          example: '1990-05-21'
        patientEmail:
          type: string
          format: email
          example: jane.doe@example.com
        patientPhoneNumber:
          type: string
          example: '4085550100'
        address:
          $ref: '#/components/schemas/Address'
        guardianEmail:
          type: string
          format: email
        patientHeight:
          type: string
          description: Height, in inches.
          example: '65'
        patientWeight:
          type: string
          example: '150'
    PatientSummary:
      type: object
      properties:
        patientId:
          type: integer
          example: 750123
        patientFirstName:
          type: string
          example: Jane
        patientMiddleName:
          type: string
          nullable: true
        patientLastName:
          type: string
          example: Doe
        patientGender:
          type: string
          enum:
            - Female
            - Male
          description: Sex assigned at birth.
        patientDateOfBirth:
          type: string
          format: date
          example: '1990-05-21'
        patientEmail:
          type: string
          example: jane.doe@example.com
        patientPhoneNumber:
          type: string
          example: '4085550100'
        guardianEmail:
          type: string
          nullable: true
        patientHeight:
          type: string
          example: '65'
        patientWeight:
          type: string
          example: '150'
        address:
          $ref: '#/components/schemas/Address'
    Address:
      type: object
      required:
        - street
        - city
        - state
        - zipCode
        - country
      properties:
        street:
          type: string
          example: 1 Main St
        apt:
          type: string
          description: Apartment, suite or unit.
          example: 5B
        city:
          type: string
          example: San Jose
        state:
          type: string
          example: CA
        zipCode:
          type: string
          example: '95112'
        country:
          type: string
          example: US
    Error:
      type: object
      description: >-
        🚧 Working in progress — this envelope is the contract; not yet returned
        by every endpoint.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable machine-readable error code.
            message:
              type: string
              description: Human-readable explanation.
            requestId:
              type: string
              description: >-
                Identifier for this request. Include it when contacting support.
                Also returned on every response as the X-Request-Id header.
              example: req_01JQ8ZC5X9K2MN
            details:
              type: array
              items:
                type: object
                additionalProperties: true
              description: Optional structured context.
          required:
            - code
            - message
            - requestId
  responses:
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_request
              message: One or more testCodes were not recognized.
              requestId: req_01JQ8ZC5X9K2MN
              details:
                - unknownCodes:
                    - FOO_BAR
    Unauthorized:
      description: Not authenticated. See Authentication.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: Not authenticated.
              requestId: req_01JQ8ZC5X9K2MN
    InternalError:
      description: >-
        Something went wrong on our side. Safe to retry (idempotent endpoints:
        reuse the same placerId).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: internal_error
              message: Unexpected error.
              requestId: req_01JQ8ZC5X9K2MN
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        OAuth2 client credentials. Generate a client ID and client secret in the
        Portal, exchange them for an access token, then send `Authorization:
        Bearer <access_token>`. Request the `result` and `report` scopes to read
        results.
      flows:
        clientCredentials:
          tokenUrl: https://api.vibrant-america.com/v1/oauth2/token
          scopes:
            result: Read finalized lab results
            report: Read report status and issues

````

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