OpenAPI Türkçe gyrohosting.com ↗

SMS

SMS senders, quote and send.

#GET/sms/senders

List sms sendersScope: Sms/GetSmsSenderscoreGetSmsSendersOpenAPI for this operation

List sms senders.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/mesaj-gonderme).

Responses

200Success — data: array<object>
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422sms_api_disabled, sms_disabled

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/sms/senders' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro sms sender list
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/sms/senders", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/sms/senders", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/sms/quote

Quote smsScope: Sms/QuoteSmscoreQuoteSmsOpenAPI for this operation

Quote sms.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/mesaj-gonderme).

Request body

FieldTypeDescription
sender requiredstringGönderen başlığı. Hesabın etkin başlıklarından biri olmalıdır.
message requiredstringMesaj metni. Parça tavanını aşan metin kırpılır ve kırpıldığı bildirilir.
numbers requiredarray<any>Alıcı numaralar. Uluslararası biçimde; tek bir metin olarak gönderilirse satır, virgül ve noktalı virgülden bölünür.

Responses

200Success — data: object
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422message_required, numbers_required, sender_invalid, sms_api_disabled, sms_disabled

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/sms/quote' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sender": "string", "message": "string", "numbers": [null]}'
gyro sms quote --help    # all flags
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/sms/quote", headers=h, json={"sender": "string", "message": "string", "numbers": [None]}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/sms/quote", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"sender": "string", "message": "string", "numbers": [null]}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/sms/send

Send smsScope: Sms/SendSmscoreSendSmsOpenAPI for this operation

Send sms.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/mesaj-gonderme).

Request body

FieldTypeDescription
sender requiredstringGönderen başlığı. Hesabın etkin başlıklarından biri olmalıdır.
message requiredstringMesaj metni. Parça tavanını aşan metin kırpılır ve kırpıldığı bildirilir.
numbers requiredarray<any>Alıcı numaralar. Uluslararası biçimde; tek bir metin olarak gönderilirse satır, virgül ve noktalı virgülden bölünür.

Responses

200Success — data: object
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422insufficient_balance, no_recipients, price_unavailable, send_rejected, sender_invalid, sms_api_disabled, sms_disabled, sms_module_unavailable
500send_failed

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/sms/send' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sender": "string", "message": "string", "numbers": [null]}'
gyro sms send --help    # all flags
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/sms/send", headers=h, json={"sender": "string", "message": "string", "numbers": [None]}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/sms/send", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"sender": "string", "message": "string", "numbers": [null]}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/sms/messages

List sms messagesScope: Sms/GetSmsMessagescoreGetSmsMessagesOpenAPI for this operation

List sms messages.

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/mesaj-gonderme).

Parameters

FieldinTypeDescription
pagequeryintegerKaçıncı sayfa.
limitqueryintegerSayfa başına satır. En çok 100.

Responses

200Success — data: array<object>
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
422sms_api_disabled, sms_disabled

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/sms/messages' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro sms message list
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/sms/messages", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/sms/messages", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/sms/messages/{id}

Get sms message (path: {id})Scope: Sms/GetSmsMessagecoreGetSmsMessageOpenAPI for this operation

Get sms message (path: {id}).

Core WISECP client endpoint (Turkish reference: https://dev.wisecp.com/tr/mesaj-gonderme).

Parameters

FieldinTypeDescription
id requiredpathinteger

Responses

200Success — data: object
401Missing, invalid or revoked key
403Key lacks the scope, IP not allowed, or feature disabled
404not_found
422sms_api_disabled, sms_disabled

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/sms/messages/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro sms message get 12345
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/sms/messages/12345", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/sms/messages/12345", {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);