Cayra Mobile Invite API

The Mobile Invite API from Cayra — 4 operation(s) for mobile invite.

Operations 4

POST /api/v1/auth/invite Create invite token (admin) #
POST /api/v1/auth/invite/qr-allocate Auto-allocate test user invite (public QR endpoint) #
GET /api/v1/auth/invite/{token} Resolve and consume invite token (public) #
PATCH /api/v1/auth/invite/mark-used Mark pool user as logged_in (public) #

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-mobile-invite-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-mobile-invite-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cayra License Server Mobile Invite 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: Mobile Invite
paths:
  /api/v1/auth/invite:
    post:
      tags:
      - Mobile Invite
      summary: Create invite token (admin)
      description: 'Admin endpoint: create a deferred deep-link invite token for a specific user.


        Stores {url, phone, otp} under a short-lived token.

        Mobile app resolves it via GET /api/v1/auth/invite/{token}.


        Requires X-Admin-API-Key header.'
      operationId: create_invite_api_v1_auth_invite_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/InviteCreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/invite/qr-allocate:
    post:
      tags:
      - Mobile Invite
      summary: Auto-allocate test user invite (public QR endpoint)
      description: 'Public endpoint called by the fixed QR landing page.


        Automatically picks the next available test user from the pool

        (+900000000002 … +900000000201), creates an invite token, and returns

        the deep-link URL.


        Rate limited to 5 requests per IP per minute to prevent pool exhaustion.'
      operationId: qr_allocate_invite_api_v1_auth_invite_qr_allocate_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteCreateResponse'
  /api/v1/auth/invite/{token}:
    get:
      tags:
      - Mobile Invite
      summary: Resolve and consume invite token (public)
      description: 'Public endpoint called by the mobile app after catching the deep link.


        Returns {url, phone, otp} and immediately deletes the token (single-use).

        Returns 404 if the token does not exist or has expired.'
      operationId: resolve_invite_api_v1_auth_invite__token__get
      parameters:
      - name: token
        in: path
        required: true
        schema:
          type: string
          title: Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteResolveResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/invite/mark-used:
    patch:
      tags:
      - Mobile Invite
      summary: Mark pool user as logged_in (public)
      description: 'Public endpoint called by the mobile app after a successful OTP login.


        Marks the phone number as logged_in in the test pool so it won''t be

        re-assigned to another QR scan.'
      operationId: mark_invite_used_api_v1_auth_invite_mark_used_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkUsedRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InviteCreateRequest:
      properties:
        url:
          type: string
          title: Url
          description: Target Cayra instance URL, e.g. https://company.cayra.io
        phone:
          type: string
          title: Phone
          description: User phone number in E.164 format
        otp:
          type: string
          maxLength: 6
          minLength: 6
          title: Otp
          description: 6-digit OTP code
      type: object
      required:
      - url
      - phone
      - otp
      title: InviteCreateRequest
    MarkUsedRequest:
      properties:
        phone:
          type: string
          title: Phone
          description: Phone number to mark as logged_in
      type: object
      required:
      - phone
      title: MarkUsedRequest
    InviteCreateResponse:
      properties:
        token:
          type: string
          title: Token
        invite_url:
          type: string
          title: Invite Url
      type: object
      required:
      - token
      - invite_url
      title: InviteCreateResponse
    InviteResolveResponse:
      properties:
        url:
          type: string
          title: Url
        phone:
          type: string
          title: Phone
        otp:
          type: string
          title: Otp
      type: object
      required:
      - url
      - phone
      - otp
      title: InviteResolveResponse
    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