← All requests

POST /v1/customer/account/mobile/otp

Status
200
Duration
38.7 ms
Started (UTC)
2026-10-07 15:10:34.240
Route
/v1/customer/account/mobile/otp
Request ID
b2a74730-acd9-4cc0-aa70-9fb95c0d0736
Subject
customer:01a116ea-86a0-72d2-b7a5-8fc8297c73d0
IP
37.19.196.100
User agent
curl/8.7.1
Language
en
Queries
6 (20.8 ms)
Cache hit / miss
2 / 0

Timeline

cache +2.9 ms 1.1 ms
hit rec:session:9b718ccc023efa67f988b089724d44b73338e464a6b217c494dddf795ac3256a
cache +3.6 ms 0.4 ms
hit rec:subject:customer:01a116ea-86a0-72d2-b7a5-8fc8297c73d0
query +7.0 ms 5.2 ms
select `id`, `mobile`, `status`, `language`, `last_sign_in_at`, `disabled_reason`, `created_at`, `updated_at`, `deleted_at`, `name`, `email`, `avatar_file_id`, `gender`, `date_of_birth`, `terms_accepted_at` from `customers` where `customers`.`mobile` = '+966590909806'

Parameters

[
  "+966590909806"
]

0 rows

query +16.0 ms 0.8 ms
select `created_at` from `otp_codes` where (`otp_codes`.`namespace` = 'customer' and `otp_codes`.`purpose` = 'change_mobile' and `otp_codes`.`mobile` = '+966590909806') order by `otp_codes`.`created_at` desc limit 1

Parameters

[
  "customer",
  "change_mobile",
  "+966590909806",
  1
]

0 rows

query +17.0 ms 0.9 ms
select count(*), min(`created_at`) from `otp_codes` where (`otp_codes`.`mobile` = '+966590909806' and `otp_codes`.`created_at` > '2026-10-07 14:10:34.256')

Parameters

[
  "+966590909806",
  "2026-10-07 14:10:34.256"
]

1 rows

query +18.0 ms 2.7 ms
select count(*), min(`created_at`) from `otp_codes` where (`otp_codes`.`ip` = '37.19.196.100' and `otp_codes`.`created_at` > '2026-10-07 14:10:34.256')

Parameters

[
  "37.19.196.100",
  "2026-10-07 14:10:34.256"
]

1 rows

query +21.0 ms 0.5 ms
update `otp_codes` set `consumed_at` = '2026-10-07 15:10:34.256' where ((`otp_codes`.`namespace` = 'customer' and `otp_codes`.`purpose` = 'change_mobile' and `otp_codes`.`mobile` = '+966590909806') and `otp_codes`.`consumed_at` is null)

Parameters

[
  "2026-10-07 15:10:34.256",
  "customer",
  "change_mobile",
  "+966590909806"
]

0 rows

query +22.0 ms 10.8 ms
insert into `otp_codes` (`id`, `namespace`, `purpose`, `mobile`, `code_hash`, `attempts`, `ip`, `created_at`, `expires_at`, `consumed_at`) values ('01a116ea-9316-7426-9447-97e23cd995aa', 'customer', 'change_mobile', '+966590909806', 'ce3ad25eff0eff7dfb22f5adb53bb35468446c57c6676e9d31fb3a5e5af5c124', default, '37.19.196.100', '2026-10-07 15:10:34.256', '2026-10-07 15:11:34.256', default)

Parameters

[
  "01a116ea-9316-7426-9447-97e23cd995aa",
  "customer",
  "change_mobile",
  "+966590909806",
  "ce3ad25eff0eff7dfb22f5adb53bb35468446c57c6676e9d31fb3a5e5af5c124",
  "37.19.196.100",
  "2026-10-07 15:10:34.256",
  "2026-10-07 15:11:34.256"
]

1 rows

Request

Headers
{
  "host": "maqsed-api.dev-moltaqa.cloud",
  "user-agent": "curl/8.7.1",
  "content-length": "23",
  "accept": "*/*",
  "authorization": "********",
  "content-type": "application/json",
  "x-forwarded-for": "37.19.196.100",
  "x-forwarded-host": "maqsed-api.dev-moltaqa.cloud",
  "x-forwarded-port": "443",
  "x-forwarded-proto": "https",
  "x-forwarded-server": "2608fbae9cc2",
  "x-real-ip": "37.19.196.100",
  "accept-encoding": "gzip"
}
Query
{}
Body
{
  "mobile": "0590909806"
}

Response

Body
{
  "expiresAt": "2026-10-07T15:11:34.256Z",
  "resendAfterSeconds": 60
}