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

# Create Metadata

> Creates a new metadata record for a model. The `data` field accepts
any valid JSON: strings, numbers, booleans, arrays, or objects.



## OpenAPI

````yaml /openapi.yaml post /api/metadata
openapi: 3.0.3
info:
  title: Lendflow API docs
  description: ''
  version: 1.0.0
servers:
  - url: https://api.lendflow.com
security:
  - default: []
tags:
  - name: Authentication
    description: >-

      Lendflow uses API Bearer Tokens to permit access to our API. You can
      register for a new Lendflow API key on our <a style="color:blue;"
      href="https://app.lendflow.com/login">client portal</a> in less than 60
      seconds. The Bearer Token needs to be included in all API requests made to
      the API Service in the following form: <div
      id="auth-example">Authorization: Bearer [YOUR_TOKEN]</div><div
      id="auth-reminder"><div id="edge-green"></div><div
      id="auth-reminder-text">You must replace [YOUR_TOKEN] with your personal
      API key.</div></div>
  - name: Access Tokens
    description: |-

      Create and manage the personal access tokens used to authenticate API
      requests.
  - name: Workflow Management
    description: |-

      Create applications and manage them through every stage of their workflow,
      from intake through decision.
  - name: Documents
    description: |-

      Upload, retrieve, and manage the files attached to an application.
  - name: Placements
    description: |-

      Submit applications to lenders and manage each placement through its
      lifecycle.
  - name: Offers
    description: |-

      Create and manage offers on an application, from initial terms through
      funding.
  - name: Smartviews
    description: |-

      Save and manage reusable application filters that organize your pipeline.
  - name: Workflow Templates
    description: |-

      Browse the workflow templates available for creating applications.
  - name: Consent Templates
    description: |-

      Manage the consent documents presented to applicants for signature.
  - name: Offer Templates
    description: |-

      Manage the templates that define the structure and fields of your offers.
  - name: Data Orchestration
    description: |-

      Run data orchestration templates against applications and review their
      execution logs.
  - name: Attributes
    description: |-

      Define computed attributes and evaluate them against your applications.
  - name: Scorecards
    description: |-

      Run scorecards and scorecard groups against applications and retrieve
      their results.
  - name: Entity Profiles
    description: |-

      Manage the reusable business and individual profiles shared across
      applications.
  - name: Organization
    description: |-

      Manage the users in your organization.
  - name: Metadata
    description: |-

      Attach custom key-value data to your applications and files.
paths:
  /api/metadata:
    post:
      tags:
        - Metadata
      summary: Create Metadata
      description: |-
        Creates a new metadata record for a model. The `data` field accepts
        any valid JSON: strings, numbers, booleans, arrays, or objects.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model_type:
                  type: string
                  description: 'The type of model. Supported: file, application.'
                  example: application
                  enum:
                    - file
                    - application
                model_id:
                  type: string
                  description: >-
                    The ID of the model (UUID for applications, integer for
                    files).
                  example: architecto
                key:
                  type: string
                  description: >-
                    Filter by specific metadata key. Must not be greater than
                    255 characters.
                  example: 'n'
                value:
                  type: string
                  description: >-
                    The value of the metadata. Must not be greater than 1000
                    characters.
                  example: g
                content:
                  type: object
                  description: >-
                    Freeform data to store. Accepts any valid JSON: string,
                    number, boolean, array, or object.
                  example:
                    field: value
                  properties: {}
                lendflow_only:
                  type: boolean
                  description: If true, only Lendflow employees can view this metadata.
                  example: false
              required:
                - model_type
                - model_id
                - key
                - content
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: null
                    model_type: App\Models\Application
                    model_id: 9d1fa84b-0be9-4527-a7fd-4b97ced6357b
                    key: intuit_offer_checksum
                    value: animi
                    content:
                      version: null
                      type: 'null'
                      value: null
                    lendflow_only: false
                    created_at: null
                    updated_at: null
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: null
                        nullable: true
                      model_type:
                        type: string
                        example: App\Models\Application
                      model_id:
                        type: string
                        example: 9d1fa84b-0be9-4527-a7fd-4b97ced6357b
                      key:
                        type: string
                        example: intuit_offer_checksum
                      value:
                        type: string
                        example: animi
                      content:
                        type: object
                        properties:
                          version:
                            type: string
                            example: null
                            nullable: true
                          type:
                            type: string
                            example: 'null'
                          value:
                            type: string
                            example: null
                            nullable: true
                      lendflow_only:
                        type: boolean
                        example: false
                      created_at:
                        type: string
                        example: null
                        nullable: true
                      updated_at:
                        type: string
                        example: null
                        nullable: true
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: >-
        <br>You can register for a new Lendflow API key on our <a
        style="color:blue;" href="https://app.lendflow.com/login">client
        portal</a> in less than 60 seconds. The Bearer Token needs to be
        included in all API requests made to the API Service in the following
        form: <div id="auth-example">Authorization: Bearer
        [YOUR_TOKEN]</div><div id="auth-reminder"><div
        id="edge-green"></div><div id="auth-reminder-text">You must replace
        [YOUR_TOKEN] with your personal API key.</div></div>

````