API Models
On this page you can find a detailed description of API requests and responses.
Session
SessionSettings
Response
This model describes the response of a session settings request.
type SessionSettings = {
language: string;
project: SessionSettingsProject;
code: SessionSettingsCode;
challenge: SessionSettingsChallenge;
}
type SessionSettingsProject = {
name: string;
}
type SessionSettingsCode = {
length: number;
digits: boolean;
letters: boolean;
}
type SessionSettingsChallenge = {
enabled: boolean;
api_key: string|null;
provider: ChallengeProvider,
}
type SessionSettings struct {
Language string `json:"language"`
Project SessionSettingsProject `json:"project"`
Code SessionSettingsCode `json:"code"`
Challenge SessionSettingsChallenge `json:"challenge"`
}
type SessionSettingsProject struct {
Name string `json:"name"`
}
type SessionSettingsCode struct {
Length uint8 `json:"length"`
Digits bool `json:"digits"`
Letters bool `json:"letters"`
}
type SessionSettingsChallenge struct {
Enabled bool `json:"enabled"`
ApiKey *string `json:"api_key"`
Provider ChallengeProvider `json:"provider"`
}
#[derive(serde::Deserialize)]
pub struct SessionSettings<'a> {
pub language: &'a str,
pub project: SessionSettingsProject<'a>,
pub code: SessionSettingsCode,
pub challenge: SessionSettingsChallenge<'a>,
}
#[derive(serde::Deserialize)]
pub struct SessionSettingsProject<'a> {
pub name: &'a str,
}
#[derive(serde::Deserialize)]
pub struct SessionSettingsCode {
pub length: u8,
pub digits: bool,
pub letters: bool,
}
#[derive(serde::Deserialize)]
pub struct SessionSettingsChallenge<'a> {
pub enabled: bool,
pub api_key: Option<&'a str>,
pub provider: ChallengeProvider,
}
SessionChannel
Response
The model describes the response of a session channels request.
SessionCreate
Request
The model describes request body of session create request.
Response
The model describes response of session create request.
SessionSend
Request
The model describes request body of session send request.
Response
The model describes response of session create request.
SessionCheck
Request
The model describes request body of session check request.
Response
The model describes response of session check request.
SessionVerify
Request
The model describes request body of session verify request.
Response
The model describes response of session verify request.
Manual
ManualChannel
Response
The model describes response of manual channels request.
ManualSend
Request
The model describes body of manual send request.
Response
The model describes response of manual send request.
ManualMessage
Response
The model describes response of manual send request.