zSign Cli Sessions API

The cli-sessions API from zSign — 5 operation(s) for cli-sessions.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 6

POST /api/webhooks/cli-session Acquire Cli Session #
DELETE /api/webhooks/cli-session Discard Cli Session #
GET /api/webhooks/cli-session/events Poll Cli Event #
POST /api/webhooks/cli-session/events/{event_id}/ack Ack Cli Event #
GET /api/webhooks/cli-session/events/{event_id} Get Replay Material #
POST /api/webhooks/cli-session/detach Detach Cli Session #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/zsign-io:zsign-io-cli-sessions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

zsign-io-cli-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: zSign Cli Sessions API
  description: Document Processing and Signing Sessions API
  version: 1.0.0
tags:
- name: cli-sessions
paths:
  /api/webhooks/cli-session:
    post:
      tags:
      - cli-sessions
      summary: Acquire Cli Session
      operationId: acquire_cli_session_api_webhooks_cli_session_post
      security:
      - HTTPBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CliSessionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CliSessionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - cli-sessions
      summary: Discard Cli Session
      operationId: discard_cli_session_api_webhooks_cli_session_delete
      security:
      - HTTPBearer: []
      parameters:
      - name: X-ZSign-Listener-Id
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Zsign-Listener-Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/webhooks/cli-session/events:
    get:
      tags:
      - cli-sessions
      summary: Poll Cli Event
      description: 'Long-poll for the oldest unacked event; 204 when none arrives in time.


        `async def` with every DB call in a threadpool, NOT a plain `def`: a sync

        route would occupy one of the threadpool''s workers for the whole wait,

        and -- worse -- hold its pooled DB connection the entire time. The engine

        is sized pool_size=5, max_overflow=10 (core/database.py), so fifteen

        simultaneous listeners would starve every other request in the process.

        Between polls the session is rolled back, which returns its connection to

        the pool and starts a fresh READ COMMITTED snapshot, so newly committed

        events actually become visible.'
      operationId: poll_cli_event_api_webhooks_cli_session_events_get
      security:
      - HTTPBearer: []
      parameters:
      - name: wait
        in: query
        required: false
        schema:
          type: integer
          maximum: 25
          minimum: 0
          default: 25
          title: Wait
      - name: X-ZSign-Listener-Id
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Zsign-Listener-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CliEventResponse'
        '204':
          description: No event within the wait window
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/webhooks/cli-session/events/{event_id}/ack:
    post:
      tags:
      - cli-sessions
      summary: Ack Cli Event
      operationId: ack_cli_event_api_webhooks_cli_session_events__event_id__ack_post
      security:
      - HTTPBearer: []
      parameters:
      - name: event_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Event Id
      - name: X-ZSign-Listener-Id
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Zsign-Listener-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/webhooks/cli-session/events/{event_id}:
    get:
      tags:
      - cli-sessions
      summary: Get Replay Material
      description: 'Owner-scoped, lease-free (spec §5).


        Every other listener route requires the lease; this one deliberately does

        not. `zsign replay` runs from a second terminal, often while a listener is

        still working, and must neither be refused nor take the session away from

        it. The API key is the authorization.'
      operationId: get_replay_material_api_webhooks_cli_session_events__event_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: event_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Event Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CliReplayResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/webhooks/cli-session/detach:
    post:
      tags:
      - cli-sessions
      summary: Detach Cli Session
      operationId: detach_cli_session_api_webhooks_cli_session_detach_post
      security:
      - HTTPBearer: []
      parameters:
      - name: X-ZSign-Listener-Id
        in: header
        required: false
        schema:
          type: string
          default: ''
          title: X-Zsign-Listener-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    CliReplayResponse:
      properties:
        event_id:
          type: string
          format: uuid
          title: Event Id
        type:
          type: string
          title: Type
        payload:
          additionalProperties: true
          type: object
          title: Payload
        secret:
          type: string
          title: Secret
        scheme_version:
          type: integer
          title: Scheme Version
        status:
          type: string
          title: Status
      type: object
      required:
      - event_id
      - type
      - payload
      - secret
      - scheme_version
      - status
      title: CliReplayResponse
    CliSessionRequest:
      properties:
        listener_id:
          type: string
          maxLength: 64
          minLength: 8
          pattern: ^[A-Za-z0-9_-]+$
          title: Listener Id
        listener_label:
          type: string
          maxLength: 64
          pattern: ^[A-Za-z0-9 ._-]*$
          title: Listener Label
          default: ''
        replace:
          type: boolean
          title: Replace
          default: false
      type: object
      required:
      - listener_id
      title: CliSessionRequest
    CliSessionResponse:
      properties:
        session_id:
          type: string
          format: uuid
          title: Session Id
        secret:
          type: string
          title: Secret
        scheme_version:
          type: integer
          title: Scheme Version
        lease_expires_at:
          type: string
          format: date-time
          title: Lease Expires At
        session_expires_at:
          type: string
          format: date-time
          title: Session Expires At
        rotated:
          type: boolean
          title: Rotated
        retry_delays:
          items:
            type: integer
          type: array
          title: Retry Delays
      type: object
      required:
      - session_id
      - secret
      - scheme_version
      - lease_expires_at
      - session_expires_at
      - rotated
      - retry_delays
      title: CliSessionResponse
    CliEventResponse:
      properties:
        event_id:
          type: string
          format: uuid
          title: Event Id
        type:
          type: string
          title: Type
        payload:
          additionalProperties: true
          type: object
          title: Payload
      type: object
      required:
      - event_id
      - type
      - payload
      title: CliEventResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer