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

# Create custom record type

> Create a new custom record type for the project



## OpenAPI

````yaml /api-reference/openapi.yaml post /custom_records_types
openapi: 3.1.0
info:
  title: ONVY Health API
  description: >-
    AI-powered holistic health services API with data merging and metrics
    calculation
  version: 1.0.0
  contact:
    name: ONVY Support
    email: support@onvy.health
    url: https://onvy.health
  license:
    name: Proprietary
    url: https://onvy.health/terms
servers:
  - url: https://api.onvy.health
    description: Public API
security:
  - bearerAuth: []
tags:
  - name: static
    description: Static configuration endpoints
  - name: users
    description: User management
  - name: baselines
    description: User baseline metrics
  - name: daily-records
    description: Daily health records
  - name: chat
    description: AI chat completions
  - name: facts
    description: User facts for individualization
  - name: activities
    description: User activities (workouts and mindfulness sessions)
  - name: ai-summaries
    description: |
      AI-generated summaries. This is how ONVY exposes domain-specific
      insights such as meal nutrition analysis, sleep insights, workouts,
      and daily, weekly, nutrition, trend, and impact analysis. Most
      summary types are system-generated; the public create surface
      currently accepts `type=meal`.
  - name: custom-records
    description: Custom records and types
  - name: meals
    description: Nutrition meal tracking
paths:
  /custom_records_types:
    post:
      tags:
        - custom-records
      summary: Create custom record type
      description: Create a new custom record type for the project
      operationId: createCustomRecordType
      requestBody:
        description: Custom record type data
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomRecordType'
      responses:
        '201':
          description: Custom record type created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRecordType'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CustomRecordType:
      type: object
      properties:
        id:
          type: string
          description: >-
            Developer-defined custom record type identifier (e.g.,
            blood_test_v1)
        project_id:
          type: string
          description: Project ID
        display_name:
          type: string
          description: Human-readable name of the custom record type
        description:
          type: string
          nullable: true
          description: Optional description of the custom record type
        data_jsonschema:
          type: object
          description: >-
            JSON Schema describing the structure of the data field for records
            of this type
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ValidationError:
      type: object
      title: ValidationError
      required:
        - error
      properties:
        error:
          type: string
          minLength: 1
      additionalProperties: false
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth bearer token for Health API authentication

````