Skip to main content

Historical contract: Generate Code

Historical API contract. This page describes an earlier API contract. Methods, paths, and responses may differ from the current API.

Historical meaning​

Generate Code

This API endpoint is use to generate a code

Current API​

For new integrations, use the linked current API reference or guide.

View the current API reference

Parameters​

[
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
},
{
"name": "language",
"in": "path",
"schema": {
"type": "string",
"default": "en"
},
"required": true
},
{
"name": "project",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-personal>"
},
"required": true
}
]

Request body​

{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"type",
"channel",
"size"
],
"properties": {
"type": {
"type": "integer",
"format": "int32"
},
"channel": {
"type": "integer",
"format": "int32"
},
"size": {
"type": "integer",
"format": "int32"
},
"send_data": {
"type": "string",
"format": "json"
},
"email": {
"type": "string"
},
"cellphone": {
"type": "integer",
"format": "int32"
},
"country_phone_code": {
"type": "integer",
"format": "int32"
},
"to": {
"type": "string"
}
}
}
}
}
}

Responses​

{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": [\n \"VERIFICATION_CODE_WAS_SENT_TO\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "VERIFICATION_CODE_WAS_SENT_TO"
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"Try get code in 19 seconds.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "Try get code in 19 seconds."
}
}
}
}
}
}
}
}