OpenAPI English gyrohosting.com ↗
Markdown olarak görClaude'da aç ↗

SMS

SMS başlıkları, teklif ve gönderim.

#GET/sms/senders

Başlıkları ListelemeKapsam: Sms/GetSmsSenderscoreGetSmsSendersBu işlemin OpenAPI parçası

Gönderimde kullanılabilecek başlıkları ve ülke kayıtlarını döndürür. — anahtarın sahibi

Yanıtlar

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

Örnekler

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

Fiyat AlmaKapsam: Sms/QuoteSmscoreQuoteSmsBu işlemin OpenAPI parçası

Gönderimin ne kadar tutacağını ve neyin eleneceğini söyler. — gönderim yok

İstek gövdesi

AlanTürAçıklama
sender zorunlustringGönderen başlığı. Hesabın etkin başlıklarından biri olmalıdır.
message zorunlustringMesaj metni. Parça tavanını aşan metin kırpılır ve kırpıldığı bildirilir.
numbers zorunluarray<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.

Yanıtlar

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

Örnekler

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    # tüm seçenekler
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

Toplu GönderimKapsam: Sms/SendSmscoreSendSmsBu işlemin OpenAPI parçası

Mesajı gönderir ve tutarı cüzdandan keser. — cüzdandan keser

İstek gövdesi

AlanTürAçıklama
sender zorunlustringGönderen başlığı. Hesabın etkin başlıklarından biri olmalıdır.
message zorunlustringMesaj metni. Parça tavanını aşan metin kırpılır ve kırpıldığı bildirilir.
numbers zorunluarray<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.

Yanıtlar

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

Örnekler

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    # tüm seçenekler
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

Gönderim GeçmişiKapsam: Sms/GetSmsMessagescoreGetSmsMessagesBu işlemin OpenAPI parçası

Yapılmış gönderimleri en yeniden başlayarak döndürür. — anahtarın sahibi

Parametreler

AlaninTürAçıklama
pagequeryintegerKaçıncı sayfa.
limitqueryintegerSayfa başına satır. En çok 100.

Yanıtlar

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

Örnekler

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}

Tek Gönderimi OkumaKapsam: Sms/GetSmsMessagecoreGetSmsMessageBu işlemin OpenAPI parçası

Bir gönderimi alıcı numaralarıyla birlikte döndürür. — anahtarın sahibi

Parametreler

AlaninTürAçıklama
id zorunlupathinteger

Yanıtlar

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

Örnekler

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}`);