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

# Submit a sealed record

> Queues a record sealed by the SDK. The relayer checks the envelope signature against `owner` before queueing.



## OpenAPI

````yaml /openapi.json post /v1/records
openapi: 3.1.0
info:
  title: Arkognito relayer API
  version: arkognito-relayer/1
  description: >-
    HTTP API of an Arkognito relayer and, when it runs with ISSUER=on, the
    blind-token issuer. All bodies are JSON unless noted. CORS is open. Relayers
    do not log request IPs or bodies.
  license:
    name: MIT
    url: https://github.com/soumyacodes007/Arkognito/blob/main/LICENSE
servers:
  - url: https://relay-1.example.com
    description: Your relayer
  - url: http://localhost:8787
    description: Local relayer
security: []
tags:
  - name: Relayer
    description: Submit records and follow their status.
  - name: Issuer
    description: Daily issuer keys and blind token issuance (relayers with ISSUER=on).
  - name: Operations
    description: Health and Oblivious HTTP.
paths:
  /v1/records:
    post:
      tags:
        - Relayer
      summary: Submit a sealed record
      description: >-
        Queues a record sealed by the SDK. The relayer checks the envelope
        signature against `owner` before queueing.
      operationId: submitRecord
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
      responses:
        '202':
          description: Queued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          description: Tokens are required and none was sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Token rejected: invalid, already spent, from a day no longer
            accepted, or no issuer key on Arkiv
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Body over 64 KB
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit (tokens off only)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Queue is full; try another relayer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - app
        - owner
        - envelope
        - attributes
        - expSeconds
      properties:
        app:
          type: string
        owner:
          $ref: '#/components/schemas/Address'
          description: The record's one-time owner.
        envelope:
          type: string
          description: >-
            Sealed envelope JSON, padded to exactly 512, 1024, 4096 or 16384
            bytes.
        attributes:
          type: object
          description: >-
            Attribute name to typed value. Names are lowercase; must include
            project and vtag; at most 32.
          additionalProperties:
            $ref: '#/components/schemas/WireValue'
        expSeconds:
          type: integer
          enum:
            - 3600
            - 86400
            - 604800
            - 2592000
            - 7776000
        token:
          $ref: '#/components/schemas/TokenRedemption'
        minAnonymity:
          type: integer
          minimum: 1
          description: Smallest batch this record may be written in.
        maxHoldMs:
          type: integer
          minimum: 1
          description: How long the relayer may hold the record for minAnonymity.
    SubmitResponse:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    Address:
      type: string
      pattern: ^0x[0-9a-fA-F]{40}$
      examples:
        - '0x1111111111111111111111111111111111111111'
    WireValue:
      type: object
      required:
        - type
        - value
      properties:
        type:
          type: string
          enum:
            - str
            - i32
            - u64
            - u256
            - dec
            - bool
            - addr
            - key
            - bytes32
        value:
          oneOf:
            - type: string
            - type: number
            - type: boolean
          description: u64 and u256 values are decimal strings.
    TokenRedemption:
      type: object
      required:
        - epoch
        - nonce
        - signature
      properties:
        epoch:
          type: integer
          description: UTC day of the issuer key that signed the token.
        nonce:
          $ref: '#/components/schemas/Hex'
          description: >-
            The prepared 64-byte token message (32 random bytes + 32-byte
            nonce). Its sha256 becomes the spent-list id.
        signature:
          type: string
          description: RSA blind signature over the prepared message, base64.
    Hex:
      type: string
      pattern: ^0x[0-9a-fA-F]*$
  responses:
    BadRequest:
      description: >-
        Invalid submission: owner not an address or equal to the relayer;
        envelope not padded to a bucket; expSeconds not a bucket or not equal to
        the envelope's; app mismatch; invalid or uppercase attribute name;
        project attribute missing; more than 32 attributes; minAnonymity or
        maxHoldMs out of range; envelope signature does not recover to owner;
        body not JSON.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

````

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