{
  "openapi": "3.0.3",
  "info": {
    "title": "SignCloud JSON API",
    "version": "2.0",
    "description": "Complete OpenAPI 3.0 specification based on SignCloud API v2.0 documentation."
  },
  "servers": [
    {
      "url": "https://{signcloudhost}/json/api",
      "variables": {
        "signcloudhost": {
          "default": "signcloud.demo.bit4id.org"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "AdminAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Administrative authorization key"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "msg": {
            "type": "string"
          },
          "code": {
            "type": "integer"
          },
          "details": {
            "type": "string"
          }
        },
        "required": [
          "msg",
          "code",
          "details"
        ]
      },
      "StandardResponse": {
        "type": "object",
        "properties": {
          "result": {
            "nullable": true
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Error"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "result",
          "error"
        ]
      }
    }
  },
  "paths": {
    "/create_token": {
      "post": {
        "tags": [
          "Administrative"
        ],
        "operationId": "create_token",
        "summary": "create_token",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdminAuth": []
          }
        ]
      }
    },
    "/delete_token": {
      "post": {
        "tags": [
          "Administrative"
        ],
        "operationId": "delete_token",
        "summary": "delete_token",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdminAuth": []
          }
        ]
      }
    },
    "/activate_token": {
      "post": {
        "tags": [
          "Administrative"
        ],
        "operationId": "activate_token",
        "summary": "activate_token",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdminAuth": []
          }
        ]
      }
    },
    "/deactivate_token": {
      "post": {
        "tags": [
          "Administrative"
        ],
        "operationId": "deactivate_token",
        "summary": "deactivate_token",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdminAuth": []
          }
        ]
      }
    },
    "/get_token": {
      "post": {
        "tags": [
          "Administrative"
        ],
        "operationId": "get_token",
        "summary": "get_token",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdminAuth": []
          }
        ]
      }
    },
    "/get_tokens": {
      "post": {
        "tags": [
          "Administrative"
        ],
        "operationId": "get_tokens",
        "summary": "get_tokens",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdminAuth": []
          }
        ]
      }
    },
    "/reset_pin": {
      "post": {
        "tags": [
          "Administrative"
        ],
        "operationId": "reset_pin",
        "summary": "reset_pin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdminAuth": []
          }
        ]
      }
    },
    "/reset_puk": {
      "post": {
        "tags": [
          "Administrative"
        ],
        "operationId": "reset_puk",
        "summary": "reset_puk",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AdminAuth": []
          }
        ]
      }
    },
    "/verify_pin": {
      "post": {
        "tags": [
          "User"
        ],
        "operationId": "verify_pin",
        "summary": "verify_pin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        }
      }
    },
    "/unlock_pin": {
      "post": {
        "tags": [
          "User"
        ],
        "operationId": "unlock_pin",
        "summary": "unlock_pin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        }
      }
    },
    "/change_pin": {
      "post": {
        "tags": [
          "User"
        ],
        "operationId": "change_pin",
        "summary": "change_pin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        }
      }
    },
    "/change_puk": {
      "post": {
        "tags": [
          "User"
        ],
        "operationId": "change_puk",
        "summary": "change_puk",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sign_rsa": {
      "post": {
        "tags": [
          "User"
        ],
        "operationId": "sign_rsa",
        "summary": "sign_rsa",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        }
      }
    },
    "/decrypt_rsa": {
      "post": {
        "tags": [
          "User"
        ],
        "operationId": "decrypt_rsa",
        "summary": "decrypt_rsa",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        }
      }
    },
    "/get_objects": {
      "post": {
        "tags": [
          "User"
        ],
        "operationId": "get_objects",
        "summary": "get_objects",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        }
      }
    },
    "/generate_rsa": {
      "post": {
        "tags": [
          "User"
        ],
        "operationId": "generate_rsa",
        "summary": "generate_rsa",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        }
      }
    },
    "/import_certificate": {
      "post": {
        "tags": [
          "User"
        ],
        "operationId": "import_certificate",
        "summary": "import_certificate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Standard SignCloud response wrapper",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        }
      }
    }
  }
}