-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.yaml
4707 lines (4651 loc) · 154 KB
/
openapi.yaml
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
title: Text Request API v3
description: >
This page contains documentation for Text Request's v3 API. [Click
here](https://www.textrequest.com/api/v2) for v2 documentation.
The Text Request API makes it easy to programmatically interact with your
Text Request account. It provides the ability to **send messages**,
**retrieve conversations**, **send payment requests**, **manage contacts,
groups, dashboards, and users**, and **create and delete web hooks**.
Web hooks allow you to get notifications when **messages are sent**, **new
messages are received**, **contacts are created**, **contacts are updated**,
**payment requests are updated**, and when **location requests are
received**.
# Security
All calls to the Text Request API will be authenticated with an API key. All
API keys will be transmitted in the request **x-api-key** header.
```
x-api-key: 095E5113DE4142C28FB7815CC10BEB56
```
Failure to specify an authorization header for any request will result in a
HTTP `400 (Bad Request)` response.
You can find your account's API key on your Text Request account:
* Log into Text Request as an administrator
* Click on the Integrations sidebar menu item
* Choose the API tile near the top of the screen. If your account does not
have api access, you can upgrade your account by clicking the "Buy Now"
option on the API tile.
* Copy your API Key from the box on-screen
# Error Handling
In the event of a failed request, the API will return an appropriate HTTP response code. If the error is due to an invalid request, a human readable error will also be returned is the response's *message* property. For blatantly obvious errors (`404 (Not Found)` responses, for example), this may be left blank.
Here's an example of an error response for an omitted field.
```
HTTP 400
Response Body
{
"status": 400,
"errorCode": null,
"message": "A first name must be specified."
}
```
# Pagination for Returned Collections
When querying a collection such as users or conversations, there may be thousands of results. To prevent responses from getting massively large, these collections are paginated. For any request to a resource that returns a collection, `page` and `page_size` querystring parameters may be specified to return a subset of entities.
API endpoints that return a collection also include `meta` properties in the response, specifying **the returned page**, **the returned page size**, and **the total number of items in the collection**.
Here's an example collection return, with the items represented by the ellipses (...):
```
HTTP 200
Response Body
{
"items": [
...
],
"meta": {
"page": 0,
"page_size": 100,
"total_items": 276
}
}
```
Here are the rules for how page, page_size, and link headers work:
* If omitted, page = 0 and page_size = 100 is implied.
* If page or page_size is invalid (negative number or non-numeric), a HTTP `400 (Bad Request)` response is returned.
* If page * page_size is greater than the number of entities in the collection, the `items` array will be empty.
* Collection `GET` requests will always return the `page`, `page_size`, and `total_items` properties.
# Web hook Payloads
Text Request has a variety of web hooks for hitting URLs you own if you want extra functionality in your own apps. Each webhook has a unique data payload that is sent whenever the trigger is set off. To see the payloads:
* Scroll down to the `POST /dashboards/{dashboard_id}/hooks` API call on this page
* Between the **Parameters** tab and the **Try it out** button, click the "Callbacks" tab
* Click to view the payload sent in any of these web hooks. The payload will be the same regardless of whether it's a `POST`, `PUT`, or `DELETE` request.
Web hooks can be created in the [web app](https://app.textrequest.com), or through the `POST` endpoint. Web hooks created by endpoints will not appear in the web app, but web hooks created in the web app will be seen by the `GET /dashboards/{dashboard_id}/hooks` api endpoint.
Now that security and pagination are out of the way, lets take a look at the endpoints. You can try out each endpoint from directly within your browser by clicking the Authorize button below and entering your Text Request API key.
version: 3.0.0
x-konfig-ignore:
potential-incorrect-type: true
servers:
- url: https://api.textrequest.com/api/v3
tags:
- description: Sending and receiving messages
name: Messages
- name: Payments
- description: Managing contacts
name: Contacts
- description: Get information on dashboards
name: Dashboard
- name: Conversations
- description: Managing custom fields
name: Custom Fields
- description: Managing contact tags
name: Tags
- description: Managing groups
name: Groups
- name: Users
- name: Keywords
- name: Webhooks
- name: Reviews
paths:
/mms:
post:
tags:
- Messages
summary: Post an MMS attachment to Text Request.
operationId: Messages_postMmsAttachment
description: >-
Use this endpoint to post an MMS attachment to Text Request. If
successful, mms details including a mms_id unique identifier will be
returned. You can use this mms_id when sending MMS messages through the
API. Valid file types are gif, jpeg, png, and mp4. The reason for first
uploading an MMS attachment is for speed during reuse. If you are
sending multiple messages, you can reuse a single uploaded MMS instead
of re-uploading the same attachment multiple times.
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/mms_media_upload'
responses:
'200':
description: The specified file was successfully uploaded to the dashboard.
content:
application/json:
schema:
$ref: '#/components/schemas/mms_media'
'400':
description: >-
Bad Request. Request parameters were either invalid or omitted. See
the error_message for more details.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
example:
error_message: >-
Invalid mime_type. Valid values are image/gif, image/jpeg,
image/png, and video/mp4.
'401':
description: >-
Unauthorized. Either the Authorization request header was missing,
in an invalid format, or the API key provided was invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
example:
error_message: The Authorization request header is missing.
/messages:
post:
tags:
- Messages
summary: Sends a message
operationId: Messages_sendMessageWithLocationRequestCallback
description: >
Sends a message through a dashboard in your Text Request account. You
can optionally specify a delivery status callback URL to track the
status of the message on a third-party site. If a delivery callback URL
is specified, you will receive either a delivered callback, or an error
callback with a status code explaining the issue. Messages are sent at
the throttle rate on your dashboard. The throttle rate is defined as
your 10DLC message rate, or at one message per second for non-10dlc
registered dashboards.
Sent messages can also include Location requests. Location requests are
urls sent in texts that contacts can access to send their location to
Text Request. This info will be shown in their queue, but can also be
sent via a callback to some third-party url.
Location requests can be done in one of two ways:
* Set geolocation_requested to true in the request body. This will add
the phrase "Go to *\<text request url\>* to share your location"
* Add the tag **[LocationRequest]** to your message body. This tag will
be replaced by the text request url.
Location requests can also have a callback that is returned when the
location request is completed by the contact. This information will be
sent as a POST request to the **location_callback** property. See the
callbacks tab below for the schema of the callback.
**WARNING:** The location_callback property only works with the
**[LocationRequest]** tag. If no tag exsits, even if
geolocation_requested is true, the callback will not work and the
send-message request will return a `400 (Bad Request)` exception.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/post_message_request'
responses:
'200':
description: >-
The message was received by Text Request, request fields were
validated, and it is being sent. This does not mean that the message
was successfully delivered - it is possible for a valid message to
be rejected and not delivered due to a number of factors such as an
invalid recipient, the destination handset being switched off, or if
the message is filtered as spam by the receiving carrier. For
delivery confirmation, please add a valid webhook URL for the
status_callback parameter.
content:
application/json:
schema:
$ref: '#/components/schemas/post_message_response'
'400':
description: >-
Bad request. Sent if required properties are omitted or invalid.
Check the return value to determine the reason that the message was
rejected.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
callbacks:
messageStatus:
status_callback:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/webhook_payload_message_status'
responses:
'200':
description: Your server returns this code if it accepts the callback
locationRequest:
location_callback:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/webhook_payload_location_callback'
responses:
'200':
description: Your server returns this code if it accepts the callback
/dashboards:
get:
tags:
- Dashboard
summary: Get all dashboards in an account.
operationId: Dashboard_listAllDashboards
description: Returns all dashboards in an account.
parameters:
- name: page
in: query
schema:
type: integer
default: 0
- name: page_size
in: query
schema:
type: integer
default: 100
responses:
'200':
description: All dashboards will be returned by this call.
content:
application/json:
schema:
$ref: '#/components/schemas/dashboard_response_container'
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
post:
tags:
- Dashboard
summary: Create a new dashboard with the given name and phone number
operationId: Dashboard_createNewDashboard
description: >-
Creates a new dashboard in the account. Once the dashboard is created,
admins will be emailed about the changed, and can begin assigning users.
This endpoint can make a dashboard for any provisioned numbers. You can
search for provisioned numbers in a specific area code using GET
/dashboards/provisioning. If the phone number is already in use, a Bad
Request exception will be thrown.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/post_dashboard_request'
responses:
'200':
description: The new dashboard.
content:
application/json:
schema:
$ref: '#/components/schemas/dashboard'
'400':
description: Bad request. Sent if required properties are omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/dashboards/{dashboard_id}:
get:
tags:
- Dashboard
summary: Get info on this specific dashboard
operationId: Dashboard_getInfo
description: Returns the name and phone of the dashboard.
parameters:
- description: Id of dashboard
name: dashboard_id
in: path
required: true
schema:
type: integer
example: 121
responses:
'200':
description: Info on the specified dashboard.
content:
application/json:
schema:
$ref: '#/components/schemas/dashboard'
'400':
description: Thrown if the dashboard id is invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
put:
tags:
- Dashboard
summary: Update a specific dashboard's name
operationId: Dashboard_updateName
description: >-
Updates a dashboard. This does not change a dashboard's phone number. If
you want a new number with another dashboard's contacts, you will have
to create a new dashboard with a POST and add the contacts with a bulk
export/import.
parameters:
- description: Id of dashboard
name: dashboard_id
in: path
required: true
schema:
type: integer
example: 121
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/put_dashboard_request'
responses:
'200':
description: Info on the specified dashboard.
content:
application/json:
schema:
$ref: '#/components/schemas/dashboard'
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
delete:
tags:
- Dashboard
summary: Deletes the specified dashboard.
operationId: Dashboard_deleteDashboardById
parameters:
- description: Id of dashboard
name: dashboard_id
in: path
required: true
schema:
type: integer
example: 121
responses:
'204':
description: The dashboard was deleted.
'400':
description: Thrown if the dashboard id or phone number is invalid.
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: Thrown if no dashboard with that id exists in the account.
/dashboards/provisioning:
get:
tags:
- Dashboard
summary: Get available provisioned numbers for hosting with a dashboard
operationId: Dashboard_getProvisionedNumbers
description: >-
Returns a list of 30 provisioning numbers. These numbers can be used for
creating a dashboard with POST /dashboards. All numbers and area codes
must be in the United States. Text Request only hosts numbers with the
+1 country code.
parameters:
- description: Area code to search for provisioned numbers of
name: area_code
in: query
required: true
schema:
type: integer
example: 423
responses:
'200':
description: Array of provisioned phone numbers
content:
application/json:
schema:
$ref: '#/components/schemas/DashboardGetProvisionedNumbersResponse'
'400':
description: Thrown if the provided area code is invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
example:
error_message: A three digit area code must be supplied.
error_code: parameterInvalid
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/dashboards/{dashboard_id}/conversations:
get:
tags:
- Conversations
summary: Retrieves all conversations for this dashboard.
operationId: Conversations_getAllDashboardMessages
description: Retrieves the last message across all conversations in this dashboard.
parameters:
- description: Id of dashboard
name: dashboard_id
in: path
required: true
schema:
type: integer
example: 121
- description: >-
List or singular guid referencing the contact tags you want to
filter by
name: tags
in: query
required: false
schema:
type: string
examples:
empty:
summary: Do Not Filter By Tags
value: ''
single:
summary: Singular tag
value: 00000000-0000-0000-0000-000000000000
multiple:
summary: Comma-separated list of tags
value: >-
00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111
- name: show_unresolved_only
in: query
required: false
schema:
type: boolean
- name: include_archived
in: query
required: false
schema:
type: boolean
- description: >-
Search term for filtering conversations by phone number or display
name. If the search term is less than a full name or phone number,
the search will return all conversations that partially match it.
name: search
in: query
required: false
schema:
type: string
examples:
empty:
summary: Do Not Search By Phone
value: ''
phone:
summary: Full phone number
value: 321-654-7890
partialphone:
summary: Partial phone number
value: 654-3210
name:
summary: Partial Display Name
value: Joe
- name: page
in: query
schema:
type: integer
default: 0
- name: page_size
in: query
schema:
type: integer
default: 100
responses:
'200':
description: Conversations.
content:
application/json:
schema:
$ref: '#/components/schemas/conversation_response_container'
'204':
description: No conversations exist in the provided dashboard.'
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/dashboards/{dashboard_id}/contacts/{phone_number}/messages:
get:
tags:
- Conversations
- Messages
summary: Get a conversation's messages by contact phone.
operationId: Conversations_getConversationMessagesByContactPhone
description: >-
Retrieves the conversation between the specified dashboard and phone
number.
parameters:
- description: Id of dashboard
name: dashboard_id
in: path
required: true
schema:
type: integer
example: 121
- description: Phone number
name: phone_number
in: path
required: true
schema:
type: string
- name: page
in: query
schema:
type: integer
default: 0
- name: page_size
in: query
schema:
type: integer
default: 100
responses:
'200':
description: Messages in the conversation.
content:
application/json:
schema:
$ref: '#/components/schemas/message_response_container'
'204':
description: No contact in the dashboard matches the provided number.'
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
post:
tags:
- Conversations
- Messages
summary: Send a message to the contact with the given phone number
operationId: Conversations_sendMessageToContact
description: >
Sends a message (starting a new conversation if the given phone number
has no message history). You can optionally specify a delivery status
callback URL to track the status of the message on a third-party site.
Upon successful execution, a message will be in a 'sent' status. If a
delivery callback URL is specified, you will receive either a delivered
callback, or an error callback with a status code explaining the issue.
Messages are sent at the throttle rate on your dashboard. The throttle
rate is defined as your 10DLC message rate, or at one message per second
for non-10dlc registered dashboards.
Sent messages can also include Location requests. Location requests are
urls sent in texts that contacts can access to send their location to
Text Request. This info will be shown in their queue, but can also be
sent via a callback to some third-party url.
Location requests can be done in one of two ways:
* Set geolocation_requested to true in the request body. This will add
the phrase "Go to *<text request url>* to share your location"
* Add the tag **[LocationRequest]** to your message body. This tag will
be replaced by the text request url.
Location requests can also have a callback that is returned when the
location request is completed by the contact. This information will be
sent as a POST request to the **location_callback** property. See the
callbacks tab below for the schema of the callback.
**WARNING:** The location_callback property only works with the
**[LocationRequest]** tag. If no tag exsits, even if
geolocation_requested is true, the callback will not work and the
send-message request will return a `400 (Bad Request)` exception.
parameters:
- description: Id of dashboard
name: dashboard_id
in: path
required: true
schema:
type: integer
example: 121
- description: Phone number
name: phone_number
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/contact_message_request'
responses:
'200':
description: The new message.
content:
application/json:
schema:
$ref: '#/components/schemas/message'
'400':
description: Bad request. Some required parameters were missing.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
callbacks:
messageStatus:
status_callback:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/webhook_payload_message_status'
responses:
'200':
description: Your server returns this code if it accepts the callback
locationRequest:
location_callback:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/webhook_payload_location_callback'
responses:
'200':
description: Your server returns this code if it accepts the callback
/dashboards/{dashboard_id}/messages:
get:
tags:
- Conversations
- Messages
summary: Get all messages for a dashboard.
operationId: Conversations_getDashboardMessages
description: >-
Retrieves the text messages sent and received in the specified
dashboard. Optionally, can provide a start and end date to filter the
message history by. Messages will always be sorted from oldest to newest
parameters:
- description: Id of dashboard
name: dashboard_id
in: path
required: true
schema:
type: integer
example: 121
- description: Start date to filter messages in this dashboard by
name: start_date
in: query
schema:
type: string
format: date-time
- description: End date to filter messages in this dashboard by
name: end_date
in: query
schema:
type: string
format: date-time
- name: page
in: query
schema:
type: integer
default: 0
- name: page_size
in: query
schema:
type: integer
default: 100
responses:
'200':
description: Messages in the conversation.
content:
application/json:
schema:
$ref: '#/components/schemas/dashboard_message_response_container'
'204':
description: No contact in the dashboard matches the provided number.'
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/dashboards/{dashboard_id}/contacts/{phone_number}/conversations/archive:
put:
tags:
- Conversations
summary: Archive a Conversation
operationId: Conversations_archiveConversation
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 that 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.
parameters:
- description: Id of dashboard
name: dashboard_id
in: path
required: true
schema:
type: integer
example: 121
- description: Phone number
name: phone_number
in: path
required: true
schema:
type: string
responses:
'200':
description: Success. No content is returned.
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/dashboards/{dashboard_id}/contacts/{phone_number}/conversations/unarchive:
put:
tags:
- Conversations
summary: Unarchive a Conversation
operationId: Conversations_unarchiveConversation
description: >-
Unarchive a conversation. Once a conversation is unarchived, it will
once again appear in the queue. it will also appear in conversations
returned by the /conversations endpoint. If a conversation is already
unarchived, this method has no effect.
parameters:
- description: Id of dashboard
name: dashboard_id
in: path
required: true
schema:
type: integer
example: 121
- description: Phone number
name: phone_number
in: path
required: true
schema:
type: string
responses:
'200':
description: Success. No content is returned.
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/messages/{message_id}/redact:
put:
tags:
- Messages
summary: Redact a message
operationId: Messages_redactMessage
description: >-
Redacts a previously sent message in the Text Request queue. This does
not undo sending the message, but hides the message body on Text
Request's side in case the message body contains sensitive information.
This operation can be undone with the /messages/{message_id}/unredact
endpoint.
parameters:
- description: Id of message to redact
name: message_id
in: path
required: true
schema:
type: string
example: 00000000-0000-0000-0000-000000000000
responses:
'200':
description: Success. No content is returned.
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/messages/{message_id}/unredact:
put:
tags:
- Messages
summary: Unredact a message
operationId: Messages_unredactMessage
description: >-
Removes the redaction on a previously redacted message in the Text
Request queue. See the /messages/{message_id}/redact endpoint.
parameters:
- description: Id of message to unredact
name: message_id
in: path
required: true
schema:
type: string
example: 00000000-0000-0000-0000-000000000000
responses:
'200':
description: Success. No content is returned.
'401':
description: Unauthorized. Sent if the API key is omitted or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
/dashboards/{dashboard_id}/contacts:
summary: Contacts at the dashboard level.
description: Contact management for all contacts in a given dashboard.
get:
tags:
- Contacts
summary: Retrieves all contacts that match the specified filtering criterion.
operationId: Contacts_getMatches
description: >-
As many as all filter parameters and as few as none may be set. Only the
dashboard specified will be searched; contacts are organized by
dashboard, and there is no account level search for a number available.
parameters:
- description: Id of dashboard
name: dashboard_id
in: path
required: true
schema:
type: integer
example: 121
- description: >-
The phone number that you're searching for. This uses "starts with"
searching.
name: contact_phone_number
in: query
required: false
schema:
type: string
- name: last_message_timestamp_before_utc
in: query
required: false
schema:
type: string
format: date-time
- name: last_message_timestamp_after_utc
in: query
required: false
schema:
type: string
format: date-time
- name: contact_created_before
in: query
required: false
schema:
type: string
format: date-time
- name: contact_created_after
in: query
required: false
schema:
type: string
format: date-time
- name: is_resolved
in: query
required: false
schema:
type: boolean
- name: has_message_history
in: query
required: false
schema:
type: boolean
- name: is_blocked
in: query
required: false
schema:
type: boolean
- name: is_archived
in: query
required: false
schema:
type: boolean
- name: is_suppressed
in: query
required: false
schema:
type: boolean
- name: has_opted_out
in: query
required: false
schema:
type: boolean
- name: last_message_sent_before
in: query
required: false
schema:
type: string
format: date-time
- name: last_message_sent_after