Templates Commit Beta


Parameters

Name In Type Required Description
body body CommitRequestDto true Template commit filters

Request body - instance of CommitRequestDto

 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
{
  "commitItems": [
    {
      "objectId": "1",
      "objectType": "sms_template"
    },
    {
      "objectId": "4f266416-7394-419b-8c25-4783f80d37e6",
      "objectType": "sms_example"
    },
    {
      "objectId": "1",
      "objectType": "communication_type"
    }
  ],
  "deletedItems": [
    {
      "objectId": "2",
      "objectType": "sms_template"
    },
    {
      "objectId": "3g267416-7394-419b-8c25-4783f80d37e6",
      "objectType": "sms_example"
    },
    {
      "objectId": "2",
      "objectType": "communication_type"
    }
  ]
}
Name Type Required Description
commitItems [CommitItemDto] true List of items to be committed and marked as stable
deletedItems [CommitItemDto] true List of items deleted that will be removed from delete list

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

curl -X POST https://communications.masstack.com/v2/beta/commit \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'commitItems': [
    {
      'objectId': '1',
      'objectType': 'sms_template'
    },
    {
      'objectId': '4f266416-7394-419b-8c25-4783f80d37e6',
      'objectType': 'sms_example'
    },
    {
      'objectId': '1',
      'objectType': 'communication_type'
    }
  ],
  'deletedItems': [
    {
      'objectId': '2',
      'objectType': 'sms_template'
    },
    {
      'objectId': '3g267416-7394-419b-8c25-4783f80d37e6',
      'objectType': 'sms_example'
    },
    {
      'objectId': '2',
      'objectType': 'communication_type'
    }
  ]
}" 

Responses

Code Meaning Description Schema
202 Accepted Template commit successfully TemplateCommitResponseDto
404 Not Found Template not found ResponseErrorDto
500 Internal Server Error Server Error ResponseErrorDto

Parameters

Name In Type Required Description
org path string true Organization name as it is registered in Mas-Stack
body body CommitValidationRequestDTO false Validation values not mandatory

Request body - instance of CommitValidationRequestDTO

1
2
3
4
5
{
  "type": "password_reset",
  "language": "es",
  "channel": "sms"
}
Name Type Required Description
type string false Communication type code according to the ones previously defined in the system
language string false Template language
channel ChannelTypeDTO false Tipul canalului pentru comunicare. Valorile acceptate sunt ‘sms’ sau ‘email’.

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

curl -X POST https://communications.masstack.com/v2/beta/orgs/yoigo/commit/validation \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'type': 'password_reset',
  'language': 'es',
  'channel': 'sms'
}" 

Responses

Code Meaning Description Schema
200 OK Returned a list of elements validated CommitValidationResponseDTO
400 Bad Request Client error ResponseErrorDto
500 Internal Server Error Server Error ResponseErrorDto

Endpoints

CMS

    Communications

      Short URLs

        Communication Types

          Examples

            Templates

              Communication Types Beta

                Examples Beta

                  Templates Beta

                    Templates Commit Beta