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


Parameters

Name In Type Required Description
typeCode path string true The communication type code

Request example

1
2
3
4
5

curl -X GET https://communications.masstack.com/v2/types/password_reset \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
202 Accepted Found communication type CommunicationTypeResponse
404 Not Found Communication type not found ResponseErrorDto
500 Internal Server Error Server Error ResponseErrorDto

Parameters

Name In Type Required Description
typeCode path string true The communication type code
body body CommunicationTypeRequestDto true Communication type values

Request body - instance of CommunicationTypeRequestDto

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
  "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
    }
  ]
}
Name Type Required Description
code string true 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]$
description string true Long text description of the communication purpose
realTimeRequired boolean false 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
deliveryWindow string false 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.
sendingType string false If set to EXTERNAL, an external provider will be used to send the communication SMS. Possible values are: DEFAULT, EXTERNAL
arguments [ArgumentDefinitionDto] true Variable arguments that can be used in the communication and its type: String, StringList, StringMap, Number, Link,LocaleRegion, Date, Boolean, Attachment, EmbeddedImage or QrInfo

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

curl -X PUT https://communications.masstack.com/v2/types/password_reset \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --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
    }
  ]
}" 

Responses

Code Meaning Description Schema
200 OK Communication type successfully updated CommunicationTypeResponse
400 Bad Request Client error in the request ResponseErrorDto
500 Internal Server Error Server Error ResponseErrorDto

Parameters

Name In Type Required Description
typeCode path string true The communication type code

Request example

1
2
3
4
5

curl -X DELETE https://communications.masstack.com/v2/types/password_reset \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Communication type deleted successfully CommunicationTypeResponse
400 Bad Request Client error ResponseErrorDto
404 Not Found Communication type not found ResponseErrorDto
500 Internal Server Error Server Error ResponseErrorDto

Parameters

Name In Type Required Description
type query string false Communication type. Allows EQ (type=password_reset), IN (type[in]=password_reset,portability_ok), and CONTAINS(type[contains]=reset) operations
description query string false Description for communication type. Allows CONTAINS (description[contains]=password) operation
realTimeRequired query boolean false Realtime sending of communication type. Allows EQ (realTimeRequired=true) operation
deliveryWindow query string false Delivery window of communication type. Allows EQ (deliveryWindow=ANYDAY_ANYTIME), and IN (delivery_window[in]=ANYDAY_ANYTIME,ANYDAY_8AM8PM) operations
sendingType query string false Sending provider for communication type. Allows EQ (sendingType=DEFAULT) operation
argument query string false Argument present in communication type. Allows EQ (argument=name), and CONTAINS (argument[contains]=nam) operations
limit query integer(int64) false Limit of results in the response
offset query integer(int64) false Offset applied to results for pagination

Request example

1
2
3
4
5

curl -X GET https://communications.masstack.com/v2/types?type='password_reset'&description='password'&realTimeRequired='true'&deliveryWindow='ANYDAY_ANYTIME'&sendingType='DEFAULT'&argument='name'&limit='20'&offset='0' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
202 Accepted Requested types CommunicationTypeListResponseDto
500 Internal Server Error Server Error ResponseErrorDto

Parameters

Name In Type Required Description
body body CommunicationTypeRequestDto true Communication type values

Request body - instance of CommunicationTypeRequestDto

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
  "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
    }
  ]
}
Name Type Required Description
code string true 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]$
description string true Long text description of the communication purpose
realTimeRequired boolean false 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
deliveryWindow string false 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.
sendingType string false If set to EXTERNAL, an external provider will be used to send the communication SMS. Possible values are: DEFAULT, EXTERNAL
arguments [ArgumentDefinitionDto] true Variable arguments that can be used in the communication and its type: String, StringList, StringMap, Number, Link,LocaleRegion, Date, Boolean, Attachment, EmbeddedImage or QrInfo

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

curl -X POST https://communications.masstack.com/v2/types \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --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
    }
  ]
}" 

Responses

Code Meaning Description Schema
202 Accepted Communication type successfully created CommunicationTypeResponse
400 Bad Request Client error in the request ResponseErrorDto
500 Internal Server Error Server Error ResponseErrorDto

Endpoints

CMS

    Communications

      Short URLs

        Communication Types

          Examples

            Templates