1Kosmos OTP API

The OTP API from 1Kosmos — 3 operation(s) for otp.

Business capability
Identity & Access Management BC-620.20

Operations 5

POST /api/r2/otp/verify Verify a T/OTP code #
POST /api/r2/otp/unlock Admin force unlock OTP #
POST /api/r2/otp/generate Request new OTP code #
POST /api/v3/rest/{communityname}/otpviasms Send OTP by SMS #
POST /api/v3/rest/{communityname}/otpviaemail Send OTP by Email, #

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/1kosmos:1kosmos-otp-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

1kosmos-otp-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Admin Console API Documentation OTP API
  description: API documentation for Admin Console
  contact:
    name: OneKosmos
    email: support@onekosmos.com
  license:
    name: Apache 2.0
    url: http://springdoc.org
  version: '1.0'
servers:
- url: https://blockid-trial.1kosmos.net
  description: Generated server url
security:
- ApiKeyAuth: []
tags:
- name: OTP
paths:
  /api/r2/otp/verify:
    post:
      tags:
      - OTP
      summary: Verify a T/OTP code
      description: 'Verify a T/OTP


        - >.'
      operationId: verifyOTPCode_1
      parameters:
      - name: publickey
        in: header
        description: Public key of the client
        required: true
        schema:
          type: string
      - name: licensekey
        in: header
        description: License key encrypted with ECDSA
        required: true
        schema:
          type: string
      - name: requestId
        in: header
        description: JSON string encrypted with ECDSA containing appid, uuid, and ts
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OtpVerifyRequest'
        required: true
      responses:
        '403':
          description: OTP locked for the user.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
        '410':
          description: OTP match found, but the validity time has expired.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
        '404':
          description: OTP is Invalid.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
        '409':
          description: OTP already used.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
  /api/r2/otp/unlock:
    post:
      tags:
      - OTP
      summary: Admin force unlock OTP
      description: 'Force unlock OTP for a user


        - >.'
      operationId: unlockOTP
      parameters:
      - name: publickey
        in: header
        description: Public key of the client
        required: true
        schema:
          type: string
      - name: licensekey
        in: header
        description: License key encrypted with ECDSA
        required: true
        schema:
          type: string
      - name: requestId
        in: header
        description: JSON string encrypted with ECDSA containing appid, uuid, and ts
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OTPRequestModel'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
  /api/r2/otp/generate:
    post:
      tags:
      - OTP
      summary: Request new OTP code
      description: 'Request generation of new OTP

        Requests are processed asynchronously

        This method will return a request id / messageId that can be used to track status of the request.

        - to request otp to be sent to any channel (sms, email, voice) a destination address must be provided.

        - if no destination address is provided, OTP is returned synchronously.

        - if any one destination is provided, OTP is scheduled for asnch generation / delivery.

        - new param returnOTP should be set to TRUE only if you expect otp code returned in api response.

        OTPs are meant to be delivered out-of-band. Please use this flag only if you have secured requesting client application properly.

        otpRequested: do not provide any value, this is strictly for internal use!'
      operationId: generateNewOTPCode_1
      parameters:
      - name: publickey
        in: header
        description: Public key of the client
        required: true
        schema:
          type: string
      - name: licensekey
        in: header
        description: License key encrypted with ECDSA
        required: true
        schema:
          type: string
      - name: requestId
        in: header
        description: JSON string encrypted with ECDSA containing appid, uuid, and ts
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OTPRequestModel'
        required: true
      responses:
        '403':
          description: OTP locked for the user.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
  /api/v3/rest/{communityname}/otpviasms:
    post:
      tags:
      - OTP
      summary: Send OTP by SMS
      operationId: otpviasms
      parameters:
      - name: communityname
        in: path
        required: true
        schema:
          type: string
      - name: publickey
        in: header
        description: Public key of the client
        required: true
        schema:
          type: string
      - name: licensekey
        in: header
        description: License key encrypted with ECDSA
        required: true
        schema:
          type: string
      - name: requestId
        in: header
        description: JSON string encrypted with ECDSA containing appid, uuid, and ts
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestModel'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: string
  /api/v3/rest/{communityname}/otpviaemail:
    post:
      tags:
      - OTP
      summary: Send OTP by Email,
      operationId: otpviaemail
      parameters:
      - name: communityname
        in: path
        required: true
        schema:
          type: string
      - name: publickey
        in: header
        description: Public key of the client
        required: true
        schema:
          type: string
      - name: licensekey
        in: header
        description: License key encrypted with ECDSA
        required: true
        schema:
          type: string
      - name: requestId
        in: header
        description: JSON string encrypted with ECDSA containing appid, uuid, and ts
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestModel'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: string
components:
  schemas:
    OTPRequestModel:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        tenantId:
          type: string
        communityId:
          type: string
        serviceName:
          type: string
        requestedAtMS:
          type: integer
          format: int64
        smsTo:
          type: string
        emailTo:
          type: string
        voiceTo:
          type: string
        fname:
          type: string
        lname:
          type: string
        voiceISDCode:
          type: string
        voiceCampaignId:
          type: string
        voiceCallTimeout:
          type: integer
          format: int32
        smsISDCode:
          type: string
        smsTemplateB64:
          type: string
        emailTemplateB64:
          type: string
        voiceTemplateB64:
          type: string
        ivrTemplateB64:
          type: string
        ivrSessionUrlB64:
          type: string
        ivrTo:
          type: string
        ivrISDCode:
          type: string
        emailFrom:
          type: string
        smsFrom:
          type: string
        voiceFrom:
          type: string
        emailSubject:
          type: string
        messageId:
          type: string
        smsTemplateId:
          type: string
        scheduledAtMS:
          type: integer
          format: int64
        requestLicenseLevel:
          type: string
        tenantName:
          type: string
        tenantDNS:
          type: string
        communityName:
          type: string
        trace:
          type: boolean
        gatewayGroupName:
          type: string
        requestId:
          type: string
        journeyId:
          type: string
        eventData:
          type: object
          additionalProperties: {}
        userId:
          type: string
        userPublicKey:
          type: string
        type:
          type: string
        validitySeconds:
          type: integer
          format: int32
        returnOTP:
          type: boolean
        otpRequested:
          type: string
        data:
          type: string
        isCycleTimeRequired:
          type: boolean
        idTS:
          type: integer
          format: int32
    OtpVerifyRequest:
      type: object
      properties:
        userId:
          type: string
        password:
          type: string
        code:
          type: string
        userPublicKey:
          type: string
        type:
          type: string
        tenantId:
          type: string
        communityId:
          type: string
        serviceName:
          type: string
        serviceNames:
          type: array
          items:
            type: string
        data:
          type: string
        eventData:
          type: object
          additionalProperties: {}
    BIDAccount:
      type: object
      properties:
        username:
          type: string
        uid:
          type: string
        authModuleId:
          type: string
        source:
          type: string
        communityId:
          type: string
        tenantId:
          type: string
        urn:
          type: string
        dguid:
          type: string
        otpSeed:
          type: string
    RequestModel:
      type: object
      properties:
        publicKey:
          type: string
        data:
          type: string
        did:
          type: string
        lon:
          type: string
        lat:
          type: string
        appid:
          type: string
        pushid:
          type: string
        ial:
          type: string
        os:
          type: string
        eventData:
          type: string
        ipfs_hash:
          type: string
        version:
          type: string
        account:
          $ref: '#/components/schemas/BIDAccount'
        userId:
          type: string
        smsTemplateId:
          type: string
        provider:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: licensekey
      in: header
x-provenance:
  method: harvested
  publisher: 1Kosmos
  source: https://blockid-trial.1kosmos.net/v3/api-docs
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)