-
Notifications
You must be signed in to change notification settings - Fork 132
/
VTEX - Message Center API.json
184 lines (184 loc) · 10.7 KB
/
VTEX - Message Center API.json
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Message Center API",
"description": "Message Center corresponds to [order transactional email templates](https://help.vtex.com/en/tutorial/order-transactional-email-templates--3g2S2kqBOoSGcCaqMYK2my). The store can configure templates to automatically send emails to customers and notify them about their order events, such as payment confirmation and shipping.\r\n\r\n## Message Center API Index \r\n\r\n### DKIM configuration\r\n\r\n- `POST` [Generate DKIM keys](https://developers.vtex.com/docs/api-reference/message-center-api#post-/api/mail-service/pvt/providers/-EmailProvider-/dkim)",
"license": {
"name": "MIT"
}
},
"servers": [
{
"url": "https://{accountName}.{environment}.com.br",
"description": "VTEX server URL.",
"variables": {
"accountName": {
"description": "Name of the VTEX account. Used as part of the URL.",
"default": "apiexamples"
},
"environment": {
"description": "Environment to use. Used as part of the URL.",
"enum": [
"vtexcommercestable"
],
"default": "vtexcommercestable"
}
}
}
],
"paths": {
"/api/mail-service/pvt/providers/{EmailProvider}/dkim": {
"post": {
"summary": "Generate DKIM keys",
"description": "Create [DKIM keys](https://developers.vtex.com/docs/guides/setting-up-dkim-for-transactional-emails) for a sender that was [set up](https://help.vtex.com/en/tracks/transactional-emails--6IkJwttMw5T84mlY9RifRP/42LVaxtFb2VHX9xTZU58qC) in VTEX mail servers. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Message Center | Providers | **Add or edit provider** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "createDKIM",
"tags": [
"DKIM configuration"
],
"parameters": [
{
"name": "EmailProvider",
"in": "path",
"required": true,
"description": "Email address for the sender that was set up in VTEX mail servers.",
"schema": {
"type": "string",
"example": "[email protected]"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "DKIM key creation response body object.",
"properties": {
"status": {
"type": "string",
"description": "DKIM key generating status in string format. For the response `emailNotFound` and `emailNotVerified`, the sender email should be [set up or revised](https://developers.vtex.com/docs/guides/setting-up-dkim-for-transactional-emails).",
"enum": [
"emailNotFound",
"emailNotVerified",
"created"
]
},
"dkimKeys": {
"type": "array",
"description": "This field returns DKIM keys when they were successfully created, and `null` when they were not.",
"items": {
"type": "string",
"description": "DKIM key values."
},
"nullable": true
}
}
},
"examples": {
"emailNotFound": {
"summary": "emailNotFound",
"value": {
"status": "emailNotFound",
"dkimKeys": null
}
},
"emailNotVerified": {
"summary": "emailNotVerified",
"value": {
"status": "emailNotVerified",
"dkimKeys": null
}
},
"created": {
"summary": "created",
"value": {
"status": "created",
"dkimKeys": [
"'n3zbltwizctxpgcmqrars4bmfdd3zlyo._domainkey.valdie.co','CNAME','n3zbltwizctxpgcmqrars4bmfdd3zlyo.dkim.amazonses.com'",
"'sq4iae4be52fhqq3wm44btttvndeecfv._domainkey.valdie.co','CNAME','sq4iae4be52fhqq3wm44btttvndeecfv.dkim.amazonses.com'",
"'n4z6g2g7yfy4pnhjklfesxrrkt4o2ha4._domainkey.valdie.co','CNAME','n4z6g2g7yfy4pnhjklfesxrrkt4o2ha4.dkim.amazonses.com'"
]
}
}
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "URL with information about the error code status type of the request."
},
"title": {
"type": "string",
"description": "Error status code title."
},
"status": {
"type": "integer",
"description": "Error status code number."
},
"traceId": {
"type": "string",
"description": "Trace ID value. For example, a store [creates a pattern](https://developers.vtex.com/docs/guides/setting-up-dkim-for-transactional-emails) like `^00-[0-9a-f]{32}-[0-9a-f]{16}-00$` and generates a `traceId` like `00-f8949e0e2a80ff4481b4375908349701-a6a7ecf8b50a2043-00`."
}
}
},
"example": {
"type": "https://tools.ietf.org/html/rfc7235#section-3.1",
"title": "Unauthorized",
"status": 401,
"traceId": "00-f8949e0e2a80ff4481b4375908349701-a6a7ecf8b50a2043-00"
}
}
}
}
}
}
}
},
"security": [
{
"appKey": [],
"appToken": []
},
{
"VtexIdclientAutCookie": []
}
],
"components": {
"securitySchemes": {
"appKey": {
"type": "apiKey",
"in": "header",
"name": "X-VTEX-API-AppKey",
"description": "Unique identifier of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys)."
},
"appToken": {
"type": "apiKey",
"in": "header",
"name": "X-VTEX-API-AppToken",
"description": "Secret token of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys)."
},
"VtexIdclientAutCookie": {
"type": "apiKey",
"in": "header",
"name": "VtexIdclientAutCookie",
"description": "[User token](https://developers.vtex.com/docs/guides/api-authentication-using-user-tokens), valid for 24 hours."
}
}
},
"tags": [
{
"name": "DKIM configuration"
}
]
}