




uSMS GH SMS API allows you to send and receive SMS messages to and from any country in the world through a REST API. Each message is identified by a unique random ID so that users can always check the status of a message using the given endpoint.
API Endpoint
http://usmsgh.xyz/api/v3/sms/send
Parameters
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 |
Send outbound SMS
uSMS GH’s Programmable SMS API enables you to programmatically send SMS messages from your web application. First, you need to create a new message object. uSMS GH returns the created message object with each request.
Send your first SMS message with this example request.
API Endpoint
http://usmsgh.xyz/api/sms/send
Parameters
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. |
message | YES | string | The body of the SMS message. |
Example request
curl -X POST http://usmsgh.xyz/api/sms/send \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' \ -d "recipient=31612345678" \ -d "sender_id=YourName" \ -d "message=This is a test message" Returns 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." }
View an SMS
You can use uSMS GH’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
http://usmsgh.xyz/api/sms/{uid}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
recipient | YES | string | Number to send message |
Example request
curl -X GET http://usmsgh.xyz/api/sms/606812e63f78b \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' Returns 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." }
View all messages
API Endpoint
http://usmsgh.xyz/api/sms/
Example request
curl -X GET http://usmsgh.xyz/api/sms \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' Returns 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." }
uSMS GH 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
http://usmsgh.xyz/api/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 |
Create a contact
Creates a new contact object. uSMS GH returns the created contact object with each request.
API Endpoint
http://usmsgh.xyz/api/contacts/{group_id}/store
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
group_id | Yes | string | Contact Groups uid |
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. |
Example request
curl -X POST http://usmsgh.xyz/api/contacts/6065ecdc9184a/store \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' \ -d "phone=31612345678" Returns Returns a contact object if the request was successful. {u "stat s": "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." }
View a contact
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
http://usmsgh.xyz/api/contacts/{group_id}/search/{uid}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
group_id | Yes | string | Contact Groups uid |
uid | Yes | string | Contact uid |
Example request
curl -X POST http://usmsgh.xyz/api/contacts/6065ecdc9184a/search/606732aec8705 \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' Returns 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." }
Update a contact
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
http://usmsgh.xyz/api/contacts/{group_id}/update/{uid}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
group_id | Yes | string | Contact Groups uid |
uid | Yes | string | Contact uid |
phone | Yes | string | 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. |
Example request
curl -X PATCH http://usmsgh.xyz/api/contacts/6065ecdc9184a/update/606732aec8705 \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' \ -d "phone=31612345678" Returns 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." }
Delete a contact
Deletes an existing contact. You only need to supply the unique contact uid and group uid that was returned upon creation.
API Endpoint
http://usmsgh.xyz/api/contacts/{group_id}/delete/{uid}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
group_id | Yes | string | Contact Groups uid |
uid | Yes | string | Contact uid |
Example request
curl -X DELETE http://usmsgh.xyz/api/contacts/6065ecdc9184a/delete/606732aec8705 \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' Returns 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." }
View all contacts in group
API Endpoint
http://usmsgh.xyz/api/contacts/{group_id}/all
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
group_id | Yes | string | Contact Groups uid |
Example request
curl -X POST http://usmsgh.xyz/api/contacts/6065ecdc9184a/all \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' Returns 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." }
uSMS GH Contact Groups API allows you to manage contact groups that are identified by a unique random ID. Use this ID to create, view, update or delete groups.
API Endpoint
http://usmsgh.xyz/api/contacts
Parameters
Parameter | Required | Description | |
---|---|---|---|
Authorization | Yes |
| |
Accept | Yes |
|
Create a group
Creates a new group object. uSMS GH returns the created group object with each request.
API Endpoint
http://usmsgh.xyz/api/contacts
Parameters
Parameter | Required | Type | Description | |
---|---|---|---|---|
name | Yes | string |
|
Example request
curl -X POST http://usmsgh.xyz/api/contacts \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' \ -d "name=codeglen" Returns 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." }
View a group
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
http://usmsgh.xyz/api/contacts/{group_id}/show/
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
group_id | Yes | string | Contact Groups uid |
Example request
curl -X POST http://usmsgh.xyz/api/contacts/6065ecdc9184a/show \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' Returns 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." }
Update a group
Updates an existing group. You only need to supply the unique ID that was returned upon creation.
API Endpoint
http://usmsgh.xyz/api/contacts/{group_id}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
group_id | Yes | string | Contact Groups uid |
name | Yes | string | New group name |
Example request
curl -X PATCH http://usmsgh.xyz/api/contacts/6065ecdc9184a \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' \ -d "name=codeglen new" Returns 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." }
Delete a group
Deletes an existing group. You only need to supply the unique id that was returned upon creation.
API Endpoint
http://usmsgh.xyz/api/contacts/{group_id}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
group_id | Yes | string | Contact Groups uid |
Example request
curl -X DELETE http://usmsgh.xyz/api/contacts/6065ecdc9184a \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' Returns 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." }
View all groups
API Endpoint
http://usmsgh.xyz/api/contacts/
Example request
curl -X GET http://usmsgh.xyz/api/contacts \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' Returns 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." }
uSMS GH Profile API allows you to retrieve your total remaining sms unit, used sms unit, and your profile information.
API Endpoint
http://usmsgh.xyz/api/me
Parameters
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 |
|
View sms unit
API Endpoint
http://usmsgh.xyz/api/balance
Example request
curl -X GET http://usmsgh.xyz/api/balance \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' Returns 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." }
View Profile
API Endpoint
http://usmsgh.xyz/api/me
Example request
curl -X GET http://usmsgh.xyz/api/me \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' Returns 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." }
Send us Message
Need assistance? Contact Us
Our system is user friendly, however, if you need assistance, We are available to assist you.
