Yazsana Customer API (1.2.0)

Download OpenAPI specification:

Customer API (API key based auth). Use x-api-key on every request. Optionally send x-org-id to run requests under organization context.

Users

Get current API user

header Parameters
x-api-key
required
string
Example: {{API_KEY}}

API key of the customer user

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

List organizations for API user

Use this endpoint to discover allowed x-org-id values.

header Parameters
x-api-key
required
string
Example: {{API_KEY}}

API key of the customer user

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ]
}

Services

List active services with final prices

Returns selectable services for SMS sending. unitPrice is the final effective price after all pricing rules.

header Parameters
x-api-key
required
string
Example: {{API_KEY}}

API key of the customer user

x-org-id
string <uuid>
Example: {{ORG_ID}}

Optional organization context. Must belong to API key owner.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Sms Sendings

Send single SMS

Without x-org-id it charges user credit. With x-org-id it charges organization member credit.

header Parameters
x-api-key
required
string
Example: {{API_KEY}}

API key of the customer user

x-org-id
string <uuid>
Example: {{ORG_ID}}

Optional organization context. Must belong to API key owner.

Request Body schema: application/json
required
to
required
string

Phone number in 905xx... format

message
required
string <= 160 characters
serviceId
required
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "to": "905550000000",
  • "message": "Your confirmation code is: 123456",
  • "serviceId": "bb59f6f7-dc35-47c9-8874-673ad4f70518"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": "f688348d-2d9b-4568-a17e-b96e6b5c1475"
}

List SMS sendings

query Parameters
page
integer >= 0
Default: 0
limit
integer >= 1
Default: 10
Example: limit=20
startDate
string <date-time>
Example: startDate=2026-03-01T00:00:00Z
endDate
string <date-time>
Example: endDate=2026-03-10T23:59:59Z
completed
boolean
text
string
Example: text=confirmation
source
string
Enum: "api" "panel"
Example: source=api
header Parameters
x-api-key
required
string
Example: {{API_KEY}}

API key of the customer user

x-org-id
string <uuid>
Example: {{ORG_ID}}

Optional organization context. Must belong to API key owner.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Send bulk SMS

Sends same message to multiple phone numbers.

header Parameters
x-api-key
required
string
Example: {{API_KEY}}

API key of the customer user

x-org-id
string <uuid>
Example: {{ORG_ID}}

Optional organization context. Must belong to API key owner.

Request Body schema: application/json
required
to
required
Array of strings
message
required
string <= 160 characters
serviceId
required
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "to": [
    ],
  • "message": "Campaign is live. Visit now.",
  • "serviceId": "bb59f6f7-dc35-47c9-8874-673ad4f70518"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": "410bc79f-f751-46b9-9b93-ceb3fdcea049"
}

List SMS messages by sending

path Parameters
id
required
string <uuid>
Example: cebbe29a-e9e3-42f0-ad1b-12c99bca067d
query Parameters
page
integer >= 0
Default: 0
limit
integer >= 1
Default: 10
Example: limit=100
text
string
Example: text=confirmation
status
string
Enum: "pending" "sent" "not_sent" "waiting" "no_signal"
Example: status=pending
header Parameters
x-api-key
required
string
Example: {{API_KEY}}

API key of the customer user

x-org-id
string <uuid>
Example: {{ORG_ID}}

Optional organization context. Must belong to API key owner.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}