Skip to main content
POST
/
v1
/
session
/
phone
/
{phone}
Create session by phone
curl --request POST \
  --url http://localhost:3000/v1/session/phone/{phone} \
  --header 'Content-Type: application/json' \
  --header 'X-Bunker-Token: <api-key>' \
  --data '
{
  "expiration": "3d",
  "clientip": "<string>",
  "x-forwarded-for": "<string>"
}
'
{
  "status": "ok",
  "session": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

X-Bunker-Token
string
header
required

Root access token for Databunker API

Path Parameters

phone
string
required

User phone number

Body

expiration
string

Session TTL (e.g., '3d', '2h', '30m')

Example:

"3d"

clientip
string

Client IP address

x-forwarded-for
string

X-Forwarded-For header value

Response

Session created successfully

status
enum<string>
required
Available options:
ok
Example:

"ok"

session
string<uuid>