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

# Claim company



## OpenAPI

````yaml /openapi.json post /v1/models/company/{id}/claim
openapi: 3.1.0
info:
  title: Ablo Sync Engine HTTP API
  version: 0.16.1
  description: >-
    The HTTP surface of the Ablo sync engine. Most production traffic flows over
    WebSocket via `@abloatai/ablo`; this HTTP API is the Vercel-safe transport
    for environments that cannot hold long-lived sockets, plus the control plane
    for capabilities and usage.


    The per-model resource routes (`/v1/models/{model}`) are **generated from
    your own pushed schema** — they are documented here generically over
    `{model}`, with `tasks` as the running example. Authenticate every request
    with a `Bearer` API key or scoped token.
servers:
  - url: https://api.abloatai.com/api
    description: Production
  - url: http://localhost:8787/api
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Records
    description: Typed CRUD over any model in your schema.
  - name: Coordination
    description: Claims — pessimistic row reservation for human+agent coordination.
  - name: State
    description: Atomic multi-model commits.
  - name: Control plane
    description: Capabilities and usage.
paths:
  /v1/models/company/{id}/claim:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Record id.
    post:
      tags:
        - Models
      summary: Claim company
      operationId: claim_company
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelClaimRequest'
      responses:
        '201':
          description: Claim acquired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelClaimResponse'
        '202':
          description: 'Queued behind the current holder (`queue: true`).'
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - claimId
                  - position
                properties:
                  status:
                    type: string
                    const: queued
                  claimId:
                    type: string
                  position:
                    type: integer
                  heldBy:
                    type: string
                  expiresAt:
                    type: integer
        '409':
          description: Held by another actor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ModelClaimRequest:
      type: object
      properties:
        reason:
          type: string
          description: Human-readable phase. Defaults to `editing`.
        description:
          type: string
          description: Peer-visible explanation of the work.
        meta:
          type: object
          additionalProperties: true
        ttl:
          oneOf:
            - type: string
              description: Duration such as `5m`.
            - type: integer
              description: Duration in milliseconds.
        queue:
          type: boolean
          description: Join the FIFO queue when another participant holds the row.
      x-generated: commit-inputs
    ModelClaimResponse:
      type: object
      required:
        - id
        - object
        - claim
      properties:
        id:
          type: string
        object:
          type: string
          const: claim
        claim:
          $ref: '#/components/schemas/ModelClaim'
      x-generated: commit-inputs
    Error:
      type: object
      required:
        - type
        - message
      description: >-
        Canonical error envelope. Every HTTP error response and every WebSocket
        frame error carries these fields.
      properties:
        type:
          type: string
          description: >-
            Coarse error class (e.g. `AbloValidationError`,
            `AbloPermissionError`).
        code:
          type: string
          description: Stable machine code for the specific error.
        param:
          type: string
          description: Offending model/field path, when parameter-specific.
        message:
          type: string
          description: Human-readable explanation.
        doc_url:
          type: string
          description: Link to the docs page for this code.
        request_id:
          type: string
          description: >-
            Request correlation id, echoed on the `x-request-id` response
            header.
      additionalProperties: true
    ModelClaim:
      type: object
      required:
        - id
        - actor
        - participantKind
        - reason
        - status
        - expiresAt
        - target
      properties:
        id:
          type: string
        actor:
          type: string
        participantKind:
          type: string
          enum:
            - user
            - agent
            - system
        reason:
          type: string
        description:
          type: string
        field:
          type: string
        status:
          type: string
          enum:
            - active
            - queued
        position:
          type: integer
        expiresAt:
          type: integer
        target:
          type: object
          required:
            - model
            - id
          properties:
            model:
              type: string
            id:
              type: string
            path:
              type: string
            field:
              type: string
            meta:
              type: object
              additionalProperties: true
      x-generated: commit-inputs
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key (`sk_live_…`) or a scoped capability/ephemeral token. The same
        header carries both — the server discriminates by token shape.

````