|
15 | 15 | "schemes": [
|
16 | 16 | "https"
|
17 | 17 | ],
|
18 |
| - "consumes": ["application/json"], |
19 |
| - "produces": ["application/json"], |
| 18 | + "consumes": [ |
| 19 | + "application/json" |
| 20 | + ], |
| 21 | + "produces": [ |
| 22 | + "application/json" |
| 23 | + ], |
20 | 24 | "paths": {
|
21 | 25 | "/dashboards/{dashboard_id}/contacts/{phone_number}/messages": {
|
22 | 26 | "get": {
|
|
263 | 267 | "/dashboards/{dashboard_id}/contacts/{phone_number}/conversations/archive": {
|
264 | 268 | "put": {
|
265 | 269 | "summary": "Archive a Conversation",
|
266 |
| - "description": "Archiving a conversation removes it from the results of all conversation retrieval endpoints. A conversation will be automatically unarchived if the customer sends a text to your Text Request number, or if you send the customer a text from your Text Request number. Archiving conversations is a good way to remove clutter from customers you don’t plan on talking to in the future. Note that if a customer texts in \"STOP\" to prevent you from sending them any further SMS messages, the conversation is automatically archived.", |
| 270 | + "description": "Archiving a conversation removes it from the results of all conversation retrieval endpoints. A conversation will be automatically unarchived if the customer sends a text to your Text Request number, or if you send the customer a text from your Text Request number. Archiving conversations is a good way to remove clutter from customers you don't plan on talking to in the future. Note that if a customer texts in \"STOP\" to prevent you from sending them any further SMS messages, the conversation is automatically archived.", |
267 | 271 | "operationId": "ArchiveConversation",
|
268 | 272 | "parameters": [
|
269 | 273 | {
|
|
1672 | 1676 | }
|
1673 | 1677 | ],
|
1674 | 1678 | "responses": {
|
1675 |
| - "204": { |
1676 |
| - "description": "The return payload when the request succeeds, but found no content to return.", |
| 1679 | + "200": { |
| 1680 | + "description": "The return payload when the request succeeds without any errors.", |
1677 | 1681 | "schema": {
|
1678 | 1682 | "type": "string"
|
1679 | 1683 | }
|
1680 | 1684 | },
|
| 1685 | + "204": { |
| 1686 | + "description": "The return payload when the request succeeds, but found no content to return." |
| 1687 | + }, |
1681 | 1688 | "400": {
|
1682 | 1689 | "description": "The return payload when the request has bad, missing, or invalid data."
|
1683 | 1690 | },
|
|
2782 | 2789 | }
|
2783 | 2790 | ],
|
2784 | 2791 | "responses": {
|
2785 |
| - "204": { |
2786 |
| - "description": "The return payload when the request succeeds, but found no content to return.", |
| 2792 | + "200": { |
| 2793 | + "description": "The return payload when the request succeeds without any errors.", |
2787 | 2794 | "schema": {
|
2788 | 2795 | "type": "string"
|
2789 | 2796 | }
|
2790 | 2797 | },
|
| 2798 | + "204": { |
| 2799 | + "description": "The return payload when the request succeeds, but found no content to return." |
| 2800 | + }, |
2791 | 2801 | "400": {
|
2792 | 2802 | "description": "The return payload when the request has bad, missing, or invalid data."
|
2793 | 2803 | },
|
|
3143 | 3153 | }
|
3144 | 3154 | }
|
3145 | 3155 | }
|
| 3156 | + }, |
| 3157 | + "/dashboards/{dashboard_id}/hooks": { |
| 3158 | + "x-ms-notification-content": { |
| 3159 | + "schema": { |
| 3160 | + "type": "object", |
| 3161 | + "properties": { |
| 3162 | + "messageUniqueIdentifier": { |
| 3163 | + "type": "string", |
| 3164 | + "description": "messageUniqueIdentifier" |
| 3165 | + }, |
| 3166 | + "account": { |
| 3167 | + "type": "object", |
| 3168 | + "properties": { |
| 3169 | + "id": { |
| 3170 | + "type": "integer", |
| 3171 | + "format": "int32", |
| 3172 | + "description": "id" |
| 3173 | + }, |
| 3174 | + "externalAccountId": { |
| 3175 | + "type": "string", |
| 3176 | + "description": "externalAccountId" |
| 3177 | + } |
| 3178 | + }, |
| 3179 | + "description": "account" |
| 3180 | + }, |
| 3181 | + "yourPhoneNumber": { |
| 3182 | + "type": "object", |
| 3183 | + "properties": { |
| 3184 | + "id": { |
| 3185 | + "type": "integer", |
| 3186 | + "format": "int32", |
| 3187 | + "description": "id" |
| 3188 | + }, |
| 3189 | + "externalPhoneId": { |
| 3190 | + "type": "string", |
| 3191 | + "description": "externalPhoneId" |
| 3192 | + }, |
| 3193 | + "description": { |
| 3194 | + "type": "string", |
| 3195 | + "description": "description" |
| 3196 | + }, |
| 3197 | + "phoneNumber": { |
| 3198 | + "type": "string", |
| 3199 | + "description": "phoneNumber" |
| 3200 | + } |
| 3201 | + }, |
| 3202 | + "description": "yourPhoneNumber" |
| 3203 | + }, |
| 3204 | + "conversation": { |
| 3205 | + "type": "object", |
| 3206 | + "properties": { |
| 3207 | + "id": { |
| 3208 | + "type": "integer", |
| 3209 | + "format": "int32", |
| 3210 | + "description": "id" |
| 3211 | + }, |
| 3212 | + "date": { |
| 3213 | + "type": "string", |
| 3214 | + "description": "date" |
| 3215 | + }, |
| 3216 | + "consumerPhoneNumber": { |
| 3217 | + "type": "string", |
| 3218 | + "description": "consumerPhoneNumber" |
| 3219 | + }, |
| 3220 | + "messageDirection": { |
| 3221 | + "type": "string", |
| 3222 | + "description": "messageDirection" |
| 3223 | + }, |
| 3224 | + "message": { |
| 3225 | + "type": "string", |
| 3226 | + "description": "message" |
| 3227 | + }, |
| 3228 | + "numSegments": { |
| 3229 | + "type": "integer", |
| 3230 | + "format": "int32", |
| 3231 | + "description": "numSegments" |
| 3232 | + }, |
| 3233 | + "status": { |
| 3234 | + "type": "string", |
| 3235 | + "description": "status" |
| 3236 | + }, |
| 3237 | + "claimedBy": { |
| 3238 | + "type": "string", |
| 3239 | + "description": "claimedBy" |
| 3240 | + }, |
| 3241 | + "consumerFriendlyName": { |
| 3242 | + "type": "string", |
| 3243 | + "description": "consumerFriendlyName" |
| 3244 | + }, |
| 3245 | + "mmsAttachments": { |
| 3246 | + "type": "array", |
| 3247 | + "items": {}, |
| 3248 | + "description": "mmsAttachments" |
| 3249 | + } |
| 3250 | + }, |
| 3251 | + "description": "conversation" |
| 3252 | + } |
| 3253 | + } |
| 3254 | + }, |
| 3255 | + "description": "Webhook info" |
| 3256 | + }, |
| 3257 | + "post": { |
| 3258 | + "x-ms-trigger": "single", |
| 3259 | + "summary": "Triggers when a text is sent or received", |
| 3260 | + "description": "Triggers when a text is sent or received", |
| 3261 | + "operationId": "TextingWebhook", |
| 3262 | + "parameters": [ |
| 3263 | + { |
| 3264 | + "name": "dashboard_id", |
| 3265 | + "description": "Id of dashboard to add trigger to", |
| 3266 | + "in": "path", |
| 3267 | + "required": true, |
| 3268 | + "type": "string", |
| 3269 | + "x-ms-summary": "Dashboard the trigger will listen to events from", |
| 3270 | + "x-ms-url-encoding": "single", |
| 3271 | + "x-ms-dynamic-values": { |
| 3272 | + "operationId": "GetDashboards", |
| 3273 | + "value-path": "id", |
| 3274 | + "value-collection": "items", |
| 3275 | + "value-title": "name", |
| 3276 | + "parameters": { |
| 3277 | + "page": 0, |
| 3278 | + "page_size": 50 |
| 3279 | + } |
| 3280 | + }, |
| 3281 | + "x-ms-visibility": "important" |
| 3282 | + }, |
| 3283 | + { |
| 3284 | + "name": "body", |
| 3285 | + "in": "body", |
| 3286 | + "required": true, |
| 3287 | + "schema": { |
| 3288 | + "type": "object", |
| 3289 | + "properties": { |
| 3290 | + "target_url": { |
| 3291 | + "type": "string", |
| 3292 | + "description": "Url the webhook will redirect to", |
| 3293 | + "x-ms-notification-url": true, |
| 3294 | + "title": "target_url", |
| 3295 | + "x-ms-visibility": "internal" |
| 3296 | + }, |
| 3297 | + "event": { |
| 3298 | + "type": "string", |
| 3299 | + "description": "event", |
| 3300 | + "title": "", |
| 3301 | + "x-ms-visibility": "important", |
| 3302 | + "enum": [ |
| 3303 | + "msg_received", |
| 3304 | + "msg_sent" |
| 3305 | + ] |
| 3306 | + }, |
| 3307 | + "httpVerb": { |
| 3308 | + "type": "string", |
| 3309 | + "description": "httpVerb", |
| 3310 | + "title": "", |
| 3311 | + "default": "POST", |
| 3312 | + "x-ms-visibility": "internal" |
| 3313 | + } |
| 3314 | + }, |
| 3315 | + "required": [ |
| 3316 | + "target_url", |
| 3317 | + "httpVerb", |
| 3318 | + "event" |
| 3319 | + ] |
| 3320 | + } |
| 3321 | + } |
| 3322 | + ], |
| 3323 | + "responses": { |
| 3324 | + "200": { |
| 3325 | + "description": "The return payload when the request succeeds without any errors.", |
| 3326 | + "schema": { |
| 3327 | + "type": "object", |
| 3328 | + "properties": { |
| 3329 | + "id": { |
| 3330 | + "type": "integer", |
| 3331 | + "format": "int32", |
| 3332 | + "description": "The numerical id of the dashboard." |
| 3333 | + }, |
| 3334 | + "target_url": { |
| 3335 | + "type": "string", |
| 3336 | + "description": "The url the webhook will post to" |
| 3337 | + }, |
| 3338 | + "event": { |
| 3339 | + "type": "string", |
| 3340 | + "description": "The webhook's associated trigger event" |
| 3341 | + } |
| 3342 | + } |
| 3343 | + } |
| 3344 | + }, |
| 3345 | + "400": { |
| 3346 | + "description": "The return payload when the request has bad, missing, or invalid data." |
| 3347 | + } |
| 3348 | + } |
| 3349 | + } |
3146 | 3350 | }
|
3147 | 3351 | },
|
3148 | 3352 | "definitions": {},
|
|
0 commit comments