api-docs v5.116.0
API Docs
Table of contents
SMS
SMS - Find
Get list of sms
GET /sms
Headers - Header
Name | Type | Description |
---|---|---|
Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Examples
Example usage:
curl "https://yourdomain.com/sms" \
-X GET \
-H "Authorization: Bearer <your-api-token>"
Success response
Success response - Success 200
Name | Type | Description |
---|---|---|
smsList | object[] |
array of sms |
smsList.id | string |
|
smsList.createdAt | number |
|
smsList.organization | string |
under what organization will the sms be sent |
smsList.provider | string |
Allowed values: globelabs |
smsList.message | string |
|
smsList.error | string |
|
smsList.sentAt | number |
|
smsList.metadata | object |
|
smsList.metadata.appid | string |
|
smsList.metadata.shortcode | string |
|
smsList.metadata.appsecret | string |
|
smsList.metadata.passphrase | string |
|
smsList.recipients | object[] |
array of numbers |
smsList.recipients.id | string |
uid for account, id for patient |
smsList.recipients.type | string |
Allowed values: medical-patient,account |
smsList.recipients.address | string |
sms address/number |
smsList.recipients.sentAt | number |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
[
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
},
{
"id": "id-2",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}
]
SMS - Get
Get a specific sms
GET /sms/:id
Headers - Header
Name | Type | Description |
---|---|---|
Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Examples
Example usage:
curl "https://yourdomain.com/sms/<sms-id>" \
-X GET \
-H "Authorization: Bearer <your-api-token>"
Success response
Success response - Success 200
Name | Type | Description |
---|---|---|
id | string |
|
createdAt | number |
|
organization | string |
under what organization will the sms be sent |
provider | string |
Allowed values: globelabs |
message | string |
|
error | string |
|
sentAt | number |
|
metadata | object |
|
metadata.appid | string |
|
metadata.shortcode | string |
|
metadata.appsecret | string |
|
metadata.passphrase | string |
|
recipients | object[] |
array of numbers |
recipients.id | string |
uid for account, id for patient |
recipients.type | string |
Allowed values: medical-patient,account |
recipients.address | string |
sms address/number |
recipients.sentAt | number |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}
SMS - Post
Create sms
POST /sms
Headers - Header
Name | Type | Description |
---|---|---|
Authorization | string |
key to place the API token to using the grant 'Bearer' |
Header examples
Authorization-Example
{
"Authorization": "Bearer <your-api-token>"
}
Parameters - Parameter
Name | Type | Description |
---|---|---|
organization | string |
under what organization will the sms be sent |
provider | string |
optional Allowed values: globelabs |
message | string |
|
metadata | object |
optional |
metadata.appid | string |
|
metadata.shortcode | string |
|
metadata.appsecret | string |
|
metadata.passphrase | string |
|
recipients | object[] |
array of numbers |
recipients.id | string |
uid for account, id for patient |
recipients.type | string |
Size range: 1.. Allowed values: medical-patient,account |
recipients.address | string |
sms address/number |
recipients.sentAt | number |
Examples
Example usage:
curl "https://yourdomain.com/sms" \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-api-token>" \
-d '{
"organization": "org-id",
"message": "hey",
"recipients": [
{
"id": "some-uid"
}
]
}'
Parameters examples
json
- Request-Example
{
"organization": "org-id",
"message": "hey",
"recipients": [
{
"id": "some-uid"
}
]
}
Success response
Success response - Success 200
Name | Type | Description |
---|---|---|
id | string |
|
createdAt | number |
|
organization | string |
under what organization will the sms be sent |
provider | string |
Allowed values: globelabs |
message | string |
|
error | string |
|
sentAt | number |
|
metadata | object |
|
metadata.appid | string |
|
metadata.shortcode | string |
|
metadata.appsecret | string |
|
metadata.passphrase | string |
|
recipients | object[] |
array of numbers |
recipients.id | string |
uid for account, id for patient |
recipients.type | string |
Allowed values: medical-patient,account |
recipients.address | string |
sms address/number |
recipients.sentAt | number |
Success response example
Success response example - Success-Response:
HTTP/1.1 200 OK
{
"id": "id-1",
"createdAt": 1564661697125,
"createdBy": "some-uid"
}