spatio-sdk 0.0.2

Rust SDK for the SpatioAPI. Generated from the official OpenAPI spec.
Documentation
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
# \DirectMessagesApi

All URIs are relative to *https://api.spatio.app*

Method | HTTP request | Description
------------- | ------------- | -------------
[**add_dm_reaction**]DirectMessagesApi.md#add_dm_reaction | **POST** /v1/direct-messages/messages/{messageId}/reactions | React to a DM message.
[**attach_to_dm_message**]DirectMessagesApi.md#attach_to_dm_message | **POST** /v1/direct-messages/messages/{messageId}/attachments | Attach a file/image/etc. to an existing DM message.
[**execute_dm_action**]DirectMessagesApi.md#execute_dm_action | **POST** /v1/direct-messages/execute | Dispatch a DM action by id.
[**forward_dm_message**]DirectMessagesApi.md#forward_dm_message | **POST** /v1/direct-messages/messages/{messageId}/forward | Forward a DM message to another DM or channel.
[**get_dm_user**]DirectMessagesApi.md#get_dm_user | **GET** /v1/direct-messages/users/{id} | Fetch one chat user.
[**list_direct_conversations_enriched**]DirectMessagesApi.md#list_direct_conversations_enriched | **GET** /v1/direct-messages/conversations | Enriched DM conversation list with unread + pin + draft state.
[**list_direct_message_conversations**]DirectMessagesApi.md#list_direct_message_conversations | **GET** /v1/direct-messages | List 1:1 and group DM conversations.
[**list_direct_messages**]DirectMessagesApi.md#list_direct_messages | **GET** /v1/direct-messages/messages | List messages in a DM conversation.
[**list_dm_actions**]DirectMessagesApi.md#list_dm_actions | **GET** /v1/direct-messages/actions | Discover the action catalog for DirectMessages.
[**list_dm_pinned_messages**]DirectMessagesApi.md#list_dm_pinned_messages | **GET** /v1/direct-messages/{dmId}/pinned | List pinned messages in a DM conversation.
[**list_dm_thread_replies**]DirectMessagesApi.md#list_dm_thread_replies | **GET** /v1/direct-messages/{dmId}/messages/{messageId}/replies | List replies in a DM message thread.
[**list_dm_users**]DirectMessagesApi.md#list_dm_users | **GET** /v1/direct-messages/users | List chat users (DM contacts) across connected accounts.
[**mark_dm_read**]DirectMessagesApi.md#mark_dm_read | **POST** /v1/direct-messages/{dmId}/read | Mark a DM message read.
[**mute_dm**]DirectMessagesApi.md#mute_dm | **POST** /v1/direct-messages/{dmId}/mute | Mute a DM conversation (until a time, or forever).
[**pin_dm_conversation**]DirectMessagesApi.md#pin_dm_conversation | **POST** /v1/direct-messages/{dmId}/pin | Pin a DM conversation to the top of the sidebar.
[**pin_dm_message**]DirectMessagesApi.md#pin_dm_message | **POST** /v1/direct-messages/messages/{messageId}/pin | Pin a DM message.
[**post_dm_thread_reply**]DirectMessagesApi.md#post_dm_thread_reply | **POST** /v1/direct-messages/{dmId}/messages/{messageId}/replies | Reply in a DM message thread.
[**remove_dm_reaction**]DirectMessagesApi.md#remove_dm_reaction | **DELETE** /v1/direct-messages/messages/{messageId}/reactions/{emoji} | Remove a DM message reaction.
[**search_direct_messages**]DirectMessagesApi.md#search_direct_messages | **GET** /v1/direct-messages/search | Search across DM messages.
[**send_direct_message**]DirectMessagesApi.md#send_direct_message | **POST** /v1/direct-messages/messages | Send a DM.
[**set_dm_draft**]DirectMessagesApi.md#set_dm_draft | **PUT** /v1/direct-messages/{dmId}/draft | Save the unsent draft text for a DM.
[**unpin_dm_conversation**]DirectMessagesApi.md#unpin_dm_conversation | **DELETE** /v1/direct-messages/{dmId}/pin | Unpin a DM conversation.
[**unpin_dm_message**]DirectMessagesApi.md#unpin_dm_message | **DELETE** /v1/direct-messages/messages/{messageId}/pin | Unpin a DM message.
[**workspace_execute_dm_action**]DirectMessagesApi.md#workspace_execute_dm_action | **POST** /v1/organizations/{org}/workspaces/{workspace}/direct-messages/execute | 
[**workspace_get_dm_user**]DirectMessagesApi.md#workspace_get_dm_user | **GET** /v1/organizations/{org}/workspaces/{workspace}/direct-messages/users/{id} | 
[**workspace_list_direct_messages**]DirectMessagesApi.md#workspace_list_direct_messages | **GET** /v1/organizations/{org}/workspaces/{workspace}/direct-messages | 
[**workspace_list_dm_actions**]DirectMessagesApi.md#workspace_list_dm_actions | **GET** /v1/organizations/{org}/workspaces/{workspace}/direct-messages/actions | 
[**workspace_list_dm_conversations**]DirectMessagesApi.md#workspace_list_dm_conversations | **GET** /v1/organizations/{org}/workspaces/{workspace}/direct-messages/conversations | 
[**workspace_list_dm_messages**]DirectMessagesApi.md#workspace_list_dm_messages | **GET** /v1/organizations/{org}/workspaces/{workspace}/direct-messages/messages | 
[**workspace_list_dm_users**]DirectMessagesApi.md#workspace_list_dm_users | **GET** /v1/organizations/{org}/workspaces/{workspace}/direct-messages/users | 
[**workspace_send_direct_message**]DirectMessagesApi.md#workspace_send_direct_message | **POST** /v1/organizations/{org}/workspaces/{workspace}/direct-messages/messages | 



## add_dm_reaction

> models::DmReactionResponse add_dm_reaction(message_id, dm_reaction_request)
React to a DM message.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**message_id** | **String** | Chat-message id. | [required] |
**dm_reaction_request** | [**DmReactionRequest**]DmReactionRequest.md |  | [required] |

### Return type

[**models::DmReactionResponse**](DMReactionResponse.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## attach_to_dm_message

> models::DmMessageEnvelope attach_to_dm_message(message_id, dm_attach_request)
Attach a file/image/etc. to an existing DM message.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**message_id** | **String** | Chat-message id. | [required] |
**dm_attach_request** | [**DmAttachRequest**]DmAttachRequest.md |  | [required] |

### Return type

[**models::DmMessageEnvelope**](DMMessageEnvelope.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## execute_dm_action

> models::ExecuteChatActionResponse execute_dm_action(execute_chat_action_request)
Dispatch a DM action by id.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**execute_chat_action_request** | [**ExecuteChatActionRequest**]ExecuteChatActionRequest.md |  | [required] |

### Return type

[**models::ExecuteChatActionResponse**](ExecuteChatActionResponse.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## forward_dm_message

> models::DmMessageEnvelope forward_dm_message(message_id, dm_forward_request)
Forward a DM message to another DM or channel.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**message_id** | **String** | Chat-message id. | [required] |
**dm_forward_request** | [**DmForwardRequest**]DmForwardRequest.md |  | [required] |

### Return type

[**models::DmMessageEnvelope**](DMMessageEnvelope.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_dm_user

> models::GetChatUserResponse get_dm_user(id, account_id)
Fetch one chat user.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** | Chat-user id (provider-scoped). | [required] |
**account_id** | Option<**String**> |  |  |

### Return type

[**models::GetChatUserResponse**](GetChatUserResponse.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_direct_conversations_enriched

> std::collections::HashMap<String, serde_json::Value> list_direct_conversations_enriched(account_id, x_workspace_id)
Enriched DM conversation list with unread + pin + draft state.

Native fast-path. Returns conversations augmented with the DM-feature state (unread counts, pinned/muted flags, saved drafts) the renderer's DM UI consumes. The shape is provider-specific and treated as opaque. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**account_id** | Option<**String**> |  |  |
**x_workspace_id** | Option<**String**> | Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.  |  |

### Return type

[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_direct_message_conversations

> models::ListChannelsResponse list_direct_message_conversations(account_ids, providers, x_workspace_id, limit, cursor, include_archived)
List 1:1 and group DM conversations.

Returns DM-type conversations only (`type: im | mpim`). Channel-type conversations are surfaced via `/v1/channels`. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**account_ids** | Option<[**Vec<String>**]String.md> | Repeatable. Restrict to these connected-account row ids. Mutually orthogonal to `providers` — when both are set the intersection is used.  |  |
**providers** | Option<[**Vec<String>**]String.md> | Repeatable. Restrict to these provider ids (`gmail`, `outlook`). |  |
**x_workspace_id** | Option<**String**> | Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.  |  |
**limit** | Option<**i32**> |  |  |
**cursor** | Option<**String**> |  |  |
**include_archived** | Option<**bool**> |  |  |[default to false]

### Return type

[**models::ListChannelsResponse**](ListChannelsResponse.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_direct_messages

> models::ListMessagesResponse list_direct_messages(channel, account_id, account_ids, providers, x_workspace_id, limit, cursor, oldest_first)
List messages in a DM conversation.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**channel** | **String** | DM conversation id. | [required] |
**account_id** | Option<**String**> |  |  |
**account_ids** | Option<[**Vec<String>**]String.md> | Repeatable. Restrict to these connected-account row ids. Mutually orthogonal to `providers` — when both are set the intersection is used.  |  |
**providers** | Option<[**Vec<String>**]String.md> | Repeatable. Restrict to these provider ids (`gmail`, `outlook`). |  |
**x_workspace_id** | Option<**String**> | Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.  |  |
**limit** | Option<**i32**> |  |  |
**cursor** | Option<**String**> |  |  |
**oldest_first** | Option<**bool**> |  |  |

### Return type

[**models::ListMessagesResponse**](ListMessagesResponse.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_dm_actions

> models::ChatActionsList list_dm_actions()
Discover the action catalog for DirectMessages.

### Parameters

This endpoint does not need any parameter.

### Return type

[**models::ChatActionsList**](ChatActionsList.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_dm_pinned_messages

> models::DmPinnedList list_dm_pinned_messages(dm_id, account_id)
List pinned messages in a DM conversation.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**dm_id** | **String** | Direct-message conversation id. | [required] |
**account_id** | Option<**String**> |  |  |

### Return type

[**models::DmPinnedList**](DMPinnedList.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_dm_thread_replies

> std::collections::HashMap<String, serde_json::Value> list_dm_thread_replies(dm_id, message_id, account_id)
List replies in a DM message thread.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**dm_id** | **String** | Direct-message conversation id. | [required] |
**message_id** | **String** | Chat-message id. | [required] |
**account_id** | Option<**String**> |  |  |

### Return type

[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_dm_users

> models::ListChatUsersResponse list_dm_users(account_ids, providers, x_workspace_id, limit, cursor)
List chat users (DM contacts) across connected accounts.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**account_ids** | Option<[**Vec<String>**]String.md> | Repeatable. Restrict to these connected-account row ids. Mutually orthogonal to `providers` — when both are set the intersection is used.  |  |
**providers** | Option<[**Vec<String>**]String.md> | Repeatable. Restrict to these provider ids (`gmail`, `outlook`). |  |
**x_workspace_id** | Option<**String**> | Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.  |  |
**limit** | Option<**i32**> |  |  |
**cursor** | Option<**String**> |  |  |

### Return type

[**models::ListChatUsersResponse**](ListChatUsersResponse.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## mark_dm_read

> models::SuccessFlag mark_dm_read(dm_id, dm_mark_read_request)
Mark a DM message read.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**dm_id** | **String** | Direct-message conversation id. | [required] |
**dm_mark_read_request** | [**DmMarkReadRequest**]DmMarkReadRequest.md |  | [required] |

### Return type

[**models::SuccessFlag**](SuccessFlag.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## mute_dm

> models::DmMuteResponse mute_dm(dm_id, dm_mute_request)
Mute a DM conversation (until a time, or forever).

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**dm_id** | **String** | Direct-message conversation id. | [required] |
**dm_mute_request** | [**DmMuteRequest**]DmMuteRequest.md |  | [required] |

### Return type

[**models::DmMuteResponse**](DMMuteResponse.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## pin_dm_conversation

> models::SuccessFlag pin_dm_conversation(dm_id, account_id)
Pin a DM conversation to the top of the sidebar.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**dm_id** | **String** | Direct-message conversation id. | [required] |
**account_id** | Option<**String**> |  |  |

### Return type

[**models::SuccessFlag**](SuccessFlag.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## pin_dm_message

> models::SuccessFlag pin_dm_message(message_id, channel_membership_request)
Pin a DM message.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**message_id** | **String** | Chat-message id. | [required] |
**channel_membership_request** | Option<[**ChannelMembershipRequest**]ChannelMembershipRequest.md> |  |  |

### Return type

[**models::SuccessFlag**](SuccessFlag.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## post_dm_thread_reply

> models::DmMessageEnvelope post_dm_thread_reply(dm_id, message_id, dm_thread_reply_request, account_id)
Reply in a DM message thread.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**dm_id** | **String** | Direct-message conversation id. | [required] |
**message_id** | **String** | Chat-message id. | [required] |
**dm_thread_reply_request** | [**DmThreadReplyRequest**]DmThreadReplyRequest.md |  | [required] |
**account_id** | Option<**String**> |  |  |

### Return type

[**models::DmMessageEnvelope**](DMMessageEnvelope.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## remove_dm_reaction

> models::DmReactionResponse remove_dm_reaction(message_id, emoji, account_id)
Remove a DM message reaction.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**message_id** | **String** | Chat-message id. | [required] |
**emoji** | **String** | Reaction emoji (e.g. `+1`, `eyes`, `pepper`). | [required] |
**account_id** | Option<**String**> |  |  |

### Return type

[**models::DmReactionResponse**](DMReactionResponse.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## search_direct_messages

> models::DmSearchResults search_direct_messages(q, limit, dm_id, user, account_id)
Search across DM messages.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**q** | **String** | Free-form query string. | [required] |
**limit** | Option<**i32**> |  |  |
**dm_id** | Option<**String**> | Restrict to one conversation. |  |
**user** | Option<**String**> | Restrict to messages from this user id. |  |
**account_id** | Option<**String**> |  |  |

### Return type

[**models::DmSearchResults**](DMSearchResults.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## send_direct_message

> models::SendChatMessageResponse send_direct_message(send_chat_message_request)
Send a DM.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**send_chat_message_request** | [**SendChatMessageRequest**]SendChatMessageRequest.md |  | [required] |

### Return type

[**models::SendChatMessageResponse**](SendChatMessageResponse.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## set_dm_draft

> models::SuccessFlag set_dm_draft(dm_id, dm_set_draft_request)
Save the unsent draft text for a DM.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**dm_id** | **String** | Direct-message conversation id. | [required] |
**dm_set_draft_request** | [**DmSetDraftRequest**]DmSetDraftRequest.md |  | [required] |

### Return type

[**models::SuccessFlag**](SuccessFlag.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## unpin_dm_conversation

> models::SuccessFlag unpin_dm_conversation(dm_id, account_id)
Unpin a DM conversation.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**dm_id** | **String** | Direct-message conversation id. | [required] |
**account_id** | Option<**String**> |  |  |

### Return type

[**models::SuccessFlag**](SuccessFlag.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## unpin_dm_message

> models::SuccessFlag unpin_dm_message(message_id, account_id)
Unpin a DM message.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**message_id** | **String** | Chat-message id. | [required] |
**account_id** | Option<**String**> |  |  |

### Return type

[**models::SuccessFlag**](SuccessFlag.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## workspace_execute_dm_action

> std::collections::HashMap<String, serde_json::Value> workspace_execute_dm_action(org, workspace, request_body)


### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**org** | **String** |  | [required] |
**workspace** | **String** |  | [required] |
**request_body** | [**std::collections::HashMap<String, serde_json::Value>**]SerdeJson__Value.md |  | [required] |

### Return type

[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## workspace_get_dm_user

> std::collections::HashMap<String, serde_json::Value> workspace_get_dm_user(org, workspace, id)


### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**org** | **String** |  | [required] |
**workspace** | **String** |  | [required] |
**id** | **String** |  | [required] |

### Return type

[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## workspace_list_direct_messages

> std::collections::HashMap<String, serde_json::Value> workspace_list_direct_messages(org, workspace)


### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**org** | **String** |  | [required] |
**workspace** | **String** |  | [required] |

### Return type

[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## workspace_list_dm_actions

> std::collections::HashMap<String, serde_json::Value> workspace_list_dm_actions(org, workspace)


### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**org** | **String** |  | [required] |
**workspace** | **String** |  | [required] |

### Return type

[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## workspace_list_dm_conversations

> std::collections::HashMap<String, serde_json::Value> workspace_list_dm_conversations(org, workspace)


### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**org** | **String** |  | [required] |
**workspace** | **String** |  | [required] |

### Return type

[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## workspace_list_dm_messages

> std::collections::HashMap<String, serde_json::Value> workspace_list_dm_messages(org, workspace)


### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**org** | **String** |  | [required] |
**workspace** | **String** |  | [required] |

### Return type

[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## workspace_list_dm_users

> std::collections::HashMap<String, serde_json::Value> workspace_list_dm_users(org, workspace)


### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**org** | **String** |  | [required] |
**workspace** | **String** |  | [required] |

### Return type

[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## workspace_send_direct_message

> std::collections::HashMap<String, serde_json::Value> workspace_send_direct_message(org, workspace, request_body)


### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**org** | **String** |  | [required] |
**workspace** | **String** |  | [required] |
**request_body** | [**std::collections::HashMap<String, serde_json::Value>**]SerdeJson__Value.md |  | [required] |

### Return type

[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)