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

# Crear Metadata

> Creates a new metadata field within the specified analysis model.

Metadata keys must be unique within the same model (case-insensitive).
The `grouping_field` flag determines if this field is used for grouping in dashboard views.

**Note:** Metadata can be added to models that already have call analyses.

**Requires scope:** `write:model-metadata`



## OpenAPI

````yaml POST /v1/models/{model_id}/metadata
openapi: 3.0.2
info:
  title: Neuracall API
  description: >-

    ## Overview


    The Neuracall API provides powerful call analysis capabilities for contact
    centers and customer service teams.

    Submit audio recordings and receive detailed analysis including:


    - **Transcription**: Accurate speech-to-text conversion

    - **Quality Scoring**: Automated evaluation against customizable criteria

    - **Insights & Keywords**: AI-extracted conversation highlights

    - **Statistics**: Aggregated performance metrics


    ## Authentication


    All API endpoints (except `/v1/auth`) require a Bearer token. Obtain your
    token using the Authentication endpoint with your client credentials.


    ```

    Authorization: Bearer <your_access_token>

    ```


    ## Support


    For questions or issues, contact support@neuracall.com
        
  contact:
    name: Neuracall Support
    url: https://neuracall.com/support
    email: support@neuracall.com
  license:
    name: Proprietary
    url: https://neuracall.com/license
  version: 1.0.0
servers: []
security: []
tags:
  - name: Authentication
    description: >-
      Obtain access tokens to authenticate your application. Required before
      making other API calls.
  - name: Analysis Models
    description: >-
      Manage analysis models that define evaluation criteria and scoring
      parameters for call analysis.
  - name: Model Categories
    description: >-
      Manage categories within analysis models. Categories group related
      evaluation variables and help organize the scoring structure.
  - name: Model Variables
    description: >-
      Manage evaluation variables within analysis models. Variables define
      specific scoring criteria used during call analysis.
  - name: Model Metadata
    description: >-
      Manage metadata fields within analysis models. Metadata defines additional
      information required when submitting calls for analysis (e.g., campaign,
      department).
  - name: Call Analysis
    description: >-
      Submit audio recordings for analysis and retrieve results including
      transcriptions, scores, and insights.
  - name: Statistics
    description: >-
      Retrieve aggregated statistics and performance metrics from analyzed calls
      for dashboards and reporting.
paths:
  /v1/models/{model_id}/metadata:
    post:
      tags:
        - Model Metadata
      summary: Create a new metadata field in an analysis model
      description: >-
        Creates a new metadata field within the specified analysis model.


        Metadata keys must be unique within the same model (case-insensitive).

        The `grouping_field` flag determines if this field is used for grouping
        in dashboard views.


        **Note:** Metadata can be added to models that already have call
        analyses.


        **Requires scope:** `write:model-metadata`
      operationId: Create_Model_Metadata_v1_models__model_id__metadata_post
      parameters:
        - description: The analysis model ID
          required: true
          schema:
            title: Model Id
            type: integer
            description: The analysis model ID
          name: model_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataResponse'
        '400':
          description: Metadata key already exists in model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Model not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    MetadataRequest:
      title: MetadataRequest
      required:
        - key
        - readable_name
        - type
      type: object
      properties:
        key:
          title: Key
          maxLength: 128
          minLength: 1
          type: string
          description: Unique identifier key for this metadata within the model
          example: campaign
        readable_name:
          title: Readable Name
          maxLength: 128
          minLength: 1
          type: string
          description: Human-readable display name for UI presentation
          example: Campaign Name
        type:
          allOf:
            - $ref: '#/components/schemas/MetadataType'
          description: >-
            Data type: STRING, INTEGER, DECIMAL, BOOLEAN, DATE, TIME, or
            DATETIME
        grouping_field:
          title: Grouping Field
          type: boolean
          description: Whether this field is used to group data in dashboard views
          default: false
          example: false
      description: Request body for creating or updating a metadata field.
      example:
        key: campaign
        readable_name: Campaign Name
        type: STRING
        grouping_field: true
    MetadataResponse:
      title: MetadataResponse
      required:
        - id
        - client_prompt_template_id
        - key
        - readable_name
        - type
        - grouping_field
        - enabled
        - created_at
        - created_by
      type: object
      properties:
        id:
          title: Id
          type: integer
          description: Unique identifier
          example: 1
        client_prompt_template_id:
          title: Client Prompt Template Id
          type: integer
          description: Parent model ID
          example: 1
        key:
          title: Key
          type: string
          description: Metadata key
          example: campaign
        readable_name:
          title: Readable Name
          type: string
          description: Human-readable display name
          example: Campaign Name
        type:
          allOf:
            - $ref: '#/components/schemas/MetadataType'
          description: Data type
        grouping_field:
          title: Grouping Field
          type: boolean
          description: Whether used for dashboard grouping
          example: false
        enabled:
          title: Enabled
          type: boolean
          description: Whether the metadata is active
        created_at:
          title: Created At
          type: string
          description: Creation timestamp
          format: date-time
        created_by:
          title: Created By
          type: string
          description: Creator identifier
        updated_at:
          title: Updated At
          type: string
          description: Last update timestamp
          format: date-time
        updated_by:
          title: Updated By
          type: string
          description: Last updater identifier
      description: Response model for metadata.
      example:
        id: 1
        client_prompt_template_id: 1
        key: campaign
        readable_name: Campaign Name
        type: STRING
        grouping_field: true
        enabled: true
        created_at: '2026-01-11T10:00:00Z'
        created_by: client_abc123
    ErrorResponse:
      title: ErrorResponse
      required:
        - code
        - message
      type: object
      properties:
        code:
          title: Code
          type: string
          description: Error code for programmatic handling
          example: 001-001-0001
        path:
          title: Path
          type: string
          description: Field path for validation errors
          example: body.external_id
        message:
          title: Message
          type: string
          description: Human-readable error message
          example: The requested resource was not found
      description: Standard error response format for API errors
      example:
        code: 001-001-0001
        message: The requested resource was not found
    MetadataType:
      title: MetadataType
      enum:
        - STRING
        - INTEGER
        - DECIMAL
        - BOOLEAN
        - DATE
        - TIME
        - DATETIME
      description: An enumeration.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````