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

# List the claims on this account

> Newest first, every state included — a claim is never deleted, so the list is the account's history. Narrow it to one domain with `domainId`.



## OpenAPI

````yaml /openapi.json get /api/claims/
openapi: 3.1.0
info:
  title: ownsi API
  description: >-
    Prove ownership of a domain with a TXT record, and read a zone before anyone
    signs in.


    Two surfaces, and they behave differently on purpose:


    - `GET /api/zones/:name` is public. It streams what DNS answers, in the
    order DNS answers it,
      and writes nothing. No account, no key.
    - Everything under `/api/domains`, `/api/claims` and `/api/verifications`
    belongs to an
      account and needs a session cookie.

    A lookup that failed never carries records, and a claim that has not been
    checked never carries a

    diagnosis: both are tagged unions, so the shape tells you which case you are
    in. Errors are always

    `{ error: { code, message, docsUrl } }` with a stable `code`.
  version: 0.1.0
servers:
  - url: https://ownsi.dev
    description: The origin the front end and the API share
security: []
tags:
  - name: Zones
    description: >-
      Reading a zone the way a visitor sees it: the delegation first, so the
      provider can be named, then how long publishing is likely to take. Public,
      rate limited per IP.
  - name: Domains
    description: >-
      A name on an account, and nothing else — no status, no token. It is what a
      claim is opened against. Session required.
  - name: Claims
    description: >-
      The episode: one token, one seven-day window, one outcome. A claim is
      never reopened, so the list of them is the account's history. Session
      required.
  - name: Events
    description: >-
      One stream per open tab, telling an account's screens what moved. It
      carries no state: a message names the resource, the client reads it back.
      Session required.
  - name: Proof
    description: >-
      A proved claim, shared. A link carries its own slug — never the DNS token
      — and resolves for seven days at `/p/:slug`, where the page states one
      moment and reads no DNS. Session required to publish one.
  - name: Verifications
    description: >-
      The process behind a claim: the runs it has made, the named diagnosis of
      the last one, and when the next lands. Session required.
paths:
  /api/claims/:
    get:
      tags:
        - Claims
      summary: List the claims on this account
      description: >-
        Newest first, every state included — a claim is never deleted, so the
        list is the account's history. Narrow it to one domain with `domainId`.
      operationId: getApiClaims
      parameters:
        - name: domainId
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                required:
                  - claims
                properties:
                  claims:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - domainId
                        - domain
                        - unicodeDomain
                        - state
                        - token
                        - records
                        - verificationId
                        - expiresAt
                        - endedAt
                        - createdAt
                      properties:
                        id:
                          type: string
                        domainId:
                          type: string
                        domain:
                          type: string
                        unicodeDomain:
                          type: string
                        state:
                          default: pending
                          type: string
                          enum:
                            - pending
                            - proved
                            - expired
                            - canceled
                        token:
                          type: string
                        records:
                          type: array
                          items:
                            type: object
                            required:
                              - host
                              - name
                              - type
                              - value
                            properties:
                              host:
                                type: string
                              name:
                                type: string
                              type:
                                const: TXT
                                type: string
                              value:
                                type: string
                        verificationId:
                          anyOf:
                            - type: string
                            - type: 'null'
                        expiresAt:
                          type: string
                        endedAt:
                          anyOf:
                            - type: string
                            - type: 'null'
                        createdAt:
                          type: string
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - docsUrl
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      docsUrl:
                        type: string

````