开发者文档
TextBoost SMS Contacts API helps you manage contacts that are identified by a unique random ID. Using this ID, you can create, view, update, or delete contacts. This API works as a collection of customer-specific contacts that allows you to group them and assign custom values that you can later use when sending SMS template messages.
The Contacts API uses HTTP verbs and a RESTful endpoint structure with an access key that is used as the API Authorization. Request and response payloads are formatted as JSON using UTF-8 encoding and URL encoded values.
API Endpoint
https://www.textboostsms.com/api/http/contacts
Parameter | Required | Description |
---|---|---|
Authorization |
Yes
|
When calling our API, send your api token with the
authentication type set asBearer
(Example:Authorization: Bearer {api_token} ) |
Accept |
Yes
|
Set toapplication/json |
Creates a new contact object. TextBoost SMS returns the created contact object with each request.
API Endpoint
https://www.textboostsms.com/api/v3/contacts/{group_id}/store
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groupsuid |
phone |
Yes
|
number | The phone number of the contact. |
first_name |
No
|
string | The first name of the contact. |
last_name |
No
|
string | The last name of the contact. |
curl-XPOSThttps://gosms.one/api/http/contacts/6065ecdc9184a/store \
-H'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY'\
-H'Content-Type: application/json'\
-H'Accept: application/json'\
-d'{"phone":"8801721970168"}'
Returns a contact object if the request was successful.
{
"status":"success",
"data":"contacts data with all details",
}
If the request failed, an error object will be returned.
{
"status":"error",
"message":"A human-readable description of the error."
}
Retrieves the information of an existing contact. You only need to supply the unique contact uid and group uid that was returned upon creation or receiving.
API Endpoint
https://www.textboostsms.com/api/v3/contacts/{group_id}/search/{uid}
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groupsuid |
uid |
Yes
|
string | Contactuid |
curl-XPOSThttps://gosms.one/api/http/contacts/6065ecdc9184a/search/606732aec8705 \
-H'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY'\
-H'Content-Type: application/json'\
-H'Accept: application/json'\
Returns a contact object if the request was successful.
{
"status":"success",
"data":"contacts data with all details",
}
If the request failed, an error object will be returned.
{
"status":"error",
"message":"A human-readable description of the error."
}
Updates an existing contact. You only need to supply the unique uid of contact and contact group uid that was returned upon creation.
API Endpoint
https://www.textboostsms.com/api/v3/contacts/{group_id}/update/{uid}
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groupsuid |
uid |
Yes
|
string | Contactuid |
phone |
Yes
|
number | The phone number of the contact. |
first_name |
No
|
string | The first name of the contact. |
last_name |
No
|
string | The last name of the contact. |
curl-XPATCHhttps://gosms.one/api/http/contacts/6065ecdc9184a/update/606732aec8705 \
-H'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY'\
-H'Content-Type: application/json'\
-H'Accept: application/json'\
-d'{"phone":"8801821475168"}'
Returns a contact object if the request was successful.
{
"status":"success",
"data":"contacts data with all details",
}
If the request failed, an error object will be returned.
{
"status":"error",
"message":"A human-readable description of the error."
}
Deletes an existing contact. You only need to supply the unique contact uid and group uid that was returned upon creation.
API Endpoint
https://www.textboostsms.com/api/v3/contacts/{group_id}/delete/{uid}
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groupsuid |
uid |
Yes
|
string | Contactuid |
curl-XDELETEhttps://gosms.one/api/http/contacts/6065ecdc9184a/delete/606732aec8705 \
-H'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY'\
-H'Content-Type: application/json'\
-H'Accept: application/json'\
Returns a contact object if the request was successful.
{
"status":"success",
"data":"contacts data with all details",
}
If the request failed, an error object will be returned.
{
"status":"error",
"message":"A human-readable description of the error."
}
API Endpoint
https://www.textboostsms.com/api/v3/contacts/{group_id}/all
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groupsuid |
curl-XPOSThttps://gosms.one/api/http/contacts/6065ecdc9184a/all \
-H'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY'\
-H'Content-Type: application/json'\
-H'Accept: application/json'\
Returns a contact object if the request was successful.
{
"status":"success",
"data":"contacts data with pagination",
}
If the request failed, an error object will be returned.
{
"status":"error",
"message":"A human-readable description of the error."
}
API Endpoint
https://www.textboostsms.com/api/http/contacts
Parameter | Required | Description |
---|---|---|
Authorization |
Yes
|
When calling our API, send your api token with the
authentication type set as Bearer (Example:
Authorization: Bearer {api_token} ) |
Accept |
Yes
|
Set to application/json |
Creates a new group object. TextBoost SMS returns the created group object with each request.
API Endpoint
https://www.textboostsms.com/api/v3/contacts
Parameter | Required | Type | Description |
---|---|---|---|
name |
Yes
|
string | The name of the group |
curl -X POST https://gosms.one/api/http/contacts \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"name":"Codeglen"}'
Returns a contact object if the request was successful.
{
"status": "success",
"data": "group data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
Retrieves the information of an existing group. You only need to supply the unique group ID that was returned upon creation or receiving.
API Endpoint
https://www.textboostsms.com/api/v3/contacts/{group_id}/show/
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groups uid |
curl -X POST https://gosms.one/api/http/contacts/6065ecdc9184a/show \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "group data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
Updates an existing group. You only need to supply the unique ID that was returned upon creation.
API Endpoint
https://www.textboostsms.com/api/v3/contacts/{group_id}
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groups uid |
name |
Yes
|
string | New group name |
curl -X PATCH https://gosms.one/api/http/contacts/6065ecdc9184a \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"name":"Codeglen Update"}'
Returns a contact object if the request was successful.
{
"status": "success",
"data": "groups data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
Deletes an existing group. You only need to supply the unique id that was returned upon creation.
API Endpoint
https://www.textboostsms.com/api/v3/contacts/{group_id}
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groups uid |
curl -X DELETE https://gosms.one/api/http/contacts/6065ecdc9184a \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "null",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
API Endpoint
https://www.textboostsms.com/api/v3/contacts/
curl -X GET https://gosms.one/api/http/contacts \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "group data with pagination",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
API Endpoint
https://www.textboostsms.com/api/http/sms/send
Parameter | Required | Description |
---|---|---|
Authorization |
Yes
|
When calling our API, send your api token with the
authentication type set as Bearer (Example:
Authorization: Bearer {api_token} ) |
Accept |
Yes
|
Set to application/json |
TextBoost SMS's Programmable SMS API enables you to programmatically send SMS messages from your web application. First, you need to create a new message object. TextBoost SMS returns the created message object with each request.
Send your first SMS message with this example request.
API Endpoint
https://www.textboostsms.com/api/http/sms/send
Parameter | Required | Type | Description |
---|---|---|---|
recipient |
Yes
|
string | Number to send message. Use comma (,) to send
multiple numbers. Ex. 31612345678,8801721970168
|
sender_id |
Yes
|
string | The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters. |
type |
Yes
|
string | The type of the message. For text message you have to insert
plain as sms type. |
message |
Yes
|
string | The body of the SMS message. |
schedule_time |
No
|
datetime | The scheduled date and time of the message in RFC3339 format
(Y-m-d H:i) |
dlt_template_id |
No
|
string | The ID of your registered DLT (Distributed Ledger Technology) content template. |
curl -X POST https://gosms.one/api/http/sms/send \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'
curl -X POST https://gosms.one/api/http/sms/send \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678,880172145789",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message",
"schedule_time=2021-12-20 07:00"
}'
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms reports with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
You can use TextBoost SMS's SMS API to retrieve information of an existing inbound or outbound SMS message.
You only need to supply the unique message id that was returned upon creation or receiving.
API Endpoint
https://www.textboostsms.com/api/v3/sms/{uid}
Parameter | Required | Type | Description |
---|---|---|---|
uid |
Yes
|
string | A unique random uid which is created on the TextBoost SMS platform and is returned upon creation of the object. |
curl -X GET https://gosms.one/api/http/sms/606812e63f78b \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
API Endpoint
https://www.textboostsms.com/api/v3/sms/
curl -X GET https://gosms.one/api/http/sms \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms reports with pagination",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
API Endpoint
https://www.textboostsms.com/api/http/sms/send
Parameter | Required | Description |
---|---|---|
Authorization |
Yes
|
When calling our API, send your api token with the
authentication type set as Bearer (Example:
Authorization: Bearer {api_token} ) |
Accept |
Yes
|
Set to application/json |
TextBoost SMS's Programmable SMS API enables you to programmatically send SMS messages from your web application. First, you need to create a new message object. TextBoost SMS returns the created message object with each request.
Send your first SMS message with this example request.
API Endpoint
https://www.textboostsms.com/api/http/sms/send
Parameter | Required | Type | Description |
---|---|---|---|
recipient |
Yes
|
string | Number to send message |
sender_id |
Yes
|
string | The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters. |
type |
Yes
|
string | The type of the message. For text message you have to insert
voice as sms type. |
language |
Yes
|
string | The language in which the message needs to be read to the
recipient. Possible values are:
cy-gb, da-dk, de-de, el-gr, en-au, en-gb, en-gb-wls, en-in, en-us, es-es, es-mx, es-us, fr-ca, fr-fr, id-id, is-is, it-it, ja-jp, ko-kr, ms-my, nb-no, nl-nl, pl-pl, pt-br, pt-pt, ro-ro, ru-ru, sv-se, ta-in, th-th, tr-tr, vi-vn, zh-cn, zh-hk.
|
gender |
Yes
|
string | The gender in which the messages needs to be read to the
recipient. Possible values are: male, female |
message |
Yes
|
string | The body of the SMS message. |
schedule_time |
No
|
datetime | The scheduled date and time of the message in RFC3339 format
(Y-m-d H:i) |
curl -X POST https://gosms.one/api/http/sms/send \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"voice",
"language=en-gb",
"gender=female",
"message":"This is a test message"
}'
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms reports with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
You can use TextBoost SMS's SMS API to retrieve information of an existing inbound or outbound SMS message.
You only need to supply the unique message id that was returned upon creation or receiving.
API Endpoint
https://www.textboostsms.com/api/v3/sms/{uid}
Parameter | Required | Type | Description |
---|---|---|---|
uid |
Yes
|
string | A unique random uid which is created on the TextBoost SMS platform and is returned upon creation of the object. |
curl -X GET https://gosms.one/api/http/sms/606812e63f78b \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
API Endpoint
https://www.textboostsms.com/api/v3/sms/
curl -X GET https://gosms.one/api/http/sms \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms reports with pagination",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
API Endpoint
https://www.textboostsms.com/api/http/sms/send
Parameter | Required | Description |
---|---|---|
Authorization |
Yes
|
When calling our API, send your api token with the
authentication type set as Bearer (Example:
Authorization: Bearer {api_token} ) |
Accept |
Yes
|
Set to application/json |
TextBoost SMS's Programmable SMS API enables you to programmatically send SMS messages from your web application. First, you need to create a new message object. TextBoost SMS returns the created message object with each request.
Send your first SMS message with this example request.
API Endpoint
https://www.textboostsms.com/api/http/sms/send
Parameter | Required | Type | Description |
---|---|---|---|
recipient |
Yes
|
string | Number to send message |
sender_id |
Yes
|
string | The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters. |
type |
Yes
|
string | The type of the message. For text message you have to insert
mms as sms type. |
media_url |
Yes
|
url | URL's of attachment of the MMS message. Supported media types:
image/* |
message |
No
|
string | The body of the SMS message. |
schedule_time |
No
|
datetime | The scheduled date and time of the message in RFC3339 format
(Y-m-d H:i) |
curl -X POST https://gosms.one/api/http/sms/send \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"mms",
"message":"This is a test message",
"media_url=https://via.placeholder.com/150.jpg"
}'
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms reports with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
You can use TextBoost SMS's SMS API to retrieve information of an existing inbound or outbound SMS message.
You only need to supply the unique message id that was returned upon creation or receiving.
API Endpoint
https://www.textboostsms.com/api/v3/sms/{uid}
Parameter | Required | Type | Description |
---|---|---|---|
uid |
Yes
|
string | A unique random uid which is created on the TextBoost SMS platform and is returned upon creation of the object. |
curl -X GET https://gosms.one/api/http/sms/606812e63f78b \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
}'
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
API Endpoint
https://www.textboostsms.com/api/v3/sms/
curl -X GET https://gosms.one/api/http/sms \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms reports with pagination",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
API Endpoint
https://www.textboostsms.com/api/http/me
Parameter | Required | Description |
---|---|---|
Authorization |
Yes
|
When calling our API, send your api token with the
authentication type set as Bearer (Example:
Authorization: Bearer {api_token} ) |
Accept |
Yes
|
Set to application/json |
API Endpoint
https://www.textboostsms.com/api/http/balance
curl -X GET https://gosms.one/api/http/balance \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms unit with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
API Endpoint
https://www.textboostsms.com/api/http/me
curl -X GET https://gosms.one/api/http/me \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns a contact object if the request was successful.
{
"status": "success",
"data": "profile data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
没有找到相关的信息?欢迎联系我们!
请仅依赖我们官方网站发布的信息来获取有关我们业务和服务的准确信息。