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

# Submit a record anonymously

> Public-form submission with no credentials. Allowed only for a published app of this project whose audience is public and which allows anonymous submission.



## OpenAPI

````yaml /openapi/data-v1.json post /projects/{project}/entities/{entity}/records/anonymous
openapi: 3.1.2
info:
  title: HASP Data API
  version: '2026-07-12'
  description: >-
    The HASP Data API reads and writes the records of an app's entities. Each
    entity's fields are declared in the

    app's schema (`GET /projects/{project}/schema`); a record is those fields
    plus `id`, `created_at`, and `updated_at`.

    Two app-level endpoints serve the runtime SDK: `GET /bootstrap` and `GET
    /status`, addressed by `X-Hasp-AppId`.


    Authenticate with a project API key (`Authorization: Bearer
    hasp_pak_live_…`), a delegated agent credential

    (`Bearer hasp_agt_live_…`), or — from the app itself — the runtime session
    cookie. Reads of a public app may be

    anonymous with an `X-Hasp-AppId` header naming the app. See

    [Authentication](https://docs.usehasp.com/ai-api/authentication#data-api).


    Errors use the same envelope as the AI API: `{"success": false, "error":
    {"type", "code", "message", "param",

    "details", "retryable", "request_id"}, "meta": {"request_id"}}`.
servers:
  - url: https://{org}.usehasp.run/api/hasp/v1
    description: App runtime origin
    variables:
      org:
        default: your-org
        description: Your organization's runtime subdomain.
security:
  - projectApiKey: []
  - agentCredential: []
  - runtimeSession: []
paths:
  /projects/{project}/entities/{entity}/records/anonymous:
    post:
      tags:
        - Records
        - EntityRecord
      summary: Submit a record anonymously
      description: >-
        Public-form submission with no credentials. Allowed only for a published
        app of this project whose audience is public and which allows anonymous
        submission.
      operationId: v1.records.anonymous-submit
      parameters:
        - name: project
          in: path
          required: true
          description: The project's slug or id (ULID).
          schema:
            type: string
        - name: entity
          in: path
          required: true
          description: The entity slug
          schema:
            type: string
        - name: X-Hasp-AppId
          in: header
          required: true
          description: The id of the published app the form belongs to.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreEntityRecordRequest'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/EntityRecord'
                required:
                  - data
        '403':
          description: >-
            The caller does not reach this project, or its role lacks the
            capability this operation requires.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: '`NOT_FOUND`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: '`VALIDATION_FAILED`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '423':
          description: >-
            HASP has frozen the organization during an incident; requests are
            refused until it is unfrozen.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            Rate limit exceeded. Retry after the window indicated by
            `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security: []
components:
  schemas:
    StoreEntityRecordRequest:
      type: object
      properties:
        data:
          type: object
          description: >-
            Field values keyed by the entity's declared field keys. Unknown keys
            are dropped; values are validated against each field's type and
            constraints.
          x-hasp-entity-schema:
            operationRef: '#/paths/~1projects~1{project}~1schema/get'
            description: >-
              The entity's declared field keys, types, and constraints — the
              fields a record of the entity carries.
          additionalProperties: {}
      required:
        - data
      title: StoreEntityRecordRequest
    EntityRecord:
      type: object
      description: >-
        One record. Besides the system fields, it carries the entity's declared
        fields by key, typed per the entity schema. A `reference` field holds
        the id of a record of the referenced entity, in the same environment;
        the reference is checked when written, and is not cleared if the
        referenced record is later deleted — resolve it with a read and treat a
        404 as "no longer exists".
      x-hasp-entity-schema:
        operationRef: '#/paths/~1projects~1{project}~1schema/get'
        description: >-
          The entity's declared field keys, types, and constraints — the fields
          a record of the entity carries.
      properties:
        id:
          type: string
          description: Record id (ULID).
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - created_at
        - updated_at
      additionalProperties: {}
      title: EntityRecord
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            type:
              type: string
              description: The error category.
            code:
              type: string
              description: >-
                Stable machine-readable code; branch on this. See
                https://docs.usehasp.com/ai-api/reference/errors.
            message:
              type: string
            param:
              type:
                - string
                - 'null'
              description: The first input path at fault, when there is one.
            details:
              type:
                - object
                - 'null'
              description: >-
                Validation failures keyed by input path (`data.title`,
                `records.3.title`, `filter.age`).
              additionalProperties:
                type: array
                items:
                  type: string
            retryable:
              type: boolean
            request_id:
              type: string
          required:
            - type
            - code
            - message
            - retryable
            - request_id
        meta:
          type: object
          properties:
            request_id:
              type: string
          required:
            - request_id
      required:
        - success
        - error
        - meta
      title: ApiError
  securitySchemes:
    projectApiKey:
      type: http
      description: Project API key, for server-to-server access to one project.
      scheme: bearer
      bearerFormat: hasp_pak_{live|test}_…
    agentCredential:
      type: http
      description: Delegated agent credential, scoped by its authorization grants.
      scheme: bearer
      bearerFormat: hasp_agt_{live|test}_…
    runtimeSession:
      type: apiKey
      description: >-
        The signed-in user's session on the app runtime host; what the JS SDK
        uses.
      in: cookie
      name: hasp-runtime-session

````

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