Gửi tin SMS

API này giúp gửi tin nhắn SMS từ một brandname đã đăng ký

HTTP Request

URL: https://zns.api.gobysend.com/api/sms/send Method: POST Content Type: application/json Response Type: application/json

Example request

curl
-X POST
-H "Content-Type: application/json" -d '{
    "phone": "84987654321",
    "message": "Nội dung tin nhắn SMS",
    "tracking_id": "string"
}' "https://zns.api.gobysend.com/api/sms/send"

Tham số header

Tham số

Kiểu dữ liệu

Tính bắt buộc

Mô tả

string

yes

Đoạn mã cần truyền vào để xác minh quyền sử dụng API. Xem thêm tài liệu tham khảo

Cấu trúc body của request

Tham số

Kiểu dữ liệu

Tính bắt buộc

Mô tả

phone

string

yes

Số điện thoại của người nhận.

Lưu ý: SĐT phải được viết ở định dạng chuẩn hóa theo mã quốc gia. (VD: SĐT 0987654321 viết theo định dạng chuẩn hóa của Việt Nam là 84987654321)

message

string

yes

Nội dung tin nhắn SMS muốn gửi đi.

tracking_id

string

no

ID của bạn gắn với tin nhắn này dùng để lấy trạng thái gửi tin. Xem thêm API lấy trạng thái gửi tin nhắn.

Example response

{
    "error": 0,
    "message": "Success",
    "data": {
           "msg_id": "a4d0243feee163bd3af2"
    }
}

Cấu trúc thuộc tính data

Thuộc tính

Kiểu dữ liệu

Mô tả

msg_id

string

ID của tin nhắn SMS trên hệ thống Goby ZNS.

English version:

HTTP Request

URL: https://zns.api.gobysend.com/api/sms/send

Method: POST

Content Type: application/json

Response Type: application/json

Example request

curl
-X POST
-H "Content-Type: application/json" -d '{
    "phone": "84987654321",
    "message": "Nội dung tin nhắn SMS",
    "tracking_id": "string"
}' "https://zns.api.gobysend.com/api/sms/send"

Header param

Param

Data type

Compulsory

Description

string

yes

The code snippet should be transmitted to verify the API usage.

Reference document

Request body structure

Param

Data type

Compulsory

Description

phone

string

yes

Recipient phone number Note: Phone number must be written in normalized format of the country code

message

string

yes

The SMS messages you want to send.

tracking_id

string

yes

Your ID associated with this message is used to get the message status. See more at API get message delivery status.

Example response

{
    "error": 0,
    "message": "Success",
    "data": {
           "msg_id": "a4d0243feee163bd3af2"
    }
}

Data attribute structure

Attribute

Data type

Description

msg_id

string

ID of SMS messages on the GobyZNS system.

Last updated