AuthnToken Bearer Token (JWT) MasCommunications Squad — cuco@masmovil.com
| Recurso | Descripción |
|---|---|
| CMS | A CMS resource represents the management of content for various communication channels |
| Communications | Communications Blacklist defines the endpoint to delete entries from the blacklist |
| Short URLs | This resource describes the shortened links and the metadata associated to them |
| Communication Types | Communication types define the available communications catalog in the product in terms of the purpose of the communication and regardless the different templates implementations (depending on channel, language or organization) that can exist for that type |
| Examples | An example resource represents the expected communication data given a template (defined by its type, organization, language and channel) and some specific input arguments |
| Templates | A template resource represents the specific implementation of a template for a given communication type, organization, language and channel |
| Communication Types Beta | Communication types define the available communications catalog in the product in terms of the purpose of the communication and regardless the different templates implementations (depending on channel, language or organization) that can exist for that type |
| Examples Beta | An example resource represents the expected communication data given a template (defined by its type, organization, language and channel) and some specific input arguments |
| Templates Beta | A template resource represents the specific implementation of a template for a given communication type, organization, language and channel |
| Templates Commit Beta |
AuthnToken Bearer Token (JWT) MasCommunications Squad — cuco@masmovil.com
| Recurso | Descripción |
|---|---|
| CMS | A CMS resource represents the management of content for various communication channels |
| Communications | Communications Blacklist defines the endpoint to delete entries from the blacklist |
| Short URLs | This resource describes the shortened links and the metadata associated to them |
| Communication Types | Communication types define the available communications catalog in the product in terms of the purpose of the communication and regardless the different templates implementations (depending on channel, language or organization) that can exist for that type |
| Examples | An example resource represents the expected communication data given a template (defined by its type, organization, language and channel) and some specific input arguments |
| Templates | A template resource represents the specific implementation of a template for a given communication type, organization, language and channel |
| Communication Types Beta | Communication types define the available communications catalog in the product in terms of the purpose of the communication and regardless the different templates implementations (depending on channel, language or organization) that can exist for that type |
| Examples Beta | An example resource represents the expected communication data given a template (defined by its type, organization, language and channel) and some specific input arguments |
| Templates Beta | A template resource represents the specific implementation of a template for a given communication type, organization, language and channel |
| Templates Commit Beta |
Creates a new managed folder in a specific bucket for a given organization.
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Managed Folder creation values
{
"folderPath": "check/",
"user": "John_doe@example.com"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
folderPath* | string | Path of the managed folder | ||
user* | string | Email address of the user |
Created Managed folder successfully created
{
"commit": "v2.0.0",
"data": {
"id": "mas-comms-cms-yoigo/check/",
"name": "check/",
"bucket": "mas-comms-cms-yoigo",
"metadata": {
"user": "John_doe@example.com"
},
"createTime": "2024-08-08T07:14:49.262Z",
"updateTime": "2024-08-08T07:14:49.262Z"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_3XX",
"title": "CMS_X_X_X",
"details": "[CMS] Error creating a managed folder",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/orgs/yoigo/cms/managedFolders' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"folderPath": "check/",
"user": "John_doe@example.com"
}' Deletes a folder for CMS
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
QUERY PARAMETERS
User
Folder Name
OK Folder deleted successfully
{
"commit": "v2.0.0",
"data": {
"bucket": "comms-cms-dev",
"name": "testDelete",
"metadata": {
"user": "John_doe@example.com"
},
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-06T12:33:51.087Z"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request User is not the owner hence not allowed to delete
{
"errors": [
{
"code": "COMMS_3XX",
"title": "CMS_X_X_X",
"details": "[CMS] User is not the folder owner",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Folder created within 24 hours
{
"errors": [
{
"code": "COMMS_3XX",
"title": "CMS_X_X_X",
"details": "[CMS] Folder created within 24 hours",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X DELETE 'https://communications.masstack.com/v2/orgs/yoigo/cms/managedFolders?user=John_doe%40example.com&name=folderName' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Retrieves a CMS object based on the provided object name.
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
QUERY PARAMETERS
Name of the CMS object to retrieve
OK Successfully retrieved the CMS object
{
"commit": "v2.0.0",
"data": {
"id": "bucket/logos/image.png/1716975751629429",
"selfLink": "logo",
"bucket": "bucket-test",
"name": "logos/image.png",
"size": "0",
"generation": "1716975751629429",
"metageneration": "1",
"timeCreated": "1716975751630",
"updated": "1716975751630",
"metadata": {
"user": "John_doe@example.com"
},
"mediaLink": "media"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Not Found Object not found
{
"errors": [
{
"code": "COMMS_3XX",
"title": "CMS_X_X_X",
"details": "[CMS] Object is not found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_3XX",
"title": "CMS_X_X_X",
"details": "[CMS] Internal Server Error",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/orgs/yoigo/cms/object?objectName=tenant%2Flogos%2Flogo.png' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Creates a new object inside a specific bucket (and inside a specific folder if required), based on Cloud Storage buckets inside the Google Cloud project. This service can only be called by MasCommunications administration service accounts
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
CMS values
{
"user": "John_doe@example.com",
"objectName": "test.png",
"fileContent": "UmVzZXQgeW91ciBwYXNzd29yZA=="
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
user* | string | Email address of the user | ||
objectName* | string | Object name | ||
fileContent* | string | File path |
Created CMS object successfully created
{
"commit": "v2.0.0",
"data": {
"id": "bucket/logos/image.png/1716975751629429",
"selfLink": "logo",
"bucket": "bucket-test",
"name": "logos/image.png",
"size": "0",
"generation": "1716975751629429",
"metageneration": "1",
"timeCreated": "1716975751630",
"updated": "1716975751630",
"metadata": {
"user": "John_doe@example.com"
},
"mediaLink": "media"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_3XX",
"title": "CMS_X_X_X",
"details": "[CMS] A resource with the same name already exist",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/orgs/yoigo/cms/object' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"user": "John_doe@example.com",
"objectName": "test.png",
"fileContent": "UmVzZXQgeW91ciBwYXNzd29yZA=="
}' Updates an existing CMS object based on the provided object name and user information.
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Update the CMS object values
{
"updatedObjectName": "B_testTes.png",
"sourceObjectName": "image.png",
"user": "John_doe@example.com"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
sourceObjectName* | string | Name of the source object to be updated | ||
updatedObjectName* | string | Name of the object after the update | ||
user* | string | Email address of the user |
OK CMS object successfully updated
{
"commit": "v2.0.0",
"data": {
"id": "bucket/logos/image.png/1716975751629429",
"selfLink": "logo",
"bucket": "bucket-test",
"name": "logos/image.png",
"size": "0",
"generation": "1716975751629429",
"metageneration": "1",
"timeCreated": "1716975751630",
"updated": "1716975751630",
"metadata": {
"user": "John_doe@example.com"
},
"mediaLink": "media"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_3XX",
"title": "CMS_X_X_X",
"details": "[CMS] Error updating the object",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X PUT 'https://communications.masstack.com/v2/orgs/yoigo/cms/object' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"updatedObjectName": "B_testTes.png",
"sourceObjectName": "image.png",
"user": "John_doe@example.com"
}' Delete Object for CMS
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
QUERY PARAMETERS
Name of the CMS object to retrieve
User
OK Object deleted successfully
{
"commit": "v2.0.0",
"data": {
"id": "bucket/logos/image.png/1716975751629429",
"selfLink": "logo",
"bucket": "bucket-test",
"name": "logos/image.png",
"size": "0",
"generation": "1716975751629429",
"metageneration": "1",
"timeCreated": "1716975751630",
"updated": "1716975751630",
"metadata": {
"user": "John_doe@example.com"
},
"mediaLink": "media"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request User is not the owner hence not allowed to delete
{
"errors": [
{
"code": "COMMS_3XX",
"title": "CMS_X_X_X",
"details": "[CMS] User is not the object owner",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Object created within 24 hours
{
"errors": [
{
"code": "COMMS_3XX",
"title": "CMS_X_X_X",
"details": "[CMS] Object created within 24 hours",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X DELETE 'https://communications.masstack.com/v2/orgs/yoigo/cms/object?objectName=tenant%2Flogos%2Flogo.png&user=John_doe%40example.com' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Retrieves the content tree for the CMS.
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
OK Successfully retrieved the CMS content tree
{
"commit": "N/A",
"data": {
"name": "mas-comms-cms-yoigo",
"creationDate": "2024-10-17T14:08:51.530Z",
"treeList": [
{
"name": "E2ETesting/E2E.png",
"publicUrl": "https://url/download/storage/v1/b/image.png",
"type": "image/png",
"creationDate": "2024-10-17T14:08:51.531Z",
"updatedDate": "2024-10-17T14:08:51.531Z",
"metadata": {
"user": "John_doe@example.com"
}
}
]
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Internal Server Error Internal server error
{
"errors": [
{
"code": "COMMS_3XX",
"title": "CMS_X_X_X",
"details": "[CMS] Internal Server Error",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/orgs/yoigo/cms/contentTree' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Search entries in the communications blacklist
QUERY PARAMETERS
Type of blacklist entry to filter
Country code to filter phone blacklist entries
Search term to filter blacklist entries
OK Blacklist entries retrieved successfully
{
"commit": "N/A",
"data": {
"items": [
{
"id": "c17a2a8e-452e-4ec2-a1db-e426e42634ae",
"type": "PHONE",
"value": "946625112",
"countryCode": 34,
"reason": "User unsubscribed via marketing campaign.",
"date": "2025-11-20T12:02:34.800019Z"
},
{
"id": "e085960c-0e78-4add-863c-f79ce6d7b565",
"type": "EMAIL",
"value": "example@example.com",
"reason": "User unsubscribed via marketing campaign.",
"date": "2025-11-20T11:16:09.062901Z"
}
],
"limit": 2,
"offset": 0,
"total": 34
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_016",
"title": "QUERY_PARAM_NOT_SUPPORTED",
"details": "[BLACKLIST] Parameter 'searcha' not supported for queries",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error
{
"errors": [
{
"code": "COMMS_006",
"title": "INTERNAL_SERVER_ERROR",
"details": "[BLACKLIST] Internal Server Error: Some persistence error occurred",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/blacklist?type=email&countryCode=ES&search=user%40example.com' \
-H 'Accept: application/json' Adds a new entry to the communications blacklist
Blacklist entry to add
{
"type": "EmaiL",
"value": "user@example.com",
"reason": "User unsubscribed via marketing campaign."
} {
"type": "pHoNe",
"value": "946625112",
"countryCode": 34,
"reason": "User unsubscribed via marketing campaign."
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
type* | string | Blacklist entry type, allowed values are: EMAIL, PHONE | ||
value* | string | Blacklist entry value, can be an email address or a phone number | ||
countryCode | string | Country code in ISO 3166-1 alpha-2 format or in E.164 format | "ES" | |
reason | string | Reason for blacklisting the entry |
OK Blacklist entry already exists
{
"commit": "N/A",
"data": {
"id": "382ba66d-a6fb-4155-b53d-a7605b5d3bb3",
"type": "PHONE",
"value": "946621007",
"countryCode": 34,
"reason": "User unsubscribed via marketing campaign."
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
Created Blacklist entry created successfully
{
"commit": "N/A",
"data": {
"id": "f878ebbf-a710-4f75-a211-ebe681530ca5",
"type": "EMAIL",
"value": "user@example.com",
"reason": "User unsubscribed via marketing campaign."
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
Bad Request Bad Request - Invalid or missing required fields
{
"errors": [
{
"code": "COMMS_237",
"title": "BLACKLIST_TYPE_MANDATORY",
"details": "[BLACKLIST] The type field is mandatory",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/blacklist' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "EmaiL",
"value": "user@example.com",
"reason": "User unsubscribed via marketing campaign."
}' Removes an entry from the blacklist (e.g., if a user re-subscribes). The entry is identified by its type and value. If the entry does not exist, a 404 error is returned.
Blacklist entry details to delete
{
"type": "email",
"value": "user@example.com",
"reason": "User unsubscribed via marketing campaign."
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
type* | string | Blacklist entry type, allowed values are: EMAIL, PHONE | ||
value* | string | Blacklist entry value, can be an email address or a phone number | ||
countryCode | string | Country code in ISO 3166-1 alpha-2 format or in E.164 format | "ES" | |
reason | string | Reason for blacklisting the entry |
No Content Blacklist entry deleted successfully (No Content)
Bad Request Bad Request - Invalid or missing required fields
{
"errors": [
{
"code": "COMMS_237",
"title": "BLACKLIST_TYPE_MANDATORY",
"detail": "[blacklist-service] The type field is mandatory",
"status": 400,
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Not Found Blacklist entry not found
{
"errors": [
{
"code": "COMMS_904",
"title": "BLACKLIST_ENTRY_NOT_FOUND",
"detail": "[blacklist-service] Entry not found",
"status": 404,
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Internal Server Error
{
"errors": [
{
"code": "COMMS_006",
"title": "INTERNAL_SERVER_ERROR",
"detail": "[blacklist-service] Internal Server Error",
"status": 500,
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X DELETE 'https://communications.masstack.com/v2/blacklist' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "email",
"value": "user@example.com",
"reason": "User unsubscribed via marketing campaign."
}' This service returns the list of sent communications for the given filters, ordered by request time in descending order
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
QUERY PARAMETERS
Queried communication's email destination address
Queried communication's SMS terminating number without country code
Queried communication's SMS country code without + symbol
Return requests with request time greater (later) than the one specified
Return requests with request time lower (earlier) than the one specified
Queried communication's client id taken from audience header
Limit of results in the response
Offset applied to results for pagination
Internal reference provided by the client system that could be used in later queries
Template channel
OK Successful communications search
{
"commit": "v2.0.0",
"data": {
"items": [
{
"id": "12123434-5717-4562-b3fc-2c963f66afa6",
"type": "password_reset",
"language": "en",
"clientId": "cuco.test-sa",
"agentId": "N/A",
"requestTime": "2021-01-01T14:00:00.000000Z",
"scheduledTime": "2021-01-03T14:00:00.000000Z",
"usingDraft": false,
"sms": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"senderInfo": "YOIGO",
"countryCode": "34",
"terminatingNumber": "623196241",
"content": "Hi Juan, enter https://password.com/reset/123456 to reset password",
"realTimeRequired": true,
"updatedTime": "2021-01-01T14:00:00.000000Z",
"deliveryStatus": "SUBMITTED",
"sendingType": "DEFAULT"
},
"email": {
"id": "123e4567-e89b-12d3-a456-426655440000",
"from": {
"email": "noreply@masmovil.com",
"name": "Masmovil info"
},
"to": {
"email": "recipient@masmovil.com",
"name": "Masmovil"
},
"subject": "Reset your password",
"mimeType": "text/html",
"content": "Hi! This is an example",
"deliveryStatus": "SUBMITTED",
"updatedTime": "2021-01-01T14:00:00.000000Z"
},
"whatsapp": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"terminatingNumber": "623196241",
"updatedTime": "2021-01-01T14:00:00.000000Z",
"deliveryStatus": "SUBMITTED",
"code": 202
}
},
{
"id": "557e2df4-68d7-4bc7-b62f-2b7d66397a29",
"type": "one_time_password3new",
"language": "ru",
"clientId": "cuco.test-sa",
"agentId": "N/A",
"requestTime": "2026-02-02T07:46:26.416618Z",
"scheduledTime": null,
"usingDraft": true,
"sms": {
"id": "adb63e01-852c-4214-8896-1c65d04e7e96",
"senderInfo": "YOIGO",
"countryCode": "34",
"terminatingNumber": "604173330",
"content": "Your link : yoigo.link/*******",
"realTimeRequired": true,
"updatedTime": "2026-02-02T07:46:27.667323Z",
"deliveryStatus": "REGISTERED",
"sendingType": "DEFAULT"
}
}
],
"limit": 5,
"offset": 0,
"total": 2,
"type": null,
"clientId": "cuco.test-sa",
"countryCode": "34",
"terminatingNumber": "604173330",
"destinationEmail": "recipient@masmovil.com"
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error on request
"{\"errors\":\"[{\"code\":\"COMMS_030\",\"title\": \"FILTER_NOT_SPECIFIED\",\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS] At least one filter must be specified\"}]}" | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error
"{\"errors\":\"[{\"code\":\"COMMS_031\",\"title\": \"FILTER_NOT_SPECIFIED\",\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS] Database temporary unavailable\"}]}" | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/orgs/yoigo/communications?destinationEmail=diego.mateos%40masmovil.com&terminatingNumber=666123123&countryCode=34&requestTime[gt]=2020-01-01T14%3A00%3A00%2B01%3A00&requestTime[lt]=2020-12-01T14%3A00%3A00%2B01%3A00&clientId=mysim-sa&limit=20&offset=0&externalId=sale-12512321&channel=sms' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Send a communication of certain type in the specified language via the required channels
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Information needed to send a communication
{
"type": "password_reset",
"language": "en",
"channels": [
"sms",
"email",
"whatsapp"
],
"smsInput": {
"terminatingNumber": "623196241"
},
"whatsAppInput": {
"terminatingNumber": "623196241"
},
"emailInput": {
"destinationEmail": "recipient@masmovil.com",
"destinationName": "Juan"
},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code",
"fruitsAndColors": {
"apple": "red",
"banana": "yellow",
"pear": "green"
},
"pdfAttachments": {
"apple.pdf": "VGhpcyBpcyBhIFBERiBjb250ZW50",
"pear.pdf": "VGhpcyBpcyBhIFBERiBjb250ZW50"
},
"usingDraft": true
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | |||||||||||||||||
language* | string | Communication language(ISO 639-1) | |||||||||||||||||
channels | string[] | Channels list through which the communication will be sent, allowed values are: "sms", "email". If not specified, all channels with a defined template are used | |||||||||||||||||
scheduledTime | string | Programmed time for the communication to be sent that can be reprogrammed to fit delivery window. | |||||||||||||||||
smsInput | object | Specific parameters needed for SMS channel, mandatory if SMS channel requested. No need to provide it when previewing a communication | |||||||||||||||||
| |||||||||||||||||||
emailInput | object | Specific parameters needed for email channel, mandatory if email channel requested. No need to provide it when previewing a communication | |||||||||||||||||
| |||||||||||||||||||
whatsAppInput | object | Specific parameters needed for whatsApp channel, mandatory if whatsApp channel requested. No need to provide it when previewing a communication | |||||||||||||||||
| |||||||||||||||||||
externalId | string | Client internal reference | |||||||||||||||||
arguments | object | Parameters and assigned values that are required to render the specified template. Depending on the argument type they can be a string, a number, a boolean or an array | |||||||||||||||||
| |||||||||||||||||||
usingDraft | boolean | Use the template draft | |||||||||||||||||
Accepted Successfully sent communication
{
"id": "12123434-5717-4562-b3fc-2c963f66afa6",
"commit": "v2.0.0",
"data": {
"id": "12123434-5717-4562-b3fc-2c963f66afa6",
"type": "password_reset",
"language": "en",
"clientId": "cuco.test-sa",
"agentId": "cuco.agentId@test.auth.masmovil.com",
"requestTime": "2021-01-01T14:00:00.000000Z",
"smsInput": {
"senderInfo": "YOIGO",
"countryCode": "34",
"terminatingNumber": "623196241",
"content": "Hi Juan, enter https://password.com/reset/123456 to reset password",
"realTimeRequired": true,
"scheduledTime": "2021-01-03T14:00:00.000000Z",
"updatedTime": "2021-01-01T14:00:00.000000Z",
"deliveryStatus": "SUBMITTED",
"code": 202
},
"email": {
"id": "123e4567-e89b-12d3-a456-426655440000",
"from": {
"email": "noreply@masmovil.com",
"name": "Masmovil info"
},
"to": {
"email": "recipient@masmovil.com",
"name": "Masmovil"
},
"subject": "Reset your password",
"mimeType": "text/html",
"content": "<p>Welcome to MasMovil!</p>",
"deliveryStatus": "SUBMITTED",
"attachments": [
"embedded_image_png",
"pdfFile.pdf",
"code_qr_png"
],
"updatedTime": "2021-01-01T14:00:00.000000Z",
"code": 202
},
"whatsapp": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"countryCode": "34",
"terminatingNumber": "623196241",
"updatedTime": "2021-01-01T14:00:00.000000Z",
"deliveryStatus": "SUBMITTED",
"code": 202
}
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Communication sent with with some kind of failure, e.g:the e-mail and whatsapp have been successfully sent but the SMS failed in a multi-channel communication
{
"commit": "v2.10.1",
"id": "57cff118-984f-473c-a6ad-5ba51baed0dd",
"data": {
"id": "c936ead5-7a6d-4fdb-9ad3-7cf4bff9d07f",
"type": "password_reset",
"language": "en",
"clientId": "vista360.auth.masmovil.com",
"agentId": "aitor.tilla@masmovil.com",
"externalId": "sale-12512321",
"sms": {
"id": "c936ead5-7a6d-4fdb-9ad3-7cf4bff9d07f",
"senderInfo": "YOIGO",
"countryCode": "34",
"terminatingNumber": "623196241",
"content": "Sms content example",
"realTimeRequired": true,
"scheduledTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-01T14:01:00.000000Z'",
"deliveryStatus": "SUBMITTED",
"sendingType": "EXTERNAL",
"code": 202,
"externalId": "sale-12512321",
"warning": "Accepted but SMS not persisted",
"error": "string"
},
"email": {
"id": "c936ead5-7a6d-4fdb-9ad3-7cf4bff9d07f",
"from": {
"email": "noreply@masmovil.com",
"name": "Masmovil info"
},
"to": {
"email": "recipient@masmovil.es",
"name": "Diego"
},
"subject": "Wonderful offer for you",
"externalId": "sale-12512321",
"deliveryStatus": "SUBMITTED",
"mimeType": "text/html",
"content": "<p>Welcome to </p>",
"scheduledTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-01T14:01:00.000000Z'",
"attachments": [
"textFile.txt",
"pdfFile.pdf"
],
"code": 202,
"warning": "Accepted but email not persisted",
"error": "Email service temporary unavailable"
},
"whatsapp": {
"id": "c936ead5-7a6d-4fdb-9ad3-7cf4bff9d07f",
"countryCode": "34",
"terminatingNumber": "623196241",
"updatedTime": "2021-01-01T14:01:00.000000Z'",
"handoffId": "COMMS_MASMOVIL_UNTRACEABLE_CLIENT_TV_ES",
"content": "Hi Juan, your code is 1234",
"deliveryStatus": "SUBMITTED",
"code": 202,
"externalId": "sale-12512321",
"warning": "Submitted but WhatsApp not persisted",
"error": "string"
},
"requestTime": "2021-01-01T14:00:00.000000Z",
"warning": "Accepted but communication not persisted",
"scheduledTime": "2021-01-01T14:00:00.000000Z",
"usingDraft": true,
"serviceName": "communications"
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request The response for client error when some field in the request is missing or invalid
"{\"errors\":\"[{\"code\":\"COMMS_026\",\"title\": \"TYPE_MANDATORY\",\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS] The type is mandatory\"}]}" | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error
"{\"errors\":\"[{\"code\":\"COMMS_027\",\"title\": \"SMS_TEMPORARY_UNAVAILABLE\",\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS] SMS service temporary unavailable\"}]}" | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/orgs/yoigo/communications' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channels": [
"sms",
"email",
"whatsapp"
],
"smsInput": {
"terminatingNumber": "623196241"
},
"whatsAppInput": {
"terminatingNumber": "623196241"
},
"emailInput": {
"destinationEmail": "recipient@masmovil.com",
"destinationName": "Juan"
},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code",
"fruitsAndColors": {
"apple": "red",
"banana": "yellow",
"pear": "green"
},
"pdfAttachments": {
"apple.pdf": "VGhpcyBpcyBhIFBERiBjb250ZW50",
"pear.pdf": "VGhpcyBpcyBhIFBERiBjb250ZW50"
},
"usingDraft": true
}
}' Retrieve attachments for a given communication
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
The communication identifier
OK Successfully found attachments
{
"id": "12123434-5717-4562-b3fc-2c963f66afa6",
"commit": "v2.0.0",
"data": {
"communicationId": "12123434-5717-4562-b3fc-2c963f66afa6",
"attachments": {
"document.pdf": "https://example.com/files/document.pdf",
"image.png": "https://example.com/files/image.png"
}
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
Not Found Communication not found
"{\"errors\":\"[{\"code\":\"COMMS_004\",\"title\": \"NOT_FOUND\",\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS] Not Found\"}]}" | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error
"{\"errors\":\"[{\"code\":\"COMMS_004\",\"title\": \"NOT_FOUND\",\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS] Error getting communication attachments\"}]}" | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/orgs/yoigo/communications/57cff118-984f-473c-a6ad-5ba51baed0dd/attachments' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Retrieve a qr image related to a sent communication
QUERY PARAMETERS
The communication encrypted data for generating QR Image
OK Successfully created QR code image
Bad Request Invalid, missing or expired QR token
{
"errors": [
{
"code": "COMMS_001",
"title": "COMMUNICATIONS_X_X_X",
"details": "[COMMUNICATIONS] Bad request: QR code expired or malformed",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error while retrieving image
{
"errors": [
{
"code": "COMMS_006",
"title": "COMMUNICATIONS_X_X_X",
"details": "[COMMUNICATIONS] Internal Server Error: Error retrieving image",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/qr?qrToken=bqzmxvphwrtgdycsolna' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: image/png' Get latest info of a sent communication
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
The communication identifier
OK Successfully found communication
{
"id": "12123434-5717-4562-b3fc-2c963f66afa6",
"commit": "v2.0.0",
"data": {
"id": "12123434-5717-4562-b3fc-2c963f66afa6",
"type": "password_reset",
"language": "en",
"clientId": "cuco.test-sa",
"agentId": "cuco.agentId@test.auth.masmovil.com",
"requestTime": "2021-01-01T14:00:00.000000Z",
"scheduledTime": "2021-01-03T14:00:00.000000Z",
"usingDraft": false,
"sms": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"senderInfo": "YOIGO",
"countryCode": "34",
"terminatingNumber": "623196241",
"content": "Hi Juan, enter https://password.com/reset/123456 to reset password",
"realTimeRequired": true,
"updatedTime": "2021-01-01T14:00:00.000000Z",
"deliveryStatus": "SUBMITTED",
"sendingType": "DEFAULT"
},
"email": {
"id": "123e4567-e89b-12d3-a456-426655440000",
"from": {
"email": "noreply@masmovil.com",
"name": "Masmovil info"
},
"to": {
"email": "recipient@masmovil.com",
"name": "Masmovil"
},
"subject": "Reset your password",
"mimeType": "text/html",
"content": "Hi! This is an example",
"deliveryStatus": "SUBMITTED",
"updatedTime": "2021-01-01T14:00:00.000000Z"
},
"whatsapp": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"terminatingNumber": "623196241",
"updatedTime": "2021-01-01T14:00:00.000000Z",
"deliveryStatus": "SUBMITTED",
"code": 202
}
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Not Found Sent communication not found
"{\"errors\":\"[{\"code\":\"COMMS_004\",\"title\": \"NOT_FOUND\",\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS] Not Found\"}]}" | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error
"{\"errors\":\"[{\"code\":\"COMMS_006\",\"title\": \"INTERNAL_SERVER_ERROR\",\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS] Internal Server Error: Error getting communication SMS\"}]}" | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/orgs/yoigo/communications/57cff118-984f-473c-a6ad-5ba51baed0dd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Validates if the fixed number is correct
Phone number to validate
{
"phoneNumber": "612345678",
"countryCode": "ES"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
phoneNumber* | string | Phone number to validate | minLength: 4, maxLength: 14 | |
countryCode | string | Country code in ISO 3166-1 alpha-2 format | minLength: 2, maxLength: 2 | "ES" |
OK OK
{
"commit": "N/A",
"data": {
"message": "The phone number is valid",
"valid": true
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||
data | object | Data content | |||||||||||||||||
| |||||||||||||||||||
Bad Request Bad Request
{
"errors": [
{
"code": "String info error code",
"title": "String info error title",
"details": "String info error message",
"ref": "String info error reference",
"httpStatusCode": 400
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/validate/fixed' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"phoneNumber": "612345678",
"countryCode": "ES"
}' Validates if the mobile number is correct
Phone number to validate
{
"phoneNumber": "612345678",
"countryCode": "ES"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
phoneNumber* | string | Phone number to validate | minLength: 4, maxLength: 14 | |
countryCode | string | Country code in ISO 3166-1 alpha-2 format | minLength: 2, maxLength: 2 | "ES" |
OK OK
{
"commit": "N/A",
"data": {
"message": "The phone number is not valid",
"valid": false
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||
data | object | Data content | |||||||||||||||||
| |||||||||||||||||||
Bad Request Bad Request
{
"errors": [
{
"code": "String info error code",
"title": "String info error title",
"details": "String info error message",
"ref": "String info error reference",
"httpStatusCode": 400
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/validate/mobile' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"phoneNumber": "612345678",
"countryCode": "ES"
}' Preview a communication of certain type in the specified language for provided channels
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Information needed to preview a communication
{
"type": "password_reset",
"language": "en",
"channels": [
"sms",
"email",
"whatsapp"
],
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code",
"fruitsAndColors": {
"apple": "red",
"banana": "yellow",
"pear": "green"
},
"usingDraft": true
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | |||||||||||||||||
language* | string | Communication language(ISO 639-1) | |||||||||||||||||
channels | string[] | Channels list through which the communication will be sent, allowed values are: "sms", "email". If not specified, all channels with a defined template are used | |||||||||||||||||
scheduledTime | string | Programmed time for the communication to be sent that can be reprogrammed to fit delivery window. | |||||||||||||||||
smsInput | object | Specific parameters needed for SMS channel, mandatory if SMS channel requested. No need to provide it when previewing a communication | |||||||||||||||||
| |||||||||||||||||||
emailInput | object | Specific parameters needed for email channel, mandatory if email channel requested. No need to provide it when previewing a communication | |||||||||||||||||
| |||||||||||||||||||
whatsAppInput | object | Specific parameters needed for whatsApp channel, mandatory if whatsApp channel requested. No need to provide it when previewing a communication | |||||||||||||||||
| |||||||||||||||||||
externalId | string | Client internal reference | |||||||||||||||||
arguments | object | Parameters and assigned values that are required to render the specified template. Depending on the argument type they can be a string, a number, a boolean or an array | |||||||||||||||||
| |||||||||||||||||||
usingDraft | boolean | Use the template draft | |||||||||||||||||
OK Communication previewed successfully
"{\n \"commit\": \"v2.0.0\",\n \"data\": {\n \"type\": \"password_reset\",\n \"language\": \"en\",\n \"sms\": {\n \"senderInfo\": \"YOIGO\",\n \"content\": \"Hi Juan, enter https://password.com/reset/123456 to reset password\",\n \"realTimeRequired\": true\n },\n \"whatsapp\": {\n \"content\": \"YOIGO_PASSWORD_RESET_EN\",\n },\n \"email\": {\n \"from\": {\n \"email\": \"noreply@masmovil.com\",\n \"name\": \"Masmovil info\"\n },\n \"subject\": \"Reset your password\",\n \"mimeType\": \"text/html\",\n \"content\": \"<p>Welcome to MasMovil!</p>\"\n }\n }\n}" | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The request could be successfully processed but some alteration in the process
{
"commit": "v2.0.0",
"data": {
"type": "password_reset",
"language": "en",
"warning": "Accepted replacing language",
"email": {
"from": {
"email": "noreply@masmovil.com",
"name": "Masmovil info"
},
"subject": "Reset your password",
"mimeType": "text/html",
"content": "<p>Welcome to MasMovil!</p>"
}
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request The response for client error when some field in the request is missing or invalid
"{\"errors\":\"[{\"code\":\"COMMS_026\",\"title\": \"TYPE_MANDATORY\",\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS] The type is mandatory\"}]}" | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error
"{\"errors\":\"[{\"code\":\"COMMS_026\",\"title\": \"TEMPORARY_UNAVAILABLE\",\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS] Service temporary unavailable\"}]}" | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/orgs/yoigo/communications/preview' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channels": [
"sms",
"email",
"whatsapp"
],
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code",
"fruitsAndColors": {
"apple": "red",
"banana": "yellow",
"pear": "green"
},
"usingDraft": true
}
}' Returns the list of registered URLs with provided filters
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
QUERY PARAMETERS
Filter for customSuffixed Short-URL
Filter for long URL shortened
Filter for last updated agentId
Filter for last updated timestamp (equals)
Filter for last updated timestamp (greater/later than)
Filter for last updated timestamp (greater/later than or equal to)
Filter for last updated timestamp (less/sooner than)
Filter for last updated timestamp (less/sooner than or equal to)
Limit of results in the response
Offset applied to results for pagination
OK Successful URL search
{
"commit": "v2.0.0",
"data": {
"items": [
{
"id": "masmovil.link/rvdlGnk",
"longUrl": "https://www.masmovil.es/ayuda-clientes/e-sim",
"link": "https://masmovil.link/rvdlGnk",
"createdTime": "2023-02-10T09:03:52.765073Z",
"updatedTime": "2023-02-10T09:03:52.765073Z",
"createdClientId": "cuco.test-sa",
"createdAgentId": "N/A",
"updatedClientId": "cuco.test-sa",
"updatedAgentId": "N/A",
"customSuffix": false
}
],
"longUrl": null,
"customSuffix": null,
"updatedAgent": null,
"limit": 50,
"offset": 0
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Bad Request
{
"errors": [
{
"code": "COMMS_600",
"title": "SHORT_URL_X_X_X",
"details": "[SHORT_URL] Parameter 'ABC' not supported for queries",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_601",
"title": "SHORT_URL_X_X_X",
"details": "[SHORT_URL] URL Shortening service not available",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/orgs/yoigo/short-urls?customSuffix=true&longUrl=https%3A%2F%2Fmasmovil.com%2F&updatedAgent=loli%40cuco.com&updatedTime[eq]=2023-02-10T09%3A03%3A52.765073Z&updatedTime[gt]=2023-02-10T09%3A03%3A52.765073Z&updatedTime[gte]=2023-02-10T09%3A03%3A52.765073Z&updatedTime[lt]=2023-02-10T09%3A03%3A52.765073Z&updatedTime[lte]=2023-02-10T09%3A03%3A52.765073Z&limit=20&offset=0' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' A shortened URL is returned for the provided long URL
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Long URL to be shortened
{
"longUrl": "https://google.es",
"customSuffix": "googleWeb"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
longUrl | string | Long URL that is required to be shortened | ||
customSuffix | string | Custom suffix to use instead of generating a random string | ||
length | string | User-defined length of the link |
OK Already shortened URL
{
"commit": "N/A",
"id": "masmovil.link/tAQWFwn",
"data": {
"id": "masmovil.link/tAQWFwn",
"longUrl": "http://llamaya.com",
"link": "https://masmovil.link/tAQWFwn",
"createdTime": "2022-08-05T10:16:14.925156Z",
"updatedTime": "2022-08-05T10:16:14.925156Z",
"createdClientId": "cuco.test-sa",
"createdAgentId": "N/A",
"updatedClientId": "cuco.test-sa",
"updatedAgentId": "N/A",
"customSuffix": false
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Created Successful URL shortening
{
"commit": "N/A",
"id": "masmovil.link/zrk9tee",
"data": {
"id": "masmovil.link/zrk9tee",
"longUrl": "http://llamaya.com",
"link": "https://masmovil.link/zrk9tee",
"createdClientId": "cuco.test-sa",
"createdAgentId": "N/A",
"updatedClientId": "cuco.test-sa",
"updatedAgentId": "N/A",
"createdTime": "2022-07-15T11:49:31.170960Z",
"updatedTime": "2022-07-15T11:49:31.170960Z"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_600",
"title": "SHORT_URL_X_X_X",
"details": "[SHORT_URL] Invalid URL provided",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_601",
"title": "SHORT_URL_X_X_X",
"details": "[SHORT_URL] URL Shortening service not available",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/orgs/yoigo/short-urls' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"longUrl": "https://google.es",
"customSuffix": "googleWeb"
}' Returns the persisted URL with the provided ID
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Domain of link
Suffix of link
OK Successful URL search
{
"commit": "N/A",
"id": "masmovil.link/zrk9tee",
"data": {
"id": "masmovil.link/zrk9tee",
"longUrl": "http://llamaya.com",
"link": "https://masmovil.link/zrk9tee",
"createdClientId": "cuco.test-sa",
"createdAgentId": "N/A",
"updatedClientId": "mas-comms.test-sa",
"updatedAgentId": "N/A",
"createdTime": "2022-07-15T11:49:31.170960Z",
"updatedTime": "2022-07-15T11:49:31.170960Z",
"customSuffix": false
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Not Found URL not found
{
"errors": [
{
"code": "COMMS_600",
"title": "SHORT_URL_X_X_X",
"details": "[SHORT_URL] The requested URL was not found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_601",
"title": "SHORT_URL_X_X_X",
"details": "[SHORT_URL] URL Shortening service not available",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/orgs/yoigo/short-urls/masstack.link/1234567' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' An updated short link is returned for the provided ID with requested long URL
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Domain of link
Suffix of link
Long URL to update current one
{
"longUrl": "https://google.es"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
longUrl | string | Long URL that is required to be shortened | ||
customSuffix | string | Custom suffix to use instead of generating a random string | ||
length | string | User-defined length of the link |
OK Successful URL update
{
"commit": "N/A",
"id": "masmovil.link/rvdlGnk",
"data": {
"id": "masmovil.link/rvdlGnk",
"longUrl": "https://yoigo.com",
"link": "https://masmovil.link/rvdlGnk",
"createdTime": "2023-02-10T09:03:52.765073Z",
"updatedTime": "2023-02-10T09:10:55.619669Z",
"createdClientId": "cuco.test-sa",
"createdAgentId": "N/A",
"updatedClientId": "cuco.test-sa",
"updatedAgentId": "N/A",
"customSuffix": false
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_600",
"title": "SHORT_URL_X_X_X",
"details": "[SHORT_URL] Invalid URL provided",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Not Found URL not found
{
"errors": [
{
"code": "COMMS_601",
"title": "SHORT_URL_X_X_X",
"details": "[SHORT_URL] The requested URL was not found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_602",
"title": "SHORT_URL_X_X_X",
"details": "[SHORT_URL] URL Shortening service not available",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X PUT 'https://communications.masstack.com/v2/orgs/yoigo/short-urls/masstack.link/1234567' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"longUrl": "https://google.es"
}' Get info of a communication type according to its code
PATH PARAMETERS
The communication type code
Accepted Found communication type
{
"commit": "v2.0.0",
"data": {
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindows": "ANYDAY_ANYTIME",
"sendingType": "DEFAULT",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-09T08:22:35.000Z",
"arguments": {
"name": "String",
"resetLink": "Link"
}
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Not Found Communication type not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/types/password_reset' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' This service allows the modification of communication type's fields and add new arguments
PATH PARAMETERS
The communication type code
Communication type values
{
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_8AM8PM",
"sendingType": "EXTERNAL",
"arguments": [
{
"name": "userName",
"type": "String",
"sensitive": false
},
{
"name": "bonusList",
"type": "StringList",
"sensitive": false
},
{
"name": "productNameAndInfo",
"type": "StringMap",
"sensitive": false
},
{
"name": "maxRetries",
"type": "Number",
"sensitive": false
},
{
"name": "resetLink",
"type": "Link",
"sensitive": true
},
{
"name": "birthCountry",
"type": "LocaleRegion",
"sensitive": false
},
{
"name": "expiration",
"type": "Date",
"sensitive": false
},
{
"name": "mfaRequired",
"type": "Boolean",
"sensitive": false
},
{
"name": "attached.pdf",
"type": "Attachment",
"sensitive": false
},
{
"name": "image_png",
"type": "EmbeddedImage",
"sensitive": false
},
{
"name": "qrCodeImage",
"type": "QrInfo",
"sensitive": false
},
{
"name": "attachments",
"type": "AttachmentsMap",
"sensitive": false
}
],
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
code* | string | Unique identification code for the communication type. It can only contain alphanumeric characters separated with underscores. It is validated under this regular expression: ^[a-z0-9][a-z0-9_]{0,38}[a-z0-9]$ | maxLength: 40 | |||||||||||||||||||||
description* | string | Long text description of the communication purpose | ||||||||||||||||||||||
realTimeRequired | boolean | Flag indicating if the communication early delivery is critical. Communications with real time requirement are handled with higher priority than the others in case of overload | false | |||||||||||||||||||||
deliveryWindow | string | Communication's delivery window. It is used to define the time slot in which the communication can be sent. Possible values are always preceded by ANYDAY_ and any valid window within the same day. For example: ANYDAY_ANYTIME, ANYDAY_8AM8PM, ANYDAY_8AM12PM, ANYDAY_12PM4PM or ANYDAY_4PM8PM. | "ANYDAY_ANYTIME" | |||||||||||||||||||||
sendingType | string | If set to EXTERNAL, an external provider will be used to send the communication SMS. Possible values are: DEFAULT, EXTERNAL, BATCH, PREPAID | "DEFAULT" | |||||||||||||||||||||
arguments* | object[] | Variable arguments that can be used in the communication and its type: String, StringList, StringMap, Number, Link,LocaleRegion, Date, Boolean, Attachment, EmbeddedImage or QrInfo | ||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||
requestRef | string | Reference of issue where example was requested | ||||||||||||||||||||||
OK Communication type successfully updated
{
"commit": "v2.0.0",
"id": 123,
"data": {
"id": 123,
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_ANYTIME",
"sendingType": "DEFAULT",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-09T08:22:35.000Z",
"arguments": {
"name": "String",
"resetLink": "Link",
"birthCountry": "LocaleRegion",
"attached.pdf": "Attachment",
"image_png": "EmbeddedImage",
"qrCodeImage": "QrInfo"
}
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error in the request
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Unrecognized object to modify",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X PUT 'https://communications.masstack.com/v2/types/password_reset' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_8AM8PM",
"sendingType": "EXTERNAL",
"arguments": [
{
"name": "userName",
"type": "String",
"sensitive": false
},
{
"name": "bonusList",
"type": "StringList",
"sensitive": false
},
{
"name": "productNameAndInfo",
"type": "StringMap",
"sensitive": false
},
{
"name": "maxRetries",
"type": "Number",
"sensitive": false
},
{
"name": "resetLink",
"type": "Link",
"sensitive": true
},
{
"name": "birthCountry",
"type": "LocaleRegion",
"sensitive": false
},
{
"name": "expiration",
"type": "Date",
"sensitive": false
},
{
"name": "mfaRequired",
"type": "Boolean",
"sensitive": false
},
{
"name": "attached.pdf",
"type": "Attachment",
"sensitive": false
},
{
"name": "image_png",
"type": "EmbeddedImage",
"sensitive": false
},
{
"name": "qrCodeImage",
"type": "QrInfo",
"sensitive": false
},
{
"name": "attachments",
"type": "AttachmentsMap",
"sensitive": false
}
],
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Deletes the communication type according to its code
PATH PARAMETERS
The communication type code
OK Communication type deleted successfully
{
"commit": "v2.0.0",
"data": {
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"sendingType": "DEFAULT",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-06T12:33:51.087Z",
"arguments": {
"name": "String",
"resetLink": "Link"
}
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Communication type still in use",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Not Found Communication type not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X DELETE 'https://communications.masstack.com/v2/types/password_reset' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Get all communication types in mas-comms database
QUERY PARAMETERS
Communication type. Allows EQ (type=password_reset), IN (type[in]=password_reset,portability_ok), and CONTAINS(type[contains]=reset) operations
Description for communication type. Allows CONTAINS (description[contains]=password) operation
Realtime sending of communication type. Allows EQ (realTimeRequired=true) operation
Delivery window of communication type. Allows EQ (deliveryWindow=ANYDAY_ANYTIME), and IN (delivery_window[in]=ANYDAY_ANYTIME,ANYDAY_8AM8PM) operations
Sending provider for communication type. Allows EQ (sendingType=DEFAULT) operation
Argument present in communication type. Allows EQ (argument=name), and CONTAINS (argument[contains]=nam) operations
Sensitive argument present in communication type. Allows EQ (sensitive=true) operations
Limit of results in the response
Offset applied to results for pagination
Accepted Requested types
{
"commit": "N/A",
"items": [
{
"code": "test",
"description": "Test",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_ANYTIME",
"sendingType": "DEFAULT",
"arguments": {},
"createdTime": "2022-06-20T08:13:53.614826Z",
"updatedTime": "2022-06-20T08:13:53.614826Z",
"newArguments": {}
},
{
"code": "password_recovery",
"description": "Communication to retrieve lost password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_ANYTIME",
"sendingType": "DEFAULT",
"arguments": {},
"createdTime": "2022-06-20T08:17:29.435355Z",
"updatedTime": "2022-06-20T08:17:29.435355Z",
"newArguments": {}
}
]
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
items | object[] | All types available in database | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Type used for search | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description | string | Description used for search | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
realTimeRequired | string | Search based on real time required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deliveryWindow | string | Delivery window used for search | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sendingType | string | Sending type used for search | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
argument | string | Argument used for search | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sensitive | string | Search based on sensitive arguments | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
limit | integer (int32) | Max number of communication types retrieved | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
offset | integer (int32) | Offset used to paginate in conjunction with limit | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
total | integer (int32) | Total number of records | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/types?type=password_reset&description=password&realTimeRequired=true&deliveryWindow=ANYDAY_ANYTIME&sendingType=DEFAULT&argument=name&sensitive=true&limit=20&offset=0' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' This service allows the creation of new communication types to be used in any organization.This service can be call only by MasCommunications administration service accounts
Communication type values
{
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_8AM8PM",
"sendingType": "EXTERNAL",
"arguments": [
{
"name": "userName",
"type": "String",
"sensitive": false
},
{
"name": "bonusList",
"type": "StringList",
"sensitive": false
},
{
"name": "productNameAndInfo",
"type": "StringMap",
"sensitive": false
},
{
"name": "maxRetries",
"type": "Number",
"sensitive": false
},
{
"name": "resetLink",
"type": "Link",
"sensitive": true
},
{
"name": "birthCountry",
"type": "LocaleRegion",
"sensitive": false
},
{
"name": "expiration",
"type": "Date",
"sensitive": false
},
{
"name": "mfaRequired",
"type": "Boolean",
"sensitive": false
},
{
"name": "attached.pdf",
"type": "Attachment",
"sensitive": false
},
{
"name": "image_png",
"type": "EmbeddedImage",
"sensitive": false
},
{
"name": "qrCodeImage",
"type": "QrInfo",
"sensitive": false
},
{
"name": "attachments",
"type": "AttachmentsMap",
"sensitive": false
}
],
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
code* | string | Unique identification code for the communication type. It can only contain alphanumeric characters separated with underscores. It is validated under this regular expression: ^[a-z0-9][a-z0-9_]{0,38}[a-z0-9]$ | maxLength: 40 | |||||||||||||||||||||
description* | string | Long text description of the communication purpose | ||||||||||||||||||||||
realTimeRequired | boolean | Flag indicating if the communication early delivery is critical. Communications with real time requirement are handled with higher priority than the others in case of overload | false | |||||||||||||||||||||
deliveryWindow | string | Communication's delivery window. It is used to define the time slot in which the communication can be sent. Possible values are always preceded by ANYDAY_ and any valid window within the same day. For example: ANYDAY_ANYTIME, ANYDAY_8AM8PM, ANYDAY_8AM12PM, ANYDAY_12PM4PM or ANYDAY_4PM8PM. | "ANYDAY_ANYTIME" | |||||||||||||||||||||
sendingType | string | If set to EXTERNAL, an external provider will be used to send the communication SMS. Possible values are: DEFAULT, EXTERNAL, BATCH, PREPAID | "DEFAULT" | |||||||||||||||||||||
arguments* | object[] | Variable arguments that can be used in the communication and its type: String, StringList, StringMap, Number, Link,LocaleRegion, Date, Boolean, Attachment, EmbeddedImage or QrInfo | ||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||
requestRef | string | Reference of issue where example was requested | ||||||||||||||||||||||
Accepted Communication type successfully created
{
"commit": "v2.0.0",
"data": {
"id": 123,
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindows": "ANYDAY_ANYTIME",
"sendingType": "DEFAULT",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-06T12:33:51.087Z",
"arguments": {
"name": "String",
"resetLink": "Link",
"birthCountry": "LocaleRegion",
"attached.pdf": "Attachment",
"image_png": "EmbeddedImage",
"qrCodeImage": "QrInfo"
}
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error in the request
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] The code is mandatory",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/types' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_8AM8PM",
"sendingType": "EXTERNAL",
"arguments": [
{
"name": "userName",
"type": "String",
"sensitive": false
},
{
"name": "bonusList",
"type": "StringList",
"sensitive": false
},
{
"name": "productNameAndInfo",
"type": "StringMap",
"sensitive": false
},
{
"name": "maxRetries",
"type": "Number",
"sensitive": false
},
{
"name": "resetLink",
"type": "Link",
"sensitive": true
},
{
"name": "birthCountry",
"type": "LocaleRegion",
"sensitive": false
},
{
"name": "expiration",
"type": "Date",
"sensitive": false
},
{
"name": "mfaRequired",
"type": "Boolean",
"sensitive": false
},
{
"name": "attached.pdf",
"type": "Attachment",
"sensitive": false
},
{
"name": "image_png",
"type": "EmbeddedImage",
"sensitive": false
},
{
"name": "qrCodeImage",
"type": "QrInfo",
"sensitive": false
},
{
"name": "attachments",
"type": "AttachmentsMap",
"sensitive": false
}
],
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Get an example by its Id
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
The example Id
Accepted Example found and returned
{
"commit": "v2.10.1",
"id": "57cff118-984f-473c-a6ad-5ba51baed0dd",
"data": {
"objectId": "1",
"objectType": "sms_example",
"id": "4e95a8bb-1616-4505-942e-007358e2f1e4",
"type": "password_reset",
"language": "es",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
},
"expectedOutput": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"createdClientId": "masstack.auth.masmovil.com",
"updatedClientId": "masstack.auth.masmovil.com",
"createdAgentId": "agent@masmovil.com",
"updatedAgentId": "agent@masmovil.com",
"changeType": "draft"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Not Found Example not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/orgs/yoigo/examples/c8036149-f8e4-442e-8e98-90fd3a6ec352' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Updates an existing example
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
The example Id
Request body to create an example in JSON format
{
"id": "30387cbc-e3da-4c2a-be92-8aad3438908a",
"type": "password_reset",
"language": "en",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"expectedOutput": {
"senderInfo": "MasMovil",
"content": "Bienvenido a MasMovil!"
},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
}
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
id | string (uuid) | UUID to be used as identifier of the example. It must be unique in the system | |||||||
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Example's language(ISO 639-1) | |||||||
channel* | string | Channel of example | |||||||
requestRef | string | Reference of issue where example was requested | |||||||
description | string | Comprehensive description of the purpose of the example | |||||||
expectedOutput* | object | object | object | Expected output required for the example definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Input arguments used in the example. Name and value of arguments must be coherent with registered type's arguments. | |||||||
| |||||||||
OK Communication example successfully updated
{
"commit": "v2.10.1",
"id": "57cff118-984f-473c-a6ad-5ba51baed0dd",
"data": {
"objectId": "1",
"objectType": "sms_example",
"id": "4e95a8bb-1616-4505-942e-007358e2f1e4",
"type": "password_reset",
"language": "es",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
},
"expectedOutput": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"createdClientId": "masstack.auth.masmovil.com",
"updatedClientId": "masstack.auth.masmovil.com",
"createdAgentId": "agent@masmovil.com",
"updatedAgentId": "agent@masmovil.com",
"changeType": "draft"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Subject max length exceeded",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Templates service temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X PUT 'https://communications.masstack.com/v2/orgs/yoigo/examples/c8036149-f8e4-442e-8e98-90fd3a6ec352' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"id": "30387cbc-e3da-4c2a-be92-8aad3438908a",
"type": "password_reset",
"language": "en",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"expectedOutput": {
"senderInfo": "MasMovil",
"content": "Bienvenido a MasMovil!"
},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
}
}' Deletes an example by its ID
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
The example Id
OK Deleted example
{
"commit": "v2.10.1",
"id": "57cff118-984f-473c-a6ad-5ba51baed0dd",
"data": {
"objectId": "1",
"objectType": "sms_example",
"id": "4e95a8bb-1616-4505-942e-007358e2f1e4",
"type": "password_reset",
"language": "es",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
},
"expectedOutput": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"createdClientId": "masstack.auth.masmovil.com",
"updatedClientId": "masstack.auth.masmovil.com",
"createdAgentId": "agent@masmovil.com",
"updatedAgentId": "agent@masmovil.com",
"changeType": "draft"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Not Found Example not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X DELETE 'https://communications.masstack.com/v2/orgs/yoigo/examples/c8036149-f8e4-442e-8e98-90fd3a6ec352' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' This service returns the list of communication examples for the given filters
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
QUERY PARAMETERS
Communication type. Allows EQ (type=password_reset), and CONTAINS (type[contains]=password) operations
Template language
Template channel
Example description. Allows EQ (description=Shipping in transit), and CONTAINS (description[contains]=shipping) operations
Example request reference. Allows EQ (requestRef=https://jira.com/CUCO-123), and CONTAINS (requestRef[contains]=CUCO-123) operations
Email example expected subject. Allows EQ (subject=Welcome to masmovil), and CONTAINS (subject[contains]=Welcome) operations
Expected content for example. Allows EQ (content=Your portability is done), and CONTAINS (content[contains]=portability) operations
Limit of results in the response
Offset applied to results for pagination
Accepted Found examples
{
"commit": "v2.25.0",
"data": {
"items": [
{
"type": "test_communication_type",
"language": "es",
"channel": "sms",
"requestRef": "CUCO-TEST",
"description": "Test comm for behaviour validation",
"arguments": {
"date": "2023-06-20T08:27:56.962771Z",
"number": 3,
"boolean": true,
"stringList": [
"value1",
"value2"
],
"name": "Pepe",
"link": "https://masmovil.es/",
"stringMap": {
"key1": "argument1",
"key2": "argument2"
}
},
"expectedOutput": {
"senderInfo": "Test",
"content": "Hello! This is a test"
},
"createdTime": "2023-06-28T11:47:15.210302Z",
"updatedTime": "2023-06-28T11:47:15.210302Z"
},
{
"type": "test_communication_type",
"language": "es",
"channel": "email",
"requestRef": "CUCO-TEST",
"description": "Test comm for behaviour validation",
"arguments": {
"date": "2023-06-20T08:27:56.962771Z",
"number": 3,
"boolean": true,
"stringList": [
"value1",
"value2"
],
"name": "Pepe",
"link": "https://masmovil.es/",
"stringMap": {
"key1": "argument1",
"key2": "argument2"
}
},
"expectedOutput": {
"from": {
"email": "test@cuco.com",
"name": "MasMovil"
},
"subject": "Test email communication"
},
"createdTime": "2023-06-28T11:51:03.956124Z",
"updatedTime": "2023-06-28T11:51:03.956124Z"
},
{
"type": "test_communication_type",
"language": "es",
"channel": "whatsapp",
"requestRef": "CUCO-TEST",
"description": "Test comm for behaviour validation",
"arguments": {
"number": 3,
"name": "Pepe",
"link": "https://masmovil.es/"
},
"expectedOutput": {
"content": "{\n \"handoffId\": \"MASMOVIL_TEST_COMMUNICATION_TYPE_ES\",\n \"1\": 3,\n \"2\": \"Pepe\",\n \"3\": \"https://masmovil.es/\"\n }"
},
"createdTime": "2023-06-28T11:47:15.210302Z",
"updatedTime": "2023-06-28T11:47:15.210302Z"
}
],
"offset": "0",
"limit": "50",
"total": "3"
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_006",
"title": "COMMUNICATIONS_X_X_X",
"details": "[COMMUNICATIONS] Internal Server Error: Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/orgs/yoigo/examples?type=password_reset&language=en&channel=sms&description=Shipping%20in%20transit&requestRef=https%3A%2F%2Fjira.com%2FCUCO-123&subject=Welcome%20to%20masmovil&content=Your%20portability%20is%20done&limit=20&offset=0' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Adds a new example of a specific type, channel, language and set of arguments. This service can only be called by MasCommunications administration service accounts
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Request body to create an example in JSON format
{
"id": "30387cbc-e3da-4c2a-be92-8aad3438908a",
"type": "password_reset",
"language": "en",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"expectedOutput": {
"senderInfo": "MasMovil",
"content": "Bienvenido a MasMovil!"
},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
}
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
id | string (uuid) | UUID to be used as identifier of the example. It must be unique in the system | |||||||
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Example's language(ISO 639-1) | |||||||
channel* | string | Channel of example | |||||||
requestRef | string | Reference of issue where example was requested | |||||||
description | string | Comprehensive description of the purpose of the example | |||||||
expectedOutput* | object | object | object | Expected output required for the example definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Input arguments used in the example. Name and value of arguments must be coherent with registered type's arguments. | |||||||
| |||||||||
Accepted Communication example successfully created
{
"commit": "v2.10.1",
"id": "57cff118-984f-473c-a6ad-5ba51baed0dd",
"data": {
"objectId": "1",
"objectType": "sms_example",
"id": "4e95a8bb-1616-4505-942e-007358e2f1e4",
"type": "password_reset",
"language": "es",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
},
"expectedOutput": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"createdClientId": "masstack.auth.masmovil.com",
"updatedClientId": "masstack.auth.masmovil.com",
"createdAgentId": "agent@masmovil.com",
"updatedAgentId": "agent@masmovil.com",
"changeType": "draft"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] The communication type is mandatory",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Templates service temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/orgs/yoigo/examples' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"id": "30387cbc-e3da-4c2a-be92-8aad3438908a",
"type": "password_reset",
"language": "en",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"expectedOutput": {
"senderInfo": "MasMovil",
"content": "Bienvenido a MasMovil!"
},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
}
}' Validate an example against its previously loaded template
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
The example Id
OK Example validated successfully
{
"commit": "v2.10.1",
"id": "57cff118-984f-473c-a6ad-5ba51baed0dd",
"data": {
"pass": true,
"errors": [
{
"field": "string",
"expected": "string",
"returned": "string"
}
],
"id": "4e95a8bb-1616-4505-942e-007358e2f1e4",
"type": "password_reset",
"language": "es",
"channel": "sms",
"description": "Mobile subscription contract sending",
"changeType": "stable",
"output": {}
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Report of validated examples against the template | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Template not defined",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Not Found Example not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Not found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Templates service temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/orgs/yoigo/examples/c8036149-f8e4-442e-8e98-90fd3a6ec352/validate' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Search templates that matches criteria (channel, type, etc...) provided in the query
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
QUERY PARAMETERS
Communication type. Allows EQ (type=password_reset), and CONTAINS (type[contains]=password) operations
Template channel
Template language
Subject for email templates
Search template by partial content
Limit of results in the response
Offset applied to results for pagination
OK SMS templates successful search
{
"commit": "v2.0.0",
"items": [
{
"type": "password_reset",
"language": "en",
"channel": "sms",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-08T11:36:30.099Z",
"data": {
"senderInfo": "YOIGO",
"content": "Hi [(${name})], enter [(${resetLink})] to reset password"
}
},
{
"type": "password_reset",
"language": "en",
"channel": "email",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-08T11:36:30.099Z",
"data": {
"from": {
"email": "noreply@masmovil.com",
"name": "Masmovil info"
},
"subject": "Reset your password",
"mimeType": "text/html",
"content": "<h1>Hi [(${name})]!</h1> <p>Enter [(${resetLink})] to reset your password</p>"
}
},
{
"type": "password_reset",
"language": "en",
"channel": "whatsapp",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-08T11:36:30.099Z",
"data": {
"content": "{\n \"handoffId\": \"MASMOVIL_PASSWORD_RESET_TYPE_ES\",\n \"1\": \"Hi ${name}\",\n \"2\": \"${resetLink}\"\n }"
}
}
],
"type": "password_reset",
"channel": "sms",
"limit": "20",
"offset": "0",
"total": "3"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
items | object[] | Templates matching the provided criteria | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Communication type code according to the ones previously defined in the system | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
language | string | Template language | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel | string | Channel through which the communication will be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subject | string | Subject of the email template | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
limit | integer (int32) | Max number of templates retrieved | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
offset | integer (int32) | Offset used to paginate in conjunction with limit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
total | integer (int32) | Total number of records | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Missing query param 'type'",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/orgs/yoigo/templates?type=password_reset&channel=sms&language=en&subject=Shipping%20in%20transit&content=shipping%20is%20in%20transit&limit=20&offset=0' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Creates a new template of a specific type, channel and language. This service can be call only by MasCommunications administration service accounts
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Template values
{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Template language | |||||||
channel* | string | Template channel | |||||||
data* | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Parameters and assigned values that are required to render the specified template. Depending on the argument type they can be a string, a number, a boolean or an array. This field is only required when previewing templates | |||||||
| |||||||||
requestRef | string | Reference of issue where example was requested | |||||||
Accepted Communication template successfully created
{
"commit": "v2.10.1",
"objectId": "1",
"objectType": "sms_template",
"type": "password_reset",
"language": "es",
"channel": "sms",
"data": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"changeType": "draft"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||
objectId | string | Template id string | |||||||
objectType | string | Object type | |||||||
type | string | Communication type code according to the ones previously defined in the system | |||||||
language | string | Template language | |||||||
channel | string | Channel where the template is applicable | |||||||
data | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
createdTime | string | Template's creation date and time according to ISO 8601 format | |||||||
updatedTime | string | Last time the template was modified. Format according to ISO 8601 | |||||||
deletedTime | string | The time when template was deleted. Format according to ISO 8601 | |||||||
changeType* | string | Indicates if the change type (stable/draft/validated). | |||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] The type is mandatory",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/orgs/yoigo/templates' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Updates the template uniquely associated with provided type, channel and language. This service can be call only by MasCommunications administration service accounts
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Template values
{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Template language | |||||||
channel* | string | Template channel | |||||||
data* | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Parameters and assigned values that are required to render the specified template. Depending on the argument type they can be a string, a number, a boolean or an array. This field is only required when previewing templates | |||||||
| |||||||||
requestRef | string | Reference of issue where example was requested | |||||||
OK Communication template successfully updated
{
"commit": "v2.10.1",
"objectId": "1",
"objectType": "sms_template",
"type": "password_reset",
"language": "es",
"channel": "sms",
"data": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"changeType": "draft"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||
objectId | string | Template id string | |||||||
objectType | string | Object type | |||||||
type | string | Communication type code according to the ones previously defined in the system | |||||||
language | string | Template language | |||||||
channel | string | Channel where the template is applicable | |||||||
data | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
createdTime | string | Template's creation date and time according to ISO 8601 format | |||||||
updatedTime | string | Last time the template was modified. Format according to ISO 8601 | |||||||
deletedTime | string | The time when template was deleted. Format according to ISO 8601 | |||||||
changeType* | string | Indicates if the change type (stable/draft/validated). | |||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] The type is mandatory",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X PUT 'https://communications.masstack.com/v2/orgs/yoigo/templates' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Delete the template with type, language and channel provided in the query
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
QUERY PARAMETERS
Communication type
Template channel
Template language
OK Template successfully deleted
{
"commit": "v2.10.1",
"objectId": "1",
"objectType": "sms_template",
"type": "password_reset",
"language": "es",
"channel": "sms",
"data": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"changeType": "draft"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||
objectId | string | Template id string | |||||||
objectType | string | Object type | |||||||
type | string | Communication type code according to the ones previously defined in the system | |||||||
language | string | Template language | |||||||
channel | string | Channel where the template is applicable | |||||||
data | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
createdTime | string | Template's creation date and time according to ISO 8601 format | |||||||
updatedTime | string | Last time the template was modified. Format according to ISO 8601 | |||||||
deletedTime | string | The time when template was deleted. Format according to ISO 8601 | |||||||
changeType* | string | Indicates if the change type (stable/draft/validated). | |||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Missing query param 'type'",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Not Found Template not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X DELETE 'https://communications.masstack.com/v2/orgs/yoigo/templates?type=password_reset&channel=sms&language=en' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Returns a preview of the template for provided type, channel, language and given arguments
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Template values
{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Template language | |||||||
channel* | string | Template channel | |||||||
data* | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Parameters and assigned values that are required to render the specified template. Depending on the argument type they can be a string, a number, a boolean or an array. This field is only required when previewing templates | |||||||
| |||||||||
requestRef | string | Reference of issue where example was requested | |||||||
OK Template processed successfully
{
"commit": "v2.10.1",
"objectId": "1",
"objectType": "sms_template",
"type": "password_reset",
"language": "es",
"channel": "sms",
"data": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"changeType": "draft"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||
objectId | string | Template id string | |||||||
objectType | string | Object type | |||||||
type | string | Communication type code according to the ones previously defined in the system | |||||||
language | string | Template language | |||||||
channel | string | Channel where the template is applicable | |||||||
data | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
createdTime | string | Template's creation date and time according to ISO 8601 format | |||||||
updatedTime | string | Last time the template was modified. Format according to ISO 8601 | |||||||
deletedTime | string | The time when template was deleted. Format according to ISO 8601 | |||||||
changeType* | string | Indicates if the change type (stable/draft/validated). | |||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] The type is mandatory",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/orgs/yoigo/templates/preview' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Validates a template preview checking against its examples
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Template values
{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Template language | |||||||
channel* | string | Template channel | |||||||
data* | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Parameters and assigned values that are required to render the specified template. Depending on the argument type they can be a string, a number, a boolean or an array. This field is only required when previewing templates | |||||||
| |||||||||
requestRef | string | Reference of issue where example was requested | |||||||
Accepted Template validated successfully
{
"commit": "v2.0.0",
"type": "password_reset",
"language": "en",
"channel": "sms",
"pass": "true",
"report": [
{
"id": "44423434-5717-4562-b3fc-2c963f66afa6",
"description": "Example description 1",
"pass": "true"
},
{
"id": "a4e6ab9d-ccdb-4b4d-b3c3-07a387e31eff",
"description": "Example description 2",
"pass": "false",
"errors": [
{
"field": "content",
"expected": "Ya puedes restaurar tu [PASS]word",
"returned": "Ya puedes restaurar tu [pass]word"
}
]
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Validation examples missing",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/orgs/yoigo/templates/preview/validate' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Validates a template against its examples
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Template filters
{
"type": "password_reset",
"language": "en",
"channel": "sms"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | ||
language* | string | Template's language (ISO 639-1) | ||
channel* | string | Template's channel | ||
changeType | string | Change type of template, default is stable. Valid values: stable, draft. |
Accepted Template validated successfully
{
"commit": "v2.0.0",
"type": "password_reset",
"language": "en",
"channel": "sms",
"pass": "true",
"report": [
{
"id": "44423434-5717-4562-b3fc-2c963f66afa6",
"description": "Example description 1",
"pass": "true"
},
{
"id": "a4e6ab9d-ccdb-4b4d-b3c3-07a387e31eff",
"description": "Example description 2",
"pass": "false",
"errors": [
{
"field": "content",
"expected": "Ya puedes restaurar tu [PASS]word",
"returned": "Ya puedes restaurar tu [pass]word"
}
]
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Validation examples missing",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Not Found Template not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/orgs/yoigo/templates/validate' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channel": "sms"
}' Get info of a communication type according to its code
PATH PARAMETERS
The communication type code
QUERY PARAMETERS
Example changeType. Values can be 'draft', 'archived' or 'deleted'.Defaults is stable.
Accepted Found communication type
{
"commit": "v2.0.0",
"data": {
"objectId": "2",
"objectType": "communication_type",
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindows": "ANYDAY_ANYTIME",
"sendingType": "DEFAULT",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-09T08:22:35.000Z",
"arguments": [
{
"name": "link",
"type": "Link",
"sensitive": true
}
],
"changeType": "draft",
"version": "1.0"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Not Found Communication type not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/beta/types/password_reset?changeType=draft' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' This service allows the modification of communication type's fields and add new arguments
PATH PARAMETERS
The communication type code
Communication type values
{
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_8AM8PM",
"sendingType": "EXTERNAL",
"arguments": [
{
"name": "userName",
"type": "String",
"sensitive": false
},
{
"name": "bonusList",
"type": "StringList",
"sensitive": false
},
{
"name": "productNameAndInfo",
"type": "StringMap",
"sensitive": false
},
{
"name": "maxRetries",
"type": "Number",
"sensitive": false
},
{
"name": "resetLink",
"type": "Link",
"sensitive": true
},
{
"name": "birthCountry",
"type": "LocaleRegion",
"sensitive": false
},
{
"name": "expiration",
"type": "Date",
"sensitive": false
},
{
"name": "mfaRequired",
"type": "Boolean",
"sensitive": false
},
{
"name": "attached.pdf",
"type": "Attachment",
"sensitive": false
},
{
"name": "image_png",
"type": "EmbeddedImage",
"sensitive": false
},
{
"name": "qrCodeImage",
"type": "QrInfo",
"sensitive": false
},
{
"name": "attachments",
"type": "AttachmentsMap",
"sensitive": false
}
],
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
code* | string | Unique identification code for the communication type. It can only contain alphanumeric characters separated with underscores. It is validated under this regular expression: ^[a-z0-9][a-z0-9_]{0,38}[a-z0-9]$ | maxLength: 40 | |||||||||||||||||||||
description* | string | Long text description of the communication purpose | ||||||||||||||||||||||
realTimeRequired | boolean | Flag indicating if the communication early delivery is critical. Communications with real time requirement are handled with higher priority than the others in case of overload | false | |||||||||||||||||||||
deliveryWindow | string | Communication's delivery window. It is used to define the time slot in which the communication can be sent. Possible values are always preceded by ANYDAY_ and any valid window within the same day. For example: ANYDAY_ANYTIME, ANYDAY_8AM8PM, ANYDAY_8AM12PM, ANYDAY_12PM4PM or ANYDAY_4PM8PM. | "ANYDAY_ANYTIME" | |||||||||||||||||||||
sendingType | string | If set to EXTERNAL, an external provider will be used to send the communication SMS. Possible values are: DEFAULT, EXTERNAL, BATCH, PREPAID | "DEFAULT" | |||||||||||||||||||||
arguments* | object[] | Variable arguments that can be used in the communication and its type: String, StringList, StringMap, Number, Link,LocaleRegion, Date, Boolean, Attachment, EmbeddedImage or QrInfo | ||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||
requestRef | string | Reference of issue where example was requested | ||||||||||||||||||||||
OK Communication type successfully updated
{
"commit": "v2.0.0",
"id": "123",
"data": {
"objectId": "123",
"objectType": "communication_type",
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_ANYTIME",
"sendingType": "DEFAULT",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-09T08:22:35.000Z",
"arguments": [
{
"name": "link",
"type": "Link",
"sensitive": true
},
{
"name": "userEmail",
"type": "String",
"sensitive": false
},
{
"name": "request",
"type": "Boolean",
"sensitive": false
}
],
"changeType": "draft"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error in the request
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Unrecognized object to modify",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X PUT 'https://communications.masstack.com/v2/beta/types/password_reset' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_8AM8PM",
"sendingType": "EXTERNAL",
"arguments": [
{
"name": "userName",
"type": "String",
"sensitive": false
},
{
"name": "bonusList",
"type": "StringList",
"sensitive": false
},
{
"name": "productNameAndInfo",
"type": "StringMap",
"sensitive": false
},
{
"name": "maxRetries",
"type": "Number",
"sensitive": false
},
{
"name": "resetLink",
"type": "Link",
"sensitive": true
},
{
"name": "birthCountry",
"type": "LocaleRegion",
"sensitive": false
},
{
"name": "expiration",
"type": "Date",
"sensitive": false
},
{
"name": "mfaRequired",
"type": "Boolean",
"sensitive": false
},
{
"name": "attached.pdf",
"type": "Attachment",
"sensitive": false
},
{
"name": "image_png",
"type": "EmbeddedImage",
"sensitive": false
},
{
"name": "qrCodeImage",
"type": "QrInfo",
"sensitive": false
},
{
"name": "attachments",
"type": "AttachmentsMap",
"sensitive": false
}
],
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Deletes the communication type according to its code
PATH PARAMETERS
The communication type code
QUERY PARAMETERS
Example changeType. Values can be 'draft'.Defaults to including 'stable' and 'draft'.
OK Communication type deleted successfully
{
"commit": "v2.0.0",
"data": {
"objectId": "2",
"objectType": "communication_type",
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"sendingType": "DEFAULT",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-06T12:33:51.087Z",
"arguments": [
{
"name": "link",
"type": "Link",
"sensitive": true
},
{
"name": "userEmail",
"type": "String",
"sensitive": false
},
{
"name": "request",
"type": "Boolean",
"sensitive": false
}
],
"changeType": "draft"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Communication type still in use",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Not Found Communication type not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X DELETE 'https://communications.masstack.com/v2/beta/types/password_reset?changeType=draft' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Get all communication types in mas-comms database
QUERY PARAMETERS
Communication type. Allows EQ (type=password_reset), IN (type[in]=password_reset,portability_ok), and CONTAINS(type[contains]=reset) operations
Description for communication type. Allows CONTAINS (description[contains]=password) operation
Realtime sending of communication type. Allows EQ (realTimeRequired=true) operation
Delivery window of communication type. Allows EQ (deliveryWindow=ANYDAY_ANYTIME), and IN (delivery_window[in]=ANYDAY_ANYTIME,ANYDAY_8AM8PM) operations
Sending provider for communication type. Allows EQ (sendingType=DEFAULT) operation
Argument present in communication type. Allows EQ (argument=name), and CONTAINS (argument[contains]=nam) operations
Sensitive argument present in communication type. Allows EQ (sensitive=true) operations
Limit of results in the response
Offset applied to results for pagination
Communication changeType. Values can be 'draft', 'stable', 'archived' or 'deleted'.Defaults is stable.
Accepted Requested types
{
"commit": "N/A",
"items": [
{
"objectId": "1",
"objectType": "communication_type",
"code": "test",
"description": "Test",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_ANYTIME",
"sendingType": "DEFAULT",
"arguments": [],
"createdTime": "2022-06-20T09:13:53.614826Z",
"updatedTime": "2022-06-20T09:13:53.614826Z",
"changeType": "stable",
"version": "1.1"
},
{
"objectId": "1",
"objectType": "communication_type",
"code": "test",
"description": "Test",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_ANYTIME",
"sendingType": "DEFAULT",
"arguments": [],
"createdTime": "2022-06-20T08:13:53.614826Z",
"updatedTime": "2022-06-20T09:13:53.614826Z",
"changeType": "archived",
"version": "1.0"
},
{
"objectId": "2",
"objectType": "communication_type",
"code": "password_recovery",
"description": "Communication to retrieve lost password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_ANYTIME",
"sendingType": "DEFAULT",
"arguments": [],
"createdTime": "2022-06-20T08:17:29.435355Z",
"updatedTime": "2022-06-20T08:17:29.435355Z",
"changeType": "draft",
"version": "1.1"
}
]
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
items | object[] | All types available in database | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Type used for search | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description | string | Description used for search | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
realTimeRequired | string | Search based on real time required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
deliveryWindow | string | Delivery window used for search | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sendingType | string | Sending type used for search | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
argument | string | Argument used for search | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sensitive | string | Search based on sensitive arguments | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
limit | integer (int32) | Max number of communication types retrieved | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
offset | integer (int32) | Offset used to paginate in conjunction with limit | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
total | integer (int32) | Total number of records | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/beta/types?type=password_reset&description=password&realTimeRequired=true&deliveryWindow=ANYDAY_ANYTIME&sendingType=DEFAULT&argument=name&sensitive=true&limit=20&offset=0&changeType=stable' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' This service allows the creation of new communication types to be used in any organization.This service can be call only by MasCommunications administration service accounts
Communication type values
{
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_8AM8PM",
"sendingType": "EXTERNAL",
"arguments": [
{
"name": "userName",
"type": "String",
"sensitive": false
},
{
"name": "bonusList",
"type": "StringList",
"sensitive": false
},
{
"name": "productNameAndInfo",
"type": "StringMap",
"sensitive": false
},
{
"name": "maxRetries",
"type": "Number",
"sensitive": false
},
{
"name": "resetLink",
"type": "Link",
"sensitive": true
},
{
"name": "birthCountry",
"type": "LocaleRegion",
"sensitive": false
},
{
"name": "expiration",
"type": "Date",
"sensitive": false
},
{
"name": "mfaRequired",
"type": "Boolean",
"sensitive": false
},
{
"name": "attached.pdf",
"type": "Attachment",
"sensitive": false
},
{
"name": "image_png",
"type": "EmbeddedImage",
"sensitive": false
},
{
"name": "qrCodeImage",
"type": "QrInfo",
"sensitive": false
},
{
"name": "attachments",
"type": "AttachmentsMap",
"sensitive": false
}
],
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
code* | string | Unique identification code for the communication type. It can only contain alphanumeric characters separated with underscores. It is validated under this regular expression: ^[a-z0-9][a-z0-9_]{0,38}[a-z0-9]$ | maxLength: 40 | |||||||||||||||||||||
description* | string | Long text description of the communication purpose | ||||||||||||||||||||||
realTimeRequired | boolean | Flag indicating if the communication early delivery is critical. Communications with real time requirement are handled with higher priority than the others in case of overload | false | |||||||||||||||||||||
deliveryWindow | string | Communication's delivery window. It is used to define the time slot in which the communication can be sent. Possible values are always preceded by ANYDAY_ and any valid window within the same day. For example: ANYDAY_ANYTIME, ANYDAY_8AM8PM, ANYDAY_8AM12PM, ANYDAY_12PM4PM or ANYDAY_4PM8PM. | "ANYDAY_ANYTIME" | |||||||||||||||||||||
sendingType | string | If set to EXTERNAL, an external provider will be used to send the communication SMS. Possible values are: DEFAULT, EXTERNAL, BATCH, PREPAID | "DEFAULT" | |||||||||||||||||||||
arguments* | object[] | Variable arguments that can be used in the communication and its type: String, StringList, StringMap, Number, Link,LocaleRegion, Date, Boolean, Attachment, EmbeddedImage or QrInfo | ||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||
requestRef | string | Reference of issue where example was requested | ||||||||||||||||||||||
Accepted Communication type successfully created
{
"commit": "v2.0.0",
"data": {
"objectId": "123",
"objectType": "communication_type",
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindows": "ANYDAY_ANYTIME",
"sendingType": "DEFAULT",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-06T12:33:51.087Z",
"arguments": [
{
"name": "link",
"type": "Link",
"sensitive": true
}
],
"changeType": "draft"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error in the request
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] The code is mandatory",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | CommType] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/beta/types' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"code": "password_reset",
"description": "Provides the user a link to reset his password",
"realTimeRequired": true,
"deliveryWindow": "ANYDAY_8AM8PM",
"sendingType": "EXTERNAL",
"arguments": [
{
"name": "userName",
"type": "String",
"sensitive": false
},
{
"name": "bonusList",
"type": "StringList",
"sensitive": false
},
{
"name": "productNameAndInfo",
"type": "StringMap",
"sensitive": false
},
{
"name": "maxRetries",
"type": "Number",
"sensitive": false
},
{
"name": "resetLink",
"type": "Link",
"sensitive": true
},
{
"name": "birthCountry",
"type": "LocaleRegion",
"sensitive": false
},
{
"name": "expiration",
"type": "Date",
"sensitive": false
},
{
"name": "mfaRequired",
"type": "Boolean",
"sensitive": false
},
{
"name": "attached.pdf",
"type": "Attachment",
"sensitive": false
},
{
"name": "image_png",
"type": "EmbeddedImage",
"sensitive": false
},
{
"name": "qrCodeImage",
"type": "QrInfo",
"sensitive": false
},
{
"name": "attachments",
"type": "AttachmentsMap",
"sensitive": false
}
],
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Get an example by its Id
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
The example Id
QUERY PARAMETERS
Example changeType. Values can be 'draft', 'stable', 'archived' or 'deleted'Defaults is stable.
Accepted Example found and returned
{
"commit": "v2.10.1",
"id": "57cff118-984f-473c-a6ad-5ba51baed0dd",
"data": {
"objectId": "1",
"objectType": "sms_example",
"id": "4e95a8bb-1616-4505-942e-007358e2f1e4",
"type": "password_reset",
"language": "es",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
},
"expectedOutput": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"createdClientId": "masstack.auth.masmovil.com",
"updatedClientId": "masstack.auth.masmovil.com",
"createdAgentId": "agent@masmovil.com",
"updatedAgentId": "agent@masmovil.com",
"changeType": "draft"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Not Found Example not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/beta/orgs/yoigo/examples/c8036149-f8e4-442e-8e98-90fd3a6ec352?changeType=draft' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Updates an existing example
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
The example Id
Request body to create an example in JSON format
{
"id": "30387cbc-e3da-4c2a-be92-8aad3438908a",
"type": "password_reset",
"language": "en",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"expectedOutput": {
"senderInfo": "MasMovil",
"content": "Bienvenido a MasMovil!"
},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
}
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
id | string (uuid) | UUID to be used as identifier of the example. It must be unique in the system | |||||||
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Example's language(ISO 639-1) | |||||||
channel* | string | Channel of example | |||||||
requestRef | string | Reference of issue where example was requested | |||||||
description | string | Comprehensive description of the purpose of the example | |||||||
expectedOutput* | object | object | object | Expected output required for the example definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Input arguments used in the example. Name and value of arguments must be coherent with registered type's arguments. | |||||||
| |||||||||
OK Communication example successfully updated
{
"commit": "v2.10.1",
"id": "57cff118-984f-473c-a6ad-5ba51baed0dd",
"data": {
"objectId": "1",
"objectType": "sms_example",
"id": "4e95a8bb-1616-4505-942e-007358e2f1e4",
"type": "password_reset",
"language": "es",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
},
"expectedOutput": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"createdClientId": "masstack.auth.masmovil.com",
"updatedClientId": "masstack.auth.masmovil.com",
"createdAgentId": "agent@masmovil.com",
"updatedAgentId": "agent@masmovil.com",
"changeType": "draft"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Subject max length exceeded",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Templates service temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X PUT 'https://communications.masstack.com/v2/beta/orgs/yoigo/examples/c8036149-f8e4-442e-8e98-90fd3a6ec352' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"id": "30387cbc-e3da-4c2a-be92-8aad3438908a",
"type": "password_reset",
"language": "en",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"expectedOutput": {
"senderInfo": "MasMovil",
"content": "Bienvenido a MasMovil!"
},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
}
}' Deletes an example by its ID
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
The example Id
QUERY PARAMETERS
Example changeType. Values can be 'draft'.Defaults to including 'stable' and 'draft'.
OK Deleted example
{
"commit": "v2.10.1",
"id": "57cff118-984f-473c-a6ad-5ba51baed0dd",
"data": {
"objectId": "1",
"objectType": "sms_example",
"id": "4e95a8bb-1616-4505-942e-007358e2f1e4",
"type": "password_reset",
"language": "es",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
},
"expectedOutput": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"createdClientId": "masstack.auth.masmovil.com",
"updatedClientId": "masstack.auth.masmovil.com",
"createdAgentId": "agent@masmovil.com",
"updatedAgentId": "agent@masmovil.com",
"changeType": "draft"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Not Found Example not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X DELETE 'https://communications.masstack.com/v2/beta/orgs/yoigo/examples/c8036149-f8e4-442e-8e98-90fd3a6ec352?changeType=draft' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' This service returns the list of communication examples for the given filters
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
QUERY PARAMETERS
Communication type. Allows EQ (type=password_reset), and CONTAINS (type[contains]=password) operations
Template language
Template channel
Example description. Allows EQ (description=Shipping in transit), and CONTAINS (description[contains]=shipping) operations
Example request reference. Allows EQ (requestRef=https://jira.com/CUCO-123), and CONTAINS (requestRef[contains]=CUCO-123) operations
Email example expected subject. Allows EQ (subject=Welcome to masmovil), and CONTAINS (subject[contains]=Welcome) operations
Expected content for example. Allows EQ (content=Your portability is done), and CONTAINS (content[contains]=portability) operations
Limit of results in the response
Offset applied to results for pagination
Example changeType. Values can be 'draft', 'stable', 'archived' or 'deleted'.Defaults is stable.
Accepted Found examples
{
"commit": "v2.25.0",
"data": {
"items": [
{
"objectId": "ec169be3-f9e1-4927-b5dc-fe8e7f07ba0e",
"objectType": "sms_example",
"id": "ec169be3-f9e1-4927-b5dc-fe8e7f07ba0e",
"type": "test_communication_type",
"language": "es",
"channel": "sms",
"requestRef": "CUCO-TEST",
"description": "Test comm for behaviour validation",
"arguments": {
"date": "2023-06-20T08:27:56.962771Z",
"number": 3,
"boolean": true,
"stringList": [
"value1",
"value2"
],
"name": "Pepe",
"link": "https://masmovil.es/",
"stringMap": {
"key1": "argument1",
"key2": "argument2"
}
},
"expectedOutput": {
"senderInfo": "Test",
"content": "Hello! This is a test"
},
"createdTime": "2023-06-28T12:48:15.210302Z",
"updatedTime": "2023-06-28T12:48:15.210302Z",
"changeType": "draft",
"version": "1.1"
},
{
"objectId": "ec169be3-f9e1-4927-b5dc-fe8e7f07ba0e",
"objectType": "sms_example",
"id": "ec169be3-f9e1-4927-b5dc-fe8e7f07ba0e",
"type": "test_communication_type",
"language": "es",
"channel": "sms",
"requestRef": "CUCO-TEST",
"description": "Test comm for behaviour validation",
"arguments": {
"date": "2023-06-20T08:27:56.962771Z",
"number": 3,
"boolean": true,
"stringList": [
"value1",
"value2"
],
"name": "Pepe",
"link": "https://masmovil.es/",
"stringMap": {
"key1": "argument1",
"key2": "argument2"
}
},
"expectedOutput": {
"senderInfo": "Test",
"content": "Hello! This is a test!"
},
"createdTime": "2023-06-28T11:47:15.210302Z",
"updatedTime": "2023-06-28T11:47:15.210302Z",
"deletedTime": "2023-06-28T12:48:15.210302Z",
"changeType": "deleted",
"version": "1.0"
},
{
"objectId": "ab169ce3-f9e1-4927-b5dc-fe8e7f07ba0e",
"objectType": "email_example",
"id": "ab169ce3-f9e1-4927-b5dc-fe8e7f07ba0e",
"type": "test_communication_type",
"language": "es",
"channel": "email",
"requestRef": "CUCO-TEST",
"description": "Test comm for behaviour validation",
"arguments": {
"date": "2023-06-20T08:27:56.962771Z",
"number": 3,
"boolean": true,
"stringList": [
"value1",
"value2"
],
"name": "Pepe",
"link": "https://masmovil.es/",
"stringMap": {
"key1": "argument1",
"key2": "argument2"
}
},
"expectedOutput": {
"from": {
"email": "test@cuco.com",
"name": "MasMovil"
},
"subject": "Test email communication"
},
"createdTime": "2023-06-28T11:51:03.956124Z",
"updatedTime": "2023-06-28T11:51:03.956124Z",
"changeType": "stable",
"version": "1.0"
},
{
"objectId": "eq123ce3-f9e1-4927-b5dc-fe8e7f07ba0e",
"objectType": "whatsapp_example",
"type": "test_communication_type",
"language": "es",
"channel": "whatsapp",
"requestRef": "CUCO-TEST",
"description": "Test comm for behaviour validation",
"arguments": {
"number": 3,
"name": "Pepe",
"link": "https://masmovil.es/"
},
"expectedOutput": {
"content": "{\n \"handoffId\": \"MASMOVIL_TEST_COMMUNICATION_TYPE_ES\",\n \"1\": 3,\n \"2\": \"Pepe\",\n \"3\": \"https://masmovil.es/\"\n }"
},
"createdTime": "2023-06-28T11:47:15.210302Z",
"updatedTime": "2023-06-28T11:47:15.210302Z",
"changeType": "stable",
"version": "1.0"
}
],
"offset": "0",
"limit": "50",
"total": "4"
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_006",
"title": "COMMUNICATIONS_X_X_X",
"details": "[COMMUNICATIONS] Internal Server Error: Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/beta/orgs/yoigo/examples?type=password_reset&language=en&channel=sms&description=Shipping%20in%20transit&requestRef=https%3A%2F%2Fjira.com%2FCUCO-123&subject=Welcome%20to%20masmovil&content=Your%20portability%20is%20done&limit=20&offset=0&changeType=stable' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Adds a new example of a specific type, channel, language and set of arguments. This service can only be called by MasCommunications administration service accounts
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Request body to create an example in JSON format
{
"id": "30387cbc-e3da-4c2a-be92-8aad3438908a",
"type": "password_reset",
"language": "en",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"expectedOutput": {
"senderInfo": "MasMovil",
"content": "Bienvenido a MasMovil!"
},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
}
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
id | string (uuid) | UUID to be used as identifier of the example. It must be unique in the system | |||||||
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Example's language(ISO 639-1) | |||||||
channel* | string | Channel of example | |||||||
requestRef | string | Reference of issue where example was requested | |||||||
description | string | Comprehensive description of the purpose of the example | |||||||
expectedOutput* | object | object | object | Expected output required for the example definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Input arguments used in the example. Name and value of arguments must be coherent with registered type's arguments. | |||||||
| |||||||||
Accepted Communication example successfully created
{
"commit": "v2.10.1",
"id": "57cff118-984f-473c-a6ad-5ba51baed0dd",
"data": {
"objectId": "1",
"objectType": "sms_example",
"id": "4e95a8bb-1616-4505-942e-007358e2f1e4",
"type": "password_reset",
"language": "es",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
},
"expectedOutput": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"createdClientId": "masstack.auth.masmovil.com",
"updatedClientId": "masstack.auth.masmovil.com",
"createdAgentId": "agent@masmovil.com",
"updatedAgentId": "agent@masmovil.com",
"changeType": "draft"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] The communication type is mandatory",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Templates service temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/beta/orgs/yoigo/examples' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"id": "30387cbc-e3da-4c2a-be92-8aad3438908a",
"type": "password_reset",
"language": "en",
"channel": "sms",
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817",
"description": "Mobile subscription contract sending",
"expectedOutput": {
"senderInfo": "MasMovil",
"content": "Bienvenido a MasMovil!"
},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US"
}
}' Validate an example against its previously loaded template
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
The example Id
QUERY PARAMETERS
Example changeType. Values can be 'draft'.Defaults is 'stable'.
OK Example validated successfully
{
"commit": "v2.10.1",
"id": "57cff118-984f-473c-a6ad-5ba51baed0dd",
"data": {
"pass": true,
"errors": [
{
"field": "string",
"expected": "string",
"returned": "string"
}
],
"id": "4e95a8bb-1616-4505-942e-007358e2f1e4",
"type": "password_reset",
"language": "es",
"channel": "sms",
"description": "Mobile subscription contract sending",
"changeType": "stable",
"output": {}
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Report of validated examples against the template | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Template not defined",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Not Found Example not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Not found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES | Examples] Templates service temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/beta/orgs/yoigo/examples/c8036149-f8e4-442e-8e98-90fd3a6ec352/validate?changeType=draft' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Search templates that matches criteria (channel, type, etc...) provided in the query
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
QUERY PARAMETERS
Communication type. Allows EQ (type=password_reset), and CONTAINS (type[contains]=password) operations
Template channel
Template language
Subject for email templates
Search template by partial content
Limit of results in the response
Offset applied to results for pagination
Templates changeType. Values can be 'draft', 'stable', 'archived' or 'deleted'.Defaults is stable.
OK SMS templates successful search
{
"commit": "v2.0.0",
"items": [
{
"objectId": "1",
"objectType": "sms_template",
"type": "password_reset",
"language": "en",
"channel": "sms",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-08T11:36:30.099Z",
"data": {
"senderInfo": "YOIGO",
"content": "Hi [(${name})], enter [(${resetLink})] to reset password"
},
"changeType": "draft",
"version": "1.0"
},
{
"objectId": "1",
"objectType": "email_template",
"type": "password_reset",
"language": "en",
"channel": "email",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-08T11:36:30.099Z",
"data": {
"from": {
"email": "noreply@masmovil.com",
"name": "Masmovil info"
},
"subject": "Reset your password",
"mimeType": "text/html",
"content": "<h1>Hi [(${name})]!</h1> <p>Enter [(${resetLink})] to reset your password</p>"
},
"changeType": "stable",
"version": "1.0"
},
{
"objectId": "1",
"objectType": "whatsapp_template",
"type": "password_reset",
"language": "en",
"channel": "whatsapp",
"createdTime": "2021-02-06T12:33:51.087Z",
"updatedTime": "2021-02-08T11:36:30.099Z",
"deletedTime": "2021-02-09T13:36:30.099Z",
"data": {
"content": "{\n \"handoffId\": \"MASMOVIL_PASSWORD_RESET_TYPE_ES\",\n \"1\": \"Hi ${name}\",\n \"2\": \"${resetLink}\"\n }"
},
"changeType": "archived",
"version": "1.0"
}
],
"type": "password_reset",
"channel": "sms",
"limit": "20",
"offset": "0",
"total": "3"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
items | object[] | Templates matching the provided criteria | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Communication type code according to the ones previously defined in the system | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
language | string | Template language | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel | string | Channel through which the communication will be sent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subject | string | Subject of the email template | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
limit | integer (int32) | Max number of templates retrieved | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
offset | integer (int32) | Offset used to paginate in conjunction with limit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
total | integer (int32) | Total number of records | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Missing query param 'type'",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X GET 'https://communications.masstack.com/v2/beta/orgs/yoigo/templates?type=password_reset&channel=sms&language=en&subject=Shipping%20in%20transit&content=shipping%20is%20in%20transit&limit=20&offset=0&changeType=stable' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Creates a new template of a specific type, channel and language. This service can be call only by MasCommunications administration service accounts
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Template values
{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Template language | |||||||
channel* | string | Template channel | |||||||
data* | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Parameters and assigned values that are required to render the specified template. Depending on the argument type they can be a string, a number, a boolean or an array. This field is only required when previewing templates | |||||||
| |||||||||
requestRef | string | Reference of issue where example was requested | |||||||
Accepted Communication template successfully created
{
"commit": "v2.10.1",
"objectId": "1",
"objectType": "sms_template",
"type": "password_reset",
"language": "es",
"channel": "sms",
"data": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"changeType": "draft"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||
objectId | string | Template id string | |||||||
objectType | string | Object type | |||||||
type | string | Communication type code according to the ones previously defined in the system | |||||||
language | string | Template language | |||||||
channel | string | Channel where the template is applicable | |||||||
data | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
createdTime | string | Template's creation date and time according to ISO 8601 format | |||||||
updatedTime | string | Last time the template was modified. Format according to ISO 8601 | |||||||
deletedTime | string | The time when template was deleted. Format according to ISO 8601 | |||||||
changeType* | string | Indicates if the change type (stable/draft/validated). | |||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] The type is mandatory",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/beta/orgs/yoigo/templates' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Updates the template uniquely associated with provided type, channel and language. This service can be call only by MasCommunications administration service accounts
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Template values
{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Template language | |||||||
channel* | string | Template channel | |||||||
data* | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Parameters and assigned values that are required to render the specified template. Depending on the argument type they can be a string, a number, a boolean or an array. This field is only required when previewing templates | |||||||
| |||||||||
requestRef | string | Reference of issue where example was requested | |||||||
OK Communication template successfully updated
{
"commit": "v2.10.1",
"objectId": "1",
"objectType": "sms_template",
"type": "password_reset",
"language": "es",
"channel": "sms",
"data": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"changeType": "draft"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||
objectId | string | Template id string | |||||||
objectType | string | Object type | |||||||
type | string | Communication type code according to the ones previously defined in the system | |||||||
language | string | Template language | |||||||
channel | string | Channel where the template is applicable | |||||||
data | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
createdTime | string | Template's creation date and time according to ISO 8601 format | |||||||
updatedTime | string | Last time the template was modified. Format according to ISO 8601 | |||||||
deletedTime | string | The time when template was deleted. Format according to ISO 8601 | |||||||
changeType* | string | Indicates if the change type (stable/draft/validated). | |||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] The type is mandatory",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X PUT 'https://communications.masstack.com/v2/beta/orgs/yoigo/templates' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Delete the template with type, language and channel provided in the query
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
QUERY PARAMETERS
Communication type
Template channel
Template language
Example changeType. Values can be 'draft'.Defaults to including 'stable' and 'draft'.
OK Template successfully deleted
{
"commit": "v2.10.1",
"objectId": "1",
"objectType": "sms_template",
"type": "password_reset",
"language": "es",
"channel": "sms",
"data": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"changeType": "draft"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||
objectId | string | Template id string | |||||||
objectType | string | Object type | |||||||
type | string | Communication type code according to the ones previously defined in the system | |||||||
language | string | Template language | |||||||
channel | string | Channel where the template is applicable | |||||||
data | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
createdTime | string | Template's creation date and time according to ISO 8601 format | |||||||
updatedTime | string | Last time the template was modified. Format according to ISO 8601 | |||||||
deletedTime | string | The time when template was deleted. Format according to ISO 8601 | |||||||
changeType* | string | Indicates if the change type (stable/draft/validated). | |||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Missing query param 'type'",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Not Found Template not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X DELETE 'https://communications.masstack.com/v2/beta/orgs/yoigo/templates?type=password_reset&channel=sms&language=en&changeType=draft' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Download deployment package
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Deployment selection for the export package. Allows cherry-picking specific objects to include in the deployment.
{
"download": [
{
"objectId": "4303f2af-a9cf-4020-b6f1-fb1afa110cb4",
"objectType": "email_example"
},
{
"objectId": "1",
"objectType": "email_template"
},
{
"objectId": "1",
"objectType": "communication_type"
}
]
} | Property | Type | Description | Constraints | Default | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
download | object[] | List of objects to download for the deployment package | |||||||||||||||||
Array items:
| |||||||||||||||||||
OK Returns a JSON deployment package as an attachment.
{
"items": [
{
"communicationTypeCode": "monthly_invoice_3",
"objectId": "4303f2af-a9cf-4020-b6f1-fb1afa110cb4",
"objectType": "email_example",
"objectSnapshot": {
"id": "4303f2af-a9cf-4020-b6f1-fb1afa110cb4",
"language": "es",
"subject": "Factura YOIGO noviembre 2027"
}
},
{
"communicationTypeCode": "monthly_invoice_3",
"objectId": "1",
"objectType": "email_template",
"objectSnapshot": {
"id": 1,
"language": "es",
"subject": "Factura YOIGO noviembre 2025"
}
},
{
"communicationTypeCode": "monthly_invoice_3",
"objectId": "1",
"objectType": "communication_type",
"objectSnapshot": {
"id": 1,
"code": "monthly_invoice_3",
"description": "Invoice 2025 with the bill for last month"
}
}
]
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
items | object[] | List of export objects (templates, examples, communication types) in this package. Each object contains its full database snapshot as JSON. | |||||||||||||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] deployment package missing",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Not Found deployment package not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] deployment package Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/beta/orgs/yoigo/templates/download' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"download": [
{
"objectId": "4303f2af-a9cf-4020-b6f1-fb1afa110cb4",
"objectType": "email_example"
},
{
"objectId": "1",
"objectType": "email_template"
},
{
"objectId": "1",
"objectType": "communication_type"
}
]
}' Synchronize production configuration based on a deployment package JSON file.
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Deployment package JSON file
{
"file": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
file* | string (binary) | Deployment package JSON file |
OK Deployment package imported successfully
{
"overallStatus": "string",
"counts": {
"total": 0,
"errors": 0,
"success": 0
},
"communicationTypes": [
{
"objectType": "string",
"objectId": "string",
"communicationTypeCode": "string",
"channel": "string",
"language": "string",
"status": "string",
"operation": "string",
"errorMessage": "string"
}
],
"templates": [
{
"objectType": "string",
"objectId": "string",
"communicationTypeCode": "string",
"channel": "string",
"language": "string",
"status": "string",
"operation": "string",
"errorMessage": "string"
}
],
"examples": [
{
"objectType": "string",
"objectId": "string",
"communicationTypeCode": "string",
"channel": "string",
"language": "string",
"status": "string",
"operation": "string",
"errorMessage": "string"
}
]
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
overallStatus | string | Overall status of the import operation (SUCCESS, FAILED, PARTIAL_SUCCESS) | |||||||||||||||||||||||||||||||||||||||||||||||
counts | object | Import statistics | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
communicationTypes | object[] | Results for imported communication types | |||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||||||||||||||||||||||
templates | object[] | Results for imported templates | |||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||||||||||||||||||||||
examples | object[] | Results for imported examples | |||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Invalid deployment package or duplicate version
{
"errors": [
{
"code": "String info error code",
"title": "String info error title",
"details": "String info error message",
"ref": "String info error reference",
"httpStatusCode": 400
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server error
{
"errors": [
{
"code": "String info error code",
"title": "String info error title",
"details": "String info error message",
"ref": "String info error reference",
"httpStatusCode": 400
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/beta/orgs/yoigo/templates/import' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' \
-F 'file=@/path/to/file' Returns a preview of the template for provided type, channel, language and given arguments
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Template values
{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Template language | |||||||
channel* | string | Template channel | |||||||
data* | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Parameters and assigned values that are required to render the specified template. Depending on the argument type they can be a string, a number, a boolean or an array. This field is only required when previewing templates | |||||||
| |||||||||
requestRef | string | Reference of issue where example was requested | |||||||
OK Template processed successfully
{
"commit": "v2.10.1",
"objectId": "1",
"objectType": "sms_template",
"type": "password_reset",
"language": "es",
"channel": "sms",
"data": {},
"createdTime": "2021-01-01T14:00:00.000000Z",
"updatedTime": "2021-01-03T20:00:00.000000Z",
"deletedTime": "2021-01-03T20:00:00.000000Z",
"changeType": "draft"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||
objectId | string | Template id string | |||||||
objectType | string | Object type | |||||||
type | string | Communication type code according to the ones previously defined in the system | |||||||
language | string | Template language | |||||||
channel | string | Channel where the template is applicable | |||||||
data | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
createdTime | string | Template's creation date and time according to ISO 8601 format | |||||||
updatedTime | string | Last time the template was modified. Format according to ISO 8601 | |||||||
deletedTime | string | The time when template was deleted. Format according to ISO 8601 | |||||||
changeType* | string | Indicates if the change type (stable/draft/validated). | |||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] The type is mandatory",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/beta/orgs/yoigo/templates/preview' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Validates a template preview checking against its examples
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Template values
{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
} | Property | Type | Description | Constraints | Default | |||||
|---|---|---|---|---|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | |||||||
language* | string | Template language | |||||||
channel* | string | Template channel | |||||||
data* | object | object | object | Data required for the template definition. It is different depending on the channel | |||||||
| |||||||||
arguments | object | Parameters and assigned values that are required to render the specified template. Depending on the argument type they can be a string, a number, a boolean or an array. This field is only required when previewing templates | |||||||
| |||||||||
requestRef | string | Reference of issue where example was requested | |||||||
Accepted Template validated successfully
{
"commit": "v2.0.0",
"type": "password_reset",
"language": "en",
"channel": "sms",
"pass": "true",
"report": [
{
"pass": "true",
"id": "44423434-5717-4562-b3fc-2c963f66afa6",
"description": "Example description 1",
"changeType": "draft"
},
{
"pass": "false",
"errors": [
{
"field": "content",
"expected": "Ya puedes restaurar tu [PASS]word",
"returned": "Ya puedes restaurar tu [pass]word"
}
],
"id": "a4e6ab9d-ccdb-4b4d-b3c3-07a387e31eff",
"description": "Example description 2",
"changeType": "draft"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Validation examples missing",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/beta/orgs/yoigo/templates/preview/validate' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channel": "sms",
"data": {},
"arguments": {
"name": "Juan",
"subscriptions": [
"ftth",
"mobile",
"health"
],
"resetLink": "https://password.com/reset/123456",
"birthDate": "2022-04-25 12:00:00",
"vipClient": false,
"balance": 45.7,
"birthCountry": "US",
"attached.txt": "SG9sYSBQYWJsbyA6KQo=",
"embedded_image_png": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
"qrArgument": "Text to convert into QR Code"
},
"requestRef": "https://jiranext.masmovil.com/browse/CUCO-817"
}' Validates a template against its examples
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Template filters
{
"type": "password_reset",
"language": "en",
"channel": "sms",
"changeType": "draft"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
type* | string | Communication type code according to the ones previously defined in the system | ||
language* | string | Template's language (ISO 639-1) | ||
channel* | string | Template's channel | ||
changeType | string | Change type of template, default is stable. Valid values: stable, draft. |
Accepted Template validated successfully
{
"commit": "v2.0.0",
"type": "password_reset",
"language": "en",
"channel": "sms",
"pass": "true",
"report": [
{
"pass": "true",
"id": "44423434-5717-4562-b3fc-2c963f66afa6",
"description": "Example description 1",
"changeType": "draft"
},
{
"pass": "false",
"errors": [
{
"field": "content",
"expected": "Ya puedes restaurar tu [PASS]word",
"returned": "Ya puedes restaurar tu [pass]word"
}
],
"id": "a4e6ab9d-ccdb-4b4d-b3c3-07a387e31eff",
"description": "Example description 2",
"changeType": "draft"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id | string | Specific resource identifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data | object | Data content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Validation examples missing",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Not Found Template not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/beta/orgs/yoigo/templates/validate' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "en",
"channel": "sms",
"changeType": "draft"
}' Validates a template against its examples
Template commit filters
{
"commitItems": [
{
"objectId": "2",
"objectType": "sms_template"
},
{
"objectId": "1cd1d6c9-3188-4f12-bb55-1aa4a157ff86",
"objectType": "sms_example"
},
{
"objectId": "2",
"objectType": "communication_type"
}
],
"deletedItems": [
{
"objectId": "1",
"objectType": "sms_template"
},
{
"objectId": "0ab1d6c9-2166-4f12-aa55-1aa4a157ff86",
"objectType": "sms_example"
},
{
"objectId": "1",
"objectType": "communication_type"
}
]
} | Property | Type | Description | Constraints | Default | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commitItems* | object[] | List of items to be committed and marked as stable | |||||||||||||||||
Array items:
| |||||||||||||||||||
deletedItems* | object[] | List of items deleted that will be removed from delete list | |||||||||||||||||
Array items:
| |||||||||||||||||||
Accepted Template commit successfully
{
"commit": "v2.0.0",
"commitItems": [
{
"objectId": "2",
"objectType": "sms_template"
},
{
"objectId": "0cb1d6c9-2166-4f12-aa55-1aa4a157ff83",
"objectType": "sms_example"
},
{
"objectId": "2",
"objectType": "communication_type"
}
],
"promoteDeletedItemsToArchivedItem": [],
"itemsNotCommitted": [],
"deletedItemsNotCommitted": []
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | |||||||||||||||||||||||||||
commitItems | object[] | Items commited | |||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||
promoteDeletedItemsToArchivedItem | object[] | Items deleted promoted as archived | |||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||
itemsNotCommitted | object[] | Items not commited | |||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||
deletedItemsNotCommitted | object[] | Deleted items not commited | |||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||
Not Found Template not found
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Not Found",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"errors": [
{
"code": "COMMS_1XX",
"title": "TEMPLATES_X_X_X",
"details": "[TEMPLATES] Database temporary unavailable",
"ref": "https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/beta/commit' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"commitItems": [
{
"objectId": "2",
"objectType": "sms_template"
},
{
"objectId": "1cd1d6c9-3188-4f12-bb55-1aa4a157ff86",
"objectType": "sms_example"
},
{
"objectId": "2",
"objectType": "communication_type"
}
],
"deletedItems": [
{
"objectId": "1",
"objectType": "sms_template"
},
{
"objectId": "0ab1d6c9-2166-4f12-aa55-1aa4a157ff86",
"objectType": "sms_example"
},
{
"objectId": "1",
"objectType": "communication_type"
}
]
}' Implement an API endpoint to validate modified templates and related artifacts before deployment, with an option for targeted validation based on specific criteria.
PATH PARAMETERS
Organization name as it is registered in Mas-Stack
Validation values not mandatory
{
"type": "password_reset",
"language": "es",
"channel": "sms"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
type | string | Communication type code according to the ones previously defined in the system | ||
language | string | Template language | ||
channel | string
()
smsemailwhatsapp | Tipul canalului pentru comunicare. Valorile acceptate sunt 'sms' sau 'email'. |
OK Returned a list of elements validated
{
"commit": "v3.2.0",
"items": [
{
"type": "fixed_ip_setup",
"typeId": 1,
"objectType": "communication_type",
"changeType": "stable",
"channel": "sms",
"typeItems": [
{
"objectId": "f51efd29-c44e-4497-919b-dfddaab25f74",
"objectType": "sms_example",
"language": "es",
"changeType": "draft",
"errors": [
{
"field": null,
"expected": "Template not defined",
"returned": null
}
],
"content": "Recupera tu contraseña de acceso a tu área privada YO SOY MAS pinchando aquí: [(${linkVar.shorten(7)})]. Por tu seguridad, te recomendamos no compartir tus contraseñas con nadie. V5",
"eligibleForDeployment": false
}
],
"description": "Invoice with the bill for last month",
"eligibleForDeployment": false
},
{
"type": "fixed_ip_setup_x1",
"typeId": 3,
"objectType": "communication_type",
"changeType": "validated",
"channel": "sms",
"typeItems": [
{
"objectId": "1",
"objectType": "sms_template",
"language": "es",
"changeType": "validated",
"content": "Your link : [(${link.shorten(20)})]",
"eligibleForDeployment": true
},
{
"objectId": "918381fe-2740-4299-80ef-012f51044b62",
"objectType": "sms_example",
"language": "es",
"changeType": "validated",
"content": "Your link : yoigo.link/randomSuffix",
"eligibleForDeployment": true
}
],
"description": "Confirmation for activation of service without a new router needed for provision of service",
"eligibleForDeployment": true
},
{
"type": "fixed_ip_setup_x1",
"typeId": 3,
"objectType": "communication_type",
"changeType": "validated",
"channel": "email",
"typeItems": [
{
"objectId": "1",
"objectType": "email_template",
"language": "es",
"changeType": "draft",
"errors": [
{
"field": "fromAddress",
"expected": "noreply[1]@yoigo.com",
"returned": "noreply@yoigo.com"
}
],
"content": "UmVjdXBlcmFjacOzbiBkZSBjb250cmFzZcOxYSBbJHtsaW5rfV0=",
"eligibleForDeployment": false
},
{
"objectId": "0815a4c9-e7f1-4852-8d7f-31b01c85fadd",
"objectType": "email_example",
"language": "es",
"changeType": "draft",
"errors": [
{
"field": "fromAddress",
"expected": "noreply[1]@yoigo.com",
"returned": "noreply@yoigo.com"
}
],
"content": "Factura YOIGO noviembre 2022",
"eligibleForDeployment": false
},
{
"objectId": "0815a4c9-e7f1-4852-8d7f-31b01c85fadc",
"objectType": "email_example",
"language": "es",
"changeType": "validated",
"content": "Factura YOIGO noviembre 2022",
"eligibleForDeployment": true
},
{
"objectId": "1af12ddb-81e9-4994-b6e1-8aca474338e9",
"objectType": "email_example",
"language": "es",
"changeType": "validated",
"content": "Factura YOIGO noviembre 2023",
"eligibleForDeployment": true
}
],
"description": "Confirmation for activation of service without a new router needed for provision of service",
"eligibleForDeployment": true
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
commit | string | Service version handling the request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
items | object[] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request Client error
{
"commit": "v3.2.0",
"error": {
"message": "Provided organization 'mas' does not exist"
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
Internal Server Error Server Error
{
"commit": "v3.2.0",
"error": {
"message": "Database temporary unavailable"
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors | object[] | Error info | ||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||
curl -X POST 'https://communications.masstack.com/v2/beta/orgs/yoigo/commit/validation' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "password_reset",
"language": "es",
"channel": "sms"
}'