API reference

Auth

Dashboard sessions.

Sign up#

POST/v1/auth/signup

Creates a user and an agency account, and starts a dashboard session (cookie).

Auth
Public, no credentials
Operation id
post_auth_signup

Request body application/json required

FieldTypeDescription
emailrequiredstring (email)
pattern: ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$max length: 254
passwordrequiredstring
length: 12–200
namerequiredstring
length: 1–100
accountNamerequiredstring
length: 2–100
Example request body
{
  "email": "owner@example.uz",
  "password": "a-long-passphrase-123",
  "name": "Aziz Karimov",
  "accountName": "Sky Travel"
}

Code samples

curl -X POST 'https://api.1fly.uz/v1/auth/signup' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "owner@example.uz",
  "password": "a-long-passphrase-123",
  "name": "Aziz Karimov",
  "accountName": "Sky Travel"
}'

Responses

201Signed up.
Example response
{}
409E-mail already registered.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}

Log in#

POST/v1/auth/login

Starts a dashboard session (cookie). Rate limited per e-mail and IP.

Auth
Public, no credentials
Operation id
post_auth_login

Request body application/json required

FieldTypeDescription
emailrequiredstring (email)
pattern: ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$max length: 254
passwordrequiredstring
length: 1–200
Example request body
{
  "email": "owner@example.uz",
  "password": "…"
}

Code samples

curl -X POST 'https://api.1fly.uz/v1/auth/login' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "owner@example.uz",
  "password": "…"
}'

Responses

200Logged in.
Example response
{}
401Wrong e-mail or password.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}

Log out#

POST/v1/auth/logout

Ends the session.

Auth
Session (Cookie onefly_session)
Operation id
post_auth_logout

Code samples

curl -X POST 'https://api.1fly.uz/v1/auth/logout' \
  -b 'onefly_session=<session cookie>'

Responses

204Logged out.

No body.

401Missing or invalid credentials.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}

Current user#

GET/v1/auth/me

User, active account and all accounts the user belongs to.

Auth
Session (Cookie onefly_session)
Operation id
get_auth_me

Code samples

curl 'https://api.1fly.uz/v1/auth/me' \
  -b 'onefly_session=<session cookie>'

Responses

200Me.
Example response
{}
401Missing or invalid credentials.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}

Switch active account#

POST/v1/auth/switch-account

For users in more than one account.

Auth
Session (Cookie onefly_session)
Operation id
post_auth_switch_account

Request body application/json required

FieldTypeDescription
accountIdrequiredstring
pattern: ^acc_[a-f0-9]{32}$
Request body (generated from schema)
{
  "accountId": "acc_abcdef0123456789abcdef0123456789"
}

Code samples

curl -X POST 'https://api.1fly.uz/v1/auth/switch-account' \
  -b 'onefly_session=<session cookie>' \
  -H 'Content-Type: application/json' \
  -d '{
  "accountId": "acc_abcdef0123456789abcdef0123456789"
}'

Responses

200Me.
Example response
{}
401Missing or invalid credentials.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
500Unexpected error on our side; quote the requestId.
FieldTypeDescription
errorrequiredobject
code (in error)requiredstring

Stable machine-readable code, e.g. VALIDATION_FAILED.

message (in error)requiredstring

Human-readable explanation.

requestId (in error)requiredstring

Quote this to support; also in the x-request-id header and the request log.

issues (in error)array<object>

Present for VALIDATION_FAILED: one entry per problem.

path (in error.issues)string
Example: passengers.0.lastName
code (in error.issues)string
message (in error.issues)string
Response (generated from schema)
{
  "error": {
    "code": "string",
    "message": "string",
    "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c",
    "issues": [
      {
        "path": "passengers.0.lastName",
        "code": "string",
        "message": "string"
      }
    ]
  }
}
API version v0.0.1 · Spec generated from source on 2026-11-22Changelog · Prices in so‘m (UZS)