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

# Add Record

> Create a new record for a content model with this API. It allows you to specify details like title, page slug (if the content model has 'act_as_web_page' enabled), version data, and relation fields.

Before calling this endpoint, make sure you’ve generated an API token and picked the correct domain. See [Authentication & Base URLs](/api-reference/authbaseurl).


## OpenAPI

````yaml POST /content/v2/content-models/{modelInternalName}/records
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://apis.experro.app
    description: Admin Server
  - url: https://{base-address}
    description: Custom Server
    variables:
      base-address:
        default: ''
        description: Enter your custom domain or server address.
security:
  - bearerAuth: []
paths:
  /content/v2/content-models/{modelInternalName}/records:
    post:
      description: >-
        Create a new record for a content model with this API. It allows you to
        specify details like title, page slug (if the content model has
        'act_as_web_page' enabled), version data, and relation fields.
      parameters:
        - $ref: '#/components/parameters/TenantIdHeader'
        - $ref: '#/components/parameters/WorkspaceIdHeader'
        - $ref: '#/components/parameters/EnvironmentIdHeader'
        - name: modelInternalName
          in: path
          required: true
          schema:
            type: string
          description: Specifies the internal name of the content model.
        - $ref: '#/components/parameters/LocaleQryPrm'
        - name: publish
          in: query
          schema:
            type: boolean
          description: >-
            Boolean flag to publish the record. Set to `true` to publish
            immediately upon creation.
        - name: environment_ids
          in: query
          schema:
            type: string
          description: Comma-separated environment IDs; required if publish is set to true.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: Specifies the title of the record.
                  example: My First Blog Post
                page_slug:
                  type: string
                  description: >-
                    Specifies the URL-friendly slug for the page. Required if
                    model is set to act as a web page.
                  example: my-first-blog-post
                description:
                  type: string
                  description: Provides a brief description of the record. (Optional)
                  example: An introduction to our new feature.
              required:
                - title
                - page_slug
      responses:
        '200':
          description: Content model record created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Status:
                    type: string
                  Data:
                    type: object
                    properties:
                      content_model_data_id:
                        type: string
                        format: uuid
                        description: New record’s unique ID.
                      version_id:
                        type: string
                        description: Version identifier for the created record.
                    required:
                      - content_model_data_id
                      - version_id
                required:
                  - Status
                  - Data
        '400':
          description: Bad Request – invalid body or missing `title`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Status:
                    type: string
                    example: failure
                  Data:
                    $ref: '#/components/schemas/Error404'
        '401':
          description: Unauthorized – Missing or invalid API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Status:
                    type: string
                    example: failure
                  Data:
                    $ref: '#/components/schemas/Error401'
        '500':
          description: Internal Server Error – an unexpected error on the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  Status:
                    type: string
                    example: failure
                  Data:
                    $ref: '#/components/schemas/Error500'
      servers:
        - url: https://apis.experro.app
          description: Admin Server
components:
  parameters:
    TenantIdHeader:
      name: x-tenant-id
      in: header
      required: true
      schema:
        type: string
      description: Identifier for the tenant. Ensures data isolation per tenant.
    WorkspaceIdHeader:
      name: x-workspace-id
      in: header
      required: true
      schema:
        type: string
      description: >-
        Workspace identifier within the tenant. Scopes resources to a specific
        workspace.
    EnvironmentIdHeader:
      name: x-environment-id
      in: header
      required: true
      schema:
        type: string
        example: PRODUCTION-15a0f8c2-a5e8-4e40-ae74-cb1389d22f45-w49jkngj
      description: >-
        Unique identifier of the target environment. Used to scope the API call
        to a specific deployment environment.
    LocaleQryPrm:
      name: locale
      in: query
      description: Specifies the language or region for the response data
      required: true
      schema:
        type: string
  schemas:
    Error404:
      type: object
      properties:
        Status:
          type: string
          example: failure
        Error:
          type: object
          properties:
            message:
              type: string
            name:
              type: string
            code:
              type: string
          required:
            - message
            - name
      required:
        - Status
        - Error
    Error401:
      type: object
      properties:
        Status:
          type: string
          example: failure
        Error:
          type: object
          properties:
            message:
              type: string
            name:
              type: string
            code:
              type: string
          required:
            - message
            - name
      required:
        - Status
        - Error
    Error500:
      type: object
      properties:
        Status:
          type: string
          example: failure
        Error:
          type: object
          properties:
            message:
              type: string
            name:
              type: string
            code:
              type: string
          required:
            - message
            - name
      required:
        - Status
        - Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````