To perform authorization you should subscribe request via http header X-API-TOKEN. If api token is invalid, api returns 401 http status code.
POST /resource HTTP/1.1
Host: test.com
User-Agent: curl/7.43.0
Accept: application/json
X-API-TOKEN: YOUR_TOKEN
Content-Length: 16
Content-Type: application/json
{
id: integer,
status: enum(not verified, verified)
}
Route: /verification Method: POST Body:
{«phone»: «+79999999999»}
Response:
- 201 Created
Response body:
{id: 123, status: «not verified»}
Route: /verification/{id} Route parametes:
- id: integer - Verification id
Method: PUT Body:
{
«status»: «verified»
}
Response:
- 200 Ok
- 404 Not found
Response body:
{id: 123, status: «not verified»}
Route: /verification/{id} Route parametes:
- id: integer - Verification id
Method: GET
Response:
- 200 Ok
- 404 Not found
Response body:
{id: 123, status: «verified»}