Cayra Agreements API

The agreements API from Cayra — 3 operation(s) for agreements.

Operations 6

POST /api/v1/admin/agreements Create Agreement #
GET /api/v1/admin/agreements List Agreements #
POST /api/v1/admin/agreements/versions Create Agreement Version #
GET /api/v1/admin/agreements/versions List Agreement Versions #
POST /api/v1/admin/agreements/acceptances Record Acceptance #
GET /api/v1/admin/agreements/acceptances List Acceptances #

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/cayra-io:cayra-io-agreements-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

cayra-io-agreements-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cayra License Server Agreements API
  description: '# Cayra Chat Agent - License Management Server


    Centralized license management for on-premise deployments.


    ## Features


    - 🔑 License key generation (installation, update, trial)

    - ⏰ Dynamic expiry management (extend/shorten licenses)

    - 🔄 Activation tracking and monitoring

    - 💓 Heartbeat mechanism (1-hour intervals)

    - 📊 Audit logging for compliance

    - 🔐 JWT tokens with RSA-4096 encryption


    ## API Categories


    ### Admin Endpoints (Requires API Key)

    Manage licenses, view activations, update expiry dates.


    ### Client Endpoints (Public)

    Activate licenses, send heartbeats, check status.


    ## Authentication


    Admin endpoints require API key in header:

    ```

    X-Admin-API-Key: your-admin-key-here

    ```


    ## Security


    - 🔒 RSA-4096 asymmetric encryption

    - 🔐 JWT tokens for offline validation

    - 📝 Complete audit trail

    - 🛡️ Rate limiting (Phase 6)'
  contact:
    name: Cayra AI Team
    email: support@cayra.ai
  license:
    name: Proprietary
  version: 1.0.0
tags:
- name: Agreements
paths:
  /api/v1/admin/agreements:
    post:
      tags:
      - Agreements
      summary: Create Agreement
      operationId: create_agreement_api_v1_admin_agreements_post
      parameters:
      - name: x-admin-api-key
        in: header
        required: false
        schema:
          type: string
          title: X-Admin-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgreementCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgreementResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Agreements
      summary: List Agreements
      operationId: list_agreements_api_v1_admin_agreements_get
      parameters:
      - name: category
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Category
      - name: search
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Search
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 50
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          default: 0
          title: Offset
      - name: x-admin-api-key
        in: header
        required: false
        schema:
          type: string
          title: X-Admin-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgreementListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/agreements/versions:
    post:
      tags:
      - Agreements
      summary: Create Agreement Version
      operationId: create_agreement_version_api_v1_admin_agreements_versions_post
      parameters:
      - name: x-admin-api-key
        in: header
        required: false
        schema:
          type: string
          title: X-Admin-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgreementVersionCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgreementVersionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Agreements
      summary: List Agreement Versions
      operationId: list_agreement_versions_api_v1_admin_agreements_versions_get
      parameters:
      - name: agreement_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Agreement Id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 50
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          default: 0
          title: Offset
      - name: x-admin-api-key
        in: header
        required: false
        schema:
          type: string
          title: X-Admin-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgreementVersionListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/admin/agreements/acceptances:
    post:
      tags:
      - Agreements
      summary: Record Acceptance
      operationId: record_acceptance_api_v1_admin_agreements_acceptances_post
      parameters:
      - name: x-admin-api-key
        in: header
        required: false
        schema:
          type: string
          title: X-Admin-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgreementAcceptanceRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgreementAcceptanceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Agreements
      summary: List Acceptances
      operationId: list_acceptances_api_v1_admin_agreements_acceptances_get
      parameters:
      - name: customer_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Customer Id
      - name: company_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Company Id
      - name: license_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: License Id
      - name: agreement_version_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Agreement Version Id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 50
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          default: 0
          title: Offset
      - name: x-admin-api-key
        in: header
        required: false
        schema:
          type: string
          title: X-Admin-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgreementAcceptanceListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AgreementAcceptanceRequest:
      properties:
        customer_id:
          type: string
          format: uuid
          title: Customer Id
          description: Customer who accepted
        company_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Company Id
          description: Optional company context
        license_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: License Id
          description: Optional license context
        agreement_version_id:
          type: string
          format: uuid
          title: Agreement Version Id
          description: Version being accepted
        accepted_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Accepted At
        accepted_ip:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Accepted Ip
        accepted_user_agent:
          anyOf:
          - type: string
          - type: 'null'
          title: Accepted User Agent
        accepted_locale:
          anyOf:
          - type: string
            maxLength: 16
          - type: 'null'
          title: Accepted Locale
        accepted_via:
          type: string
          maxLength: 64
          title: Accepted Via
          default: web
        evidence:
          type: object
          title: Evidence
      type: object
      required:
      - customer_id
      - agreement_version_id
      title: AgreementAcceptanceRequest
      description: Record acceptance from customer/company
    AgreementCategoryEnum:
      type: string
      enum:
      - kvkk
      - prepaid_terms
      - privacy
      - msa
      - custom
      title: AgreementCategoryEnum
    AgreementCreateRequest:
      properties:
        code:
          type: string
          maxLength: 64
          title: Code
        name:
          type: string
          maxLength: 255
          title: Name
        category:
          allOf:
          - $ref: '#/components/schemas/AgreementCategoryEnum'
          description: Agreement category
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
      type: object
      required:
      - code
      - name
      - category
      title: AgreementCreateRequest
      description: Create agreement template
    AgreementVersionResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        agreement_id:
          type: string
          format: uuid
          title: Agreement Id
        version_label:
          type: string
          title: Version Label
        effective_from:
          type: string
          format: date-time
          title: Effective From
        document_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Document Url
        document_hash:
          anyOf:
          - type: string
          - type: 'null'
          title: Document Hash
        content:
          anyOf:
          - type: string
          - type: 'null'
          title: Content
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
      - id
      - agreement_id
      - version_label
      - effective_from
      - document_url
      - document_hash
      - content
      - created_at
      title: AgreementVersionResponse
      description: Version representation
    AgreementAcceptanceResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        customer_id:
          type: string
          format: uuid
          title: Customer Id
        company_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Company Id
        license_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: License Id
        agreement_version_id:
          type: string
          format: uuid
          title: Agreement Version Id
        accepted_at:
          type: string
          format: date-time
          title: Accepted At
        accepted_ip:
          anyOf:
          - type: string
          - type: 'null'
          title: Accepted Ip
        accepted_user_agent:
          anyOf:
          - type: string
          - type: 'null'
          title: Accepted User Agent
        accepted_locale:
          anyOf:
          - type: string
          - type: 'null'
          title: Accepted Locale
        accepted_via:
          type: string
          title: Accepted Via
        evidence:
          type: object
          title: Evidence
      type: object
      required:
      - id
      - customer_id
      - company_id
      - license_id
      - agreement_version_id
      - accepted_at
      - accepted_ip
      - accepted_user_agent
      - accepted_locale
      - accepted_via
      - evidence
      title: AgreementAcceptanceResponse
      description: Acceptance record
    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
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    AgreementListResponse:
      properties:
        agreements:
          items:
            $ref: '#/components/schemas/AgreementResponse'
          type: array
          title: Agreements
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
      - agreements
      - total
      - limit
      - offset
      title: AgreementListResponse
      description: List agreements
    AgreementVersionListResponse:
      properties:
        versions:
          items:
            $ref: '#/components/schemas/AgreementVersionResponse'
          type: array
          title: Versions
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
      - versions
      - total
      - limit
      - offset
      title: AgreementVersionListResponse
      description: List versions for agreements
    AgreementResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        code:
          type: string
          title: Code
        name:
          type: string
          title: Name
        category:
          $ref: '#/components/schemas/AgreementCategoryEnum'
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
      - id
      - code
      - name
      - category
      - description
      - created_at
      title: AgreementResponse
      description: Agreement template representation
    AgreementAcceptanceListResponse:
      properties:
        acceptances:
          items:
            $ref: '#/components/schemas/AgreementAcceptanceResponse'
          type: array
          title: Acceptances
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
      - acceptances
      - total
      - limit
      - offset
      title: AgreementAcceptanceListResponse
      description: Paginated acceptances
    AgreementVersionCreateRequest:
      properties:
        agreement_id:
          type: string
          format: uuid
          title: Agreement Id
        version_label:
          type: string
          maxLength: 32
          title: Version Label
        effective_from:
          type: string
          format: date-time
          title: Effective From
        document_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Document Url
        document_hash:
          anyOf:
          - type: string
            maxLength: 128
          - type: 'null'
          title: Document Hash
        content:
          anyOf:
          - type: string
          - type: 'null'
          title: Content
      type: object
      required:
      - agreement_id
      - version_label
      - effective_from
      title: AgreementVersionCreateRequest
      description: Create new agreement version