zyphr 0.1.75 → 0.1.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +48 -1
  3. data/docs/CreateInboxLabelRequest.md +20 -0
  4. data/docs/Draft.md +36 -0
  5. data/docs/DraftAddress.md +20 -0
  6. data/docs/DraftListResponse.md +20 -0
  7. data/docs/DraftRequest.md +30 -0
  8. data/docs/DraftResponse.md +20 -0
  9. data/docs/ForwardEmailRequest.md +34 -0
  10. data/docs/InboundEmailApi.md +1853 -157
  11. data/docs/InboxLabel.md +26 -0
  12. data/docs/InboxLabelListResponse.md +20 -0
  13. data/docs/InboxLabelResponse.md +20 -0
  14. data/docs/{ReplyToInboundEmailRequest.md → ReplyEmailRequest.md} +3 -3
  15. data/docs/Thread.md +40 -0
  16. data/docs/ThreadEmail.md +38 -0
  17. data/docs/ThreadEmailAttachmentsInner.md +24 -0
  18. data/docs/ThreadEmailFrom.md +20 -0
  19. data/docs/ThreadEmailListResponse.md +20 -0
  20. data/docs/ThreadEmailResponse.md +20 -0
  21. data/docs/ThreadFolder.md +15 -0
  22. data/docs/ThreadLabelsInner.md +22 -0
  23. data/docs/ThreadLabelsRequest.md +18 -0
  24. data/docs/ThreadListResponse.md +20 -0
  25. data/docs/ThreadListResponseMeta.md +20 -0
  26. data/docs/ThreadResponse.md +20 -0
  27. data/docs/UpdateInboxLabelRequest.md +20 -0
  28. data/docs/UpdateThreadRequest.md +22 -0
  29. data/lib/zyphr/api/inbound_email_api.rb +1768 -168
  30. data/lib/zyphr/models/create_inbox_label_request.rb +272 -0
  31. data/lib/zyphr/models/draft.rb +375 -0
  32. data/lib/zyphr/models/draft_address.rb +249 -0
  33. data/lib/zyphr/models/draft_list_response.rb +231 -0
  34. data/lib/zyphr/models/draft_request.rb +299 -0
  35. data/lib/zyphr/models/draft_response.rb +229 -0
  36. data/lib/zyphr/models/forward_email_request.rb +393 -0
  37. data/lib/zyphr/models/inbox_label.rb +258 -0
  38. data/lib/zyphr/models/inbox_label_list_response.rb +231 -0
  39. data/lib/zyphr/models/inbox_label_response.rb +229 -0
  40. data/lib/zyphr/models/{reply_to_inbound_email_request.rb → reply_email_request.rb} +4 -3
  41. data/lib/zyphr/models/thread.rb +352 -0
  42. data/lib/zyphr/models/thread_email.rb +353 -0
  43. data/lib/zyphr/models/thread_email_attachments_inner.rb +248 -0
  44. data/lib/zyphr/models/thread_email_from.rb +230 -0
  45. data/lib/zyphr/models/thread_email_list_response.rb +231 -0
  46. data/lib/zyphr/models/thread_email_response.rb +229 -0
  47. data/lib/zyphr/models/thread_folder.rb +43 -0
  48. data/lib/zyphr/models/thread_labels_inner.rb +239 -0
  49. data/lib/zyphr/models/thread_labels_request.rb +248 -0
  50. data/lib/zyphr/models/thread_list_response.rb +231 -0
  51. data/lib/zyphr/models/thread_list_response_meta.rb +237 -0
  52. data/lib/zyphr/models/thread_response.rb +229 -0
  53. data/lib/zyphr/models/update_inbox_label_request.rb +264 -0
  54. data/lib/zyphr/models/update_thread_request.rb +262 -0
  55. data/lib/zyphr.rb +25 -1
  56. data/spec/api/inbound_email_api_spec.rb +292 -1
  57. data/spec/models/create_inbox_label_request_spec.rb +42 -0
  58. data/spec/models/draft_address_spec.rb +42 -0
  59. data/spec/models/draft_list_response_spec.rb +42 -0
  60. data/spec/models/draft_request_spec.rb +72 -0
  61. data/spec/models/draft_response_spec.rb +42 -0
  62. data/spec/models/draft_spec.rb +90 -0
  63. data/spec/models/forward_email_request_spec.rb +88 -0
  64. data/spec/models/inbox_label_list_response_spec.rb +42 -0
  65. data/spec/models/inbox_label_response_spec.rb +42 -0
  66. data/spec/models/inbox_label_spec.rb +60 -0
  67. data/spec/models/{reply_to_inbound_email_request_spec.rb → reply_email_request_spec.rb} +6 -6
  68. data/spec/models/thread_email_attachments_inner_spec.rb +54 -0
  69. data/spec/models/thread_email_from_spec.rb +42 -0
  70. data/spec/models/thread_email_list_response_spec.rb +42 -0
  71. data/spec/models/thread_email_response_spec.rb +42 -0
  72. data/spec/models/thread_email_spec.rb +100 -0
  73. data/spec/models/thread_folder_spec.rb +30 -0
  74. data/spec/models/thread_labels_inner_spec.rb +48 -0
  75. data/spec/models/thread_labels_request_spec.rb +36 -0
  76. data/spec/models/thread_list_response_meta_spec.rb +42 -0
  77. data/spec/models/thread_list_response_spec.rb +42 -0
  78. data/spec/models/thread_response_spec.rb +42 -0
  79. data/spec/models/thread_spec.rb +102 -0
  80. data/spec/models/update_inbox_label_request_spec.rb +42 -0
  81. data/spec/models/update_thread_request_spec.rb +48 -0
  82. data/zyphr.gemspec +1 -1
  83. metadata +102 -6
@@ -4,15 +4,109 @@ All URIs are relative to *https://api.zyphr.dev/v1*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
+ | [**add_inbox_thread_labels**](InboundEmailApi.md#add_inbox_thread_labels) | **POST** /inboxes/threads/{threadId}/labels | Add labels to a thread |
7
8
  | [**create_inbox**](InboundEmailApi.md#create_inbox) | **POST** /inboxes | Create an inbox |
9
+ | [**create_inbox_draft**](InboundEmailApi.md#create_inbox_draft) | **POST** /inboxes/drafts | Create a draft |
10
+ | [**create_inbox_label**](InboundEmailApi.md#create_inbox_label) | **POST** /inboxes/labels | Create a label |
8
11
  | [**delete_inbox**](InboundEmailApi.md#delete_inbox) | **DELETE** /inboxes/{id} | Delete an inbox |
12
+ | [**delete_inbox_draft**](InboundEmailApi.md#delete_inbox_draft) | **DELETE** /inboxes/drafts/{draftId} | Delete a draft |
13
+ | [**delete_inbox_label**](InboundEmailApi.md#delete_inbox_label) | **DELETE** /inboxes/labels/{labelId} | Delete a label |
14
+ | [**delete_inbox_thread**](InboundEmailApi.md#delete_inbox_thread) | **DELETE** /inboxes/threads/{threadId} | Delete a thread |
15
+ | [**forward_inbound_email**](InboundEmailApi.md#forward_inbound_email) | **POST** /inbound-emails/{id}/forward | Forward a received email |
16
+ | [**forward_inbox_thread_email**](InboundEmailApi.md#forward_inbox_thread_email) | **POST** /inboxes/threads/{threadId}/emails/{emailId}/forward | Forward an email in a thread |
9
17
  | [**get_inbound_attachment_url**](InboundEmailApi.md#get_inbound_attachment_url) | **GET** /inbound-emails/{id}/attachments/{attachmentId} | Get an attachment download URL |
10
18
  | [**get_inbound_email**](InboundEmailApi.md#get_inbound_email) | **GET** /inbound-emails/{id} | Get a received email |
11
19
  | [**get_inbox**](InboundEmailApi.md#get_inbox) | **GET** /inboxes/{id} | Get an inbox |
20
+ | [**get_inbox_draft**](InboundEmailApi.md#get_inbox_draft) | **GET** /inboxes/drafts/{draftId} | Get a draft |
21
+ | [**get_inbox_label**](InboundEmailApi.md#get_inbox_label) | **GET** /inboxes/labels/{labelId} | Get a label |
22
+ | [**get_inbox_thread**](InboundEmailApi.md#get_inbox_thread) | **GET** /inboxes/threads/{threadId} | Get a thread |
23
+ | [**get_inbox_thread_email**](InboundEmailApi.md#get_inbox_thread_email) | **GET** /inboxes/threads/{threadId}/emails/{emailId} | Get an email in a thread |
12
24
  | [**list_inbound_emails**](InboundEmailApi.md#list_inbound_emails) | **GET** /inbound-emails | List received emails |
25
+ | [**list_inbox_drafts**](InboundEmailApi.md#list_inbox_drafts) | **GET** /inboxes/drafts | List drafts |
26
+ | [**list_inbox_labels**](InboundEmailApi.md#list_inbox_labels) | **GET** /inboxes/labels | List labels |
27
+ | [**list_inbox_thread_emails**](InboundEmailApi.md#list_inbox_thread_emails) | **GET** /inboxes/threads/{threadId}/emails | List a thread's emails |
28
+ | [**list_inbox_threads**](InboundEmailApi.md#list_inbox_threads) | **GET** /inboxes/threads | List threads |
13
29
  | [**list_inboxes**](InboundEmailApi.md#list_inboxes) | **GET** /inboxes | List inboxes |
30
+ | [**remove_inbox_thread_label**](InboundEmailApi.md#remove_inbox_thread_label) | **DELETE** /inboxes/threads/{threadId}/labels/{labelId} | Remove a label from a thread |
14
31
  | [**reply_to_inbound_email**](InboundEmailApi.md#reply_to_inbound_email) | **POST** /inbound-emails/{id}/reply | Reply to a received email |
32
+ | [**reply_to_inbox_thread**](InboundEmailApi.md#reply_to_inbox_thread) | **POST** /inboxes/threads/{threadId}/reply | Reply to a thread |
33
+ | [**send_inbox_draft**](InboundEmailApi.md#send_inbox_draft) | **POST** /inboxes/drafts/{draftId}/send | Send a draft |
34
+ | [**set_inbox_thread_labels**](InboundEmailApi.md#set_inbox_thread_labels) | **PUT** /inboxes/threads/{threadId}/labels | Set a thread's labels |
15
35
  | [**update_inbox**](InboundEmailApi.md#update_inbox) | **PATCH** /inboxes/{id} | Update an inbox |
36
+ | [**update_inbox_draft**](InboundEmailApi.md#update_inbox_draft) | **PATCH** /inboxes/drafts/{draftId} | Update a draft |
37
+ | [**update_inbox_label**](InboundEmailApi.md#update_inbox_label) | **PATCH** /inboxes/labels/{labelId} | Update a label |
38
+ | [**update_inbox_thread**](InboundEmailApi.md#update_inbox_thread) | **PATCH** /inboxes/threads/{threadId} | Update a thread |
39
+
40
+
41
+ ## add_inbox_thread_labels
42
+
43
+ > <ThreadResponse> add_inbox_thread_labels(thread_id, thread_labels_request)
44
+
45
+ Add labels to a thread
46
+
47
+ ### Examples
48
+
49
+ ```ruby
50
+ require 'time'
51
+ require 'zyphr'
52
+ # setup authorization
53
+ Zyphr.configure do |config|
54
+ # Configure API key authorization: ApiKeyAuth
55
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
56
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
57
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
58
+ end
59
+
60
+ api_instance = Zyphr::InboundEmailApi.new
61
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
62
+ thread_labels_request = Zyphr::ThreadLabelsRequest.new({label_ids: ['label_ids_example']}) # ThreadLabelsRequest |
63
+
64
+ begin
65
+ # Add labels to a thread
66
+ result = api_instance.add_inbox_thread_labels(thread_id, thread_labels_request)
67
+ p result
68
+ rescue Zyphr::ApiError => e
69
+ puts "Error when calling InboundEmailApi->add_inbox_thread_labels: #{e}"
70
+ end
71
+ ```
72
+
73
+ #### Using the add_inbox_thread_labels_with_http_info variant
74
+
75
+ This returns an Array which contains the response data, status code and headers.
76
+
77
+ > <Array(<ThreadResponse>, Integer, Hash)> add_inbox_thread_labels_with_http_info(thread_id, thread_labels_request)
78
+
79
+ ```ruby
80
+ begin
81
+ # Add labels to a thread
82
+ data, status_code, headers = api_instance.add_inbox_thread_labels_with_http_info(thread_id, thread_labels_request)
83
+ p status_code # => 2xx
84
+ p headers # => { ... }
85
+ p data # => <ThreadResponse>
86
+ rescue Zyphr::ApiError => e
87
+ puts "Error when calling InboundEmailApi->add_inbox_thread_labels_with_http_info: #{e}"
88
+ end
89
+ ```
90
+
91
+ ### Parameters
92
+
93
+ | Name | Type | Description | Notes |
94
+ | ---- | ---- | ----------- | ----- |
95
+ | **thread_id** | **String** | | |
96
+ | **thread_labels_request** | [**ThreadLabelsRequest**](ThreadLabelsRequest.md) | | |
97
+
98
+ ### Return type
99
+
100
+ [**ThreadResponse**](ThreadResponse.md)
101
+
102
+ ### Authorization
103
+
104
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
105
+
106
+ ### HTTP request headers
107
+
108
+ - **Content-Type**: application/json
109
+ - **Accept**: application/json
16
110
 
17
111
 
18
112
  ## create_inbox
@@ -86,13 +180,13 @@ end
86
180
  - **Accept**: application/json
87
181
 
88
182
 
89
- ## delete_inbox
183
+ ## create_inbox_draft
90
184
 
91
- > delete_inbox(id)
185
+ > <DraftResponse> create_inbox_draft(draft_request)
92
186
 
93
- Delete an inbox
187
+ Create a draft
94
188
 
95
- Delete a named inbox. Mail it already received is kept (its `inbox_id` becomes null), and new mail to its address goes to the catch-all if enabled. The catch-all cannot be deleted (422 `catch_all_not_deletable`); disable it with `PATCH { \"enabled\": false }`.
189
+ Every field is optional; the draft is checked when it is sent. Give a `thread_id` to draft a reply: Zyphr sets its recipient and subject from the thread when it is sent, so a reply draft can't have `to` or `subject`. Without a thread, the draft is a new email.
96
190
 
97
191
  ### Examples
98
192
 
@@ -108,31 +202,32 @@ Zyphr.configure do |config|
108
202
  end
109
203
 
110
204
  api_instance = Zyphr::InboundEmailApi.new
111
- id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
205
+ draft_request = Zyphr::DraftRequest.new # DraftRequest |
112
206
 
113
207
  begin
114
- # Delete an inbox
115
- api_instance.delete_inbox(id)
208
+ # Create a draft
209
+ result = api_instance.create_inbox_draft(draft_request)
210
+ p result
116
211
  rescue Zyphr::ApiError => e
117
- puts "Error when calling InboundEmailApi->delete_inbox: #{e}"
212
+ puts "Error when calling InboundEmailApi->create_inbox_draft: #{e}"
118
213
  end
119
214
  ```
120
215
 
121
- #### Using the delete_inbox_with_http_info variant
216
+ #### Using the create_inbox_draft_with_http_info variant
122
217
 
123
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
218
+ This returns an Array which contains the response data, status code and headers.
124
219
 
125
- > <Array(nil, Integer, Hash)> delete_inbox_with_http_info(id)
220
+ > <Array(<DraftResponse>, Integer, Hash)> create_inbox_draft_with_http_info(draft_request)
126
221
 
127
222
  ```ruby
128
223
  begin
129
- # Delete an inbox
130
- data, status_code, headers = api_instance.delete_inbox_with_http_info(id)
224
+ # Create a draft
225
+ data, status_code, headers = api_instance.create_inbox_draft_with_http_info(draft_request)
131
226
  p status_code # => 2xx
132
227
  p headers # => { ... }
133
- p data # => nil
228
+ p data # => <DraftResponse>
134
229
  rescue Zyphr::ApiError => e
135
- puts "Error when calling InboundEmailApi->delete_inbox_with_http_info: #{e}"
230
+ puts "Error when calling InboundEmailApi->create_inbox_draft_with_http_info: #{e}"
136
231
  end
137
232
  ```
138
233
 
@@ -140,11 +235,11 @@ end
140
235
 
141
236
  | Name | Type | Description | Notes |
142
237
  | ---- | ---- | ----------- | ----- |
143
- | **id** | **String** | | |
238
+ | **draft_request** | [**DraftRequest**](DraftRequest.md) | | |
144
239
 
145
240
  ### Return type
146
241
 
147
- nil (empty response body)
242
+ [**DraftResponse**](DraftResponse.md)
148
243
 
149
244
  ### Authorization
150
245
 
@@ -152,17 +247,15 @@ nil (empty response body)
152
247
 
153
248
  ### HTTP request headers
154
249
 
155
- - **Content-Type**: Not defined
156
- - **Accept**: Not defined
157
-
250
+ - **Content-Type**: application/json
251
+ - **Accept**: application/json
158
252
 
159
- ## get_inbound_attachment_url
160
253
 
161
- > <InboundAttachmentUrlResponse> get_inbound_attachment_url(id, attachment_id)
254
+ ## create_inbox_label
162
255
 
163
- Get an attachment download URL
256
+ > <InboxLabelResponse> create_inbox_label(create_inbox_label_request)
164
257
 
165
- Return a short-lived presigned S3 download URL for one attachment of a received email. `attachmentId` is the positional id from the email's `attachments` array.
258
+ Create a label
166
259
 
167
260
  ### Examples
168
261
 
@@ -178,33 +271,32 @@ Zyphr.configure do |config|
178
271
  end
179
272
 
180
273
  api_instance = Zyphr::InboundEmailApi.new
181
- id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
182
- attachment_id = 'attachment_id_example' # String |
274
+ create_inbox_label_request = Zyphr::CreateInboxLabelRequest.new({name: 'name_example'}) # CreateInboxLabelRequest |
183
275
 
184
276
  begin
185
- # Get an attachment download URL
186
- result = api_instance.get_inbound_attachment_url(id, attachment_id)
277
+ # Create a label
278
+ result = api_instance.create_inbox_label(create_inbox_label_request)
187
279
  p result
188
280
  rescue Zyphr::ApiError => e
189
- puts "Error when calling InboundEmailApi->get_inbound_attachment_url: #{e}"
281
+ puts "Error when calling InboundEmailApi->create_inbox_label: #{e}"
190
282
  end
191
283
  ```
192
284
 
193
- #### Using the get_inbound_attachment_url_with_http_info variant
285
+ #### Using the create_inbox_label_with_http_info variant
194
286
 
195
287
  This returns an Array which contains the response data, status code and headers.
196
288
 
197
- > <Array(<InboundAttachmentUrlResponse>, Integer, Hash)> get_inbound_attachment_url_with_http_info(id, attachment_id)
289
+ > <Array(<InboxLabelResponse>, Integer, Hash)> create_inbox_label_with_http_info(create_inbox_label_request)
198
290
 
199
291
  ```ruby
200
292
  begin
201
- # Get an attachment download URL
202
- data, status_code, headers = api_instance.get_inbound_attachment_url_with_http_info(id, attachment_id)
293
+ # Create a label
294
+ data, status_code, headers = api_instance.create_inbox_label_with_http_info(create_inbox_label_request)
203
295
  p status_code # => 2xx
204
296
  p headers # => { ... }
205
- p data # => <InboundAttachmentUrlResponse>
297
+ p data # => <InboxLabelResponse>
206
298
  rescue Zyphr::ApiError => e
207
- puts "Error when calling InboundEmailApi->get_inbound_attachment_url_with_http_info: #{e}"
299
+ puts "Error when calling InboundEmailApi->create_inbox_label_with_http_info: #{e}"
208
300
  end
209
301
  ```
210
302
 
@@ -212,12 +304,11 @@ end
212
304
 
213
305
  | Name | Type | Description | Notes |
214
306
  | ---- | ---- | ----------- | ----- |
215
- | **id** | **String** | | |
216
- | **attachment_id** | **String** | | |
307
+ | **create_inbox_label_request** | [**CreateInboxLabelRequest**](CreateInboxLabelRequest.md) | | |
217
308
 
218
309
  ### Return type
219
310
 
220
- [**InboundAttachmentUrlResponse**](InboundAttachmentUrlResponse.md)
311
+ [**InboxLabelResponse**](InboxLabelResponse.md)
221
312
 
222
313
  ### Authorization
223
314
 
@@ -225,17 +316,17 @@ end
225
316
 
226
317
  ### HTTP request headers
227
318
 
228
- - **Content-Type**: Not defined
319
+ - **Content-Type**: application/json
229
320
  - **Accept**: application/json
230
321
 
231
322
 
232
- ## get_inbound_email
323
+ ## delete_inbox
233
324
 
234
- > <InboundEmailResponse> get_inbound_email(id)
325
+ > delete_inbox(id)
235
326
 
236
- Get a received email
327
+ Delete an inbox
237
328
 
238
- Retrieve a single inbound email by id (scoped to the project).
329
+ Delete a named inbox. Mail it already received is kept (its `inbox_id` becomes null), and new mail to its address goes to the catch-all if enabled. The catch-all cannot be deleted (422 `catch_all_not_deletable`); disable it with `PATCH { \"enabled\": false }`.
239
330
 
240
331
  ### Examples
241
332
 
@@ -254,29 +345,28 @@ api_instance = Zyphr::InboundEmailApi.new
254
345
  id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
255
346
 
256
347
  begin
257
- # Get a received email
258
- result = api_instance.get_inbound_email(id)
259
- p result
348
+ # Delete an inbox
349
+ api_instance.delete_inbox(id)
260
350
  rescue Zyphr::ApiError => e
261
- puts "Error when calling InboundEmailApi->get_inbound_email: #{e}"
351
+ puts "Error when calling InboundEmailApi->delete_inbox: #{e}"
262
352
  end
263
353
  ```
264
354
 
265
- #### Using the get_inbound_email_with_http_info variant
355
+ #### Using the delete_inbox_with_http_info variant
266
356
 
267
- This returns an Array which contains the response data, status code and headers.
357
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
268
358
 
269
- > <Array(<InboundEmailResponse>, Integer, Hash)> get_inbound_email_with_http_info(id)
359
+ > <Array(nil, Integer, Hash)> delete_inbox_with_http_info(id)
270
360
 
271
361
  ```ruby
272
362
  begin
273
- # Get a received email
274
- data, status_code, headers = api_instance.get_inbound_email_with_http_info(id)
363
+ # Delete an inbox
364
+ data, status_code, headers = api_instance.delete_inbox_with_http_info(id)
275
365
  p status_code # => 2xx
276
366
  p headers # => { ... }
277
- p data # => <InboundEmailResponse>
367
+ p data # => nil
278
368
  rescue Zyphr::ApiError => e
279
- puts "Error when calling InboundEmailApi->get_inbound_email_with_http_info: #{e}"
369
+ puts "Error when calling InboundEmailApi->delete_inbox_with_http_info: #{e}"
280
370
  end
281
371
  ```
282
372
 
@@ -288,7 +378,7 @@ end
288
378
 
289
379
  ### Return type
290
380
 
291
- [**InboundEmailResponse**](InboundEmailResponse.md)
381
+ nil (empty response body)
292
382
 
293
383
  ### Authorization
294
384
 
@@ -297,14 +387,14 @@ end
297
387
  ### HTTP request headers
298
388
 
299
389
  - **Content-Type**: Not defined
300
- - **Accept**: application/json
390
+ - **Accept**: Not defined
301
391
 
302
392
 
303
- ## get_inbox
393
+ ## delete_inbox_draft
304
394
 
305
- > <InboxResponse> get_inbox(id)
395
+ > delete_inbox_draft(draft_id)
306
396
 
307
- Get an inbox
397
+ Delete a draft
308
398
 
309
399
  ### Examples
310
400
 
@@ -320,32 +410,31 @@ Zyphr.configure do |config|
320
410
  end
321
411
 
322
412
  api_instance = Zyphr::InboundEmailApi.new
323
- id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
413
+ draft_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
324
414
 
325
415
  begin
326
- # Get an inbox
327
- result = api_instance.get_inbox(id)
328
- p result
416
+ # Delete a draft
417
+ api_instance.delete_inbox_draft(draft_id)
329
418
  rescue Zyphr::ApiError => e
330
- puts "Error when calling InboundEmailApi->get_inbox: #{e}"
419
+ puts "Error when calling InboundEmailApi->delete_inbox_draft: #{e}"
331
420
  end
332
421
  ```
333
422
 
334
- #### Using the get_inbox_with_http_info variant
423
+ #### Using the delete_inbox_draft_with_http_info variant
335
424
 
336
- This returns an Array which contains the response data, status code and headers.
425
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
337
426
 
338
- > <Array(<InboxResponse>, Integer, Hash)> get_inbox_with_http_info(id)
427
+ > <Array(nil, Integer, Hash)> delete_inbox_draft_with_http_info(draft_id)
339
428
 
340
429
  ```ruby
341
430
  begin
342
- # Get an inbox
343
- data, status_code, headers = api_instance.get_inbox_with_http_info(id)
431
+ # Delete a draft
432
+ data, status_code, headers = api_instance.delete_inbox_draft_with_http_info(draft_id)
344
433
  p status_code # => 2xx
345
434
  p headers # => { ... }
346
- p data # => <InboxResponse>
435
+ p data # => nil
347
436
  rescue Zyphr::ApiError => e
348
- puts "Error when calling InboundEmailApi->get_inbox_with_http_info: #{e}"
437
+ puts "Error when calling InboundEmailApi->delete_inbox_draft_with_http_info: #{e}"
349
438
  end
350
439
  ```
351
440
 
@@ -353,11 +442,11 @@ end
353
442
 
354
443
  | Name | Type | Description | Notes |
355
444
  | ---- | ---- | ----------- | ----- |
356
- | **id** | **String** | | |
445
+ | **draft_id** | **String** | | |
357
446
 
358
447
  ### Return type
359
448
 
360
- [**InboxResponse**](InboxResponse.md)
449
+ nil (empty response body)
361
450
 
362
451
  ### Authorization
363
452
 
@@ -366,16 +455,16 @@ end
366
455
  ### HTTP request headers
367
456
 
368
457
  - **Content-Type**: Not defined
369
- - **Accept**: application/json
458
+ - **Accept**: Not defined
370
459
 
371
460
 
372
- ## list_inbound_emails
461
+ ## delete_inbox_label
373
462
 
374
- > <InboundEmailListResponse> list_inbound_emails(opts)
463
+ > delete_inbox_label(label_id)
375
464
 
376
- List received emails
465
+ Delete a label
377
466
 
378
- List inbound (received) emails for the project, newest first. By default only delivered mail (`received`/`processed`) is returned; pass `include_withheld=true` to also see quarantined/dropped.
467
+ Also removes it from every thread.
379
468
 
380
469
  ### Examples
381
470
 
@@ -391,39 +480,31 @@ Zyphr.configure do |config|
391
480
  end
392
481
 
393
482
  api_instance = Zyphr::InboundEmailApi.new
394
- opts = {
395
- status: 'received', # String |
396
- to: 'to_example', # String | Filter by receiving address
397
- inbox_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String | Only mail that landed in this inbox (see /inboxes)
398
- include_withheld: true, # Boolean | Include quarantined/dropped mail
399
- limit: 56, # Integer |
400
- offset: 56 # Integer |
401
- }
483
+ label_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
402
484
 
403
485
  begin
404
- # List received emails
405
- result = api_instance.list_inbound_emails(opts)
406
- p result
486
+ # Delete a label
487
+ api_instance.delete_inbox_label(label_id)
407
488
  rescue Zyphr::ApiError => e
408
- puts "Error when calling InboundEmailApi->list_inbound_emails: #{e}"
489
+ puts "Error when calling InboundEmailApi->delete_inbox_label: #{e}"
409
490
  end
410
491
  ```
411
492
 
412
- #### Using the list_inbound_emails_with_http_info variant
493
+ #### Using the delete_inbox_label_with_http_info variant
413
494
 
414
- This returns an Array which contains the response data, status code and headers.
495
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
415
496
 
416
- > <Array(<InboundEmailListResponse>, Integer, Hash)> list_inbound_emails_with_http_info(opts)
497
+ > <Array(nil, Integer, Hash)> delete_inbox_label_with_http_info(label_id)
417
498
 
418
499
  ```ruby
419
500
  begin
420
- # List received emails
421
- data, status_code, headers = api_instance.list_inbound_emails_with_http_info(opts)
501
+ # Delete a label
502
+ data, status_code, headers = api_instance.delete_inbox_label_with_http_info(label_id)
422
503
  p status_code # => 2xx
423
504
  p headers # => { ... }
424
- p data # => <InboundEmailListResponse>
505
+ p data # => nil
425
506
  rescue Zyphr::ApiError => e
426
- puts "Error when calling InboundEmailApi->list_inbound_emails_with_http_info: #{e}"
507
+ puts "Error when calling InboundEmailApi->delete_inbox_label_with_http_info: #{e}"
427
508
  end
428
509
  ```
429
510
 
@@ -431,16 +512,11 @@ end
431
512
 
432
513
  | Name | Type | Description | Notes |
433
514
  | ---- | ---- | ----------- | ----- |
434
- | **status** | **String** | | [optional] |
435
- | **to** | **String** | Filter by receiving address | [optional] |
436
- | **inbox_id** | **String** | Only mail that landed in this inbox (see /inboxes) | [optional] |
437
- | **include_withheld** | **Boolean** | Include quarantined/dropped mail | [optional] |
438
- | **limit** | **Integer** | | [optional][default to 50] |
439
- | **offset** | **Integer** | | [optional][default to 0] |
515
+ | **label_id** | **String** | | |
440
516
 
441
517
  ### Return type
442
518
 
443
- [**InboundEmailListResponse**](InboundEmailListResponse.md)
519
+ nil (empty response body)
444
520
 
445
521
  ### Authorization
446
522
 
@@ -449,14 +525,16 @@ end
449
525
  ### HTTP request headers
450
526
 
451
527
  - **Content-Type**: Not defined
452
- - **Accept**: application/json
528
+ - **Accept**: Not defined
453
529
 
454
530
 
455
- ## list_inboxes
531
+ ## delete_inbox_thread
456
532
 
457
- > <InboxListResponse> list_inboxes(opts)
533
+ > delete_inbox_thread(thread_id)
458
534
 
459
- List inboxes
535
+ Delete a thread
536
+
537
+ Deletes the conversation. Its emails are kept and still appear in the received list, unthreaded.
460
538
 
461
539
  ### Examples
462
540
 
@@ -472,34 +550,31 @@ Zyphr.configure do |config|
472
550
  end
473
551
 
474
552
  api_instance = Zyphr::InboundEmailApi.new
475
- opts = {
476
- include_counts: true # Boolean | Add `received_count` to each inbox and `meta.received_total` (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list.
477
- }
553
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
478
554
 
479
555
  begin
480
- # List inboxes
481
- result = api_instance.list_inboxes(opts)
482
- p result
556
+ # Delete a thread
557
+ api_instance.delete_inbox_thread(thread_id)
483
558
  rescue Zyphr::ApiError => e
484
- puts "Error when calling InboundEmailApi->list_inboxes: #{e}"
559
+ puts "Error when calling InboundEmailApi->delete_inbox_thread: #{e}"
485
560
  end
486
561
  ```
487
562
 
488
- #### Using the list_inboxes_with_http_info variant
563
+ #### Using the delete_inbox_thread_with_http_info variant
489
564
 
490
- This returns an Array which contains the response data, status code and headers.
565
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
491
566
 
492
- > <Array(<InboxListResponse>, Integer, Hash)> list_inboxes_with_http_info(opts)
567
+ > <Array(nil, Integer, Hash)> delete_inbox_thread_with_http_info(thread_id)
493
568
 
494
569
  ```ruby
495
570
  begin
496
- # List inboxes
497
- data, status_code, headers = api_instance.list_inboxes_with_http_info(opts)
571
+ # Delete a thread
572
+ data, status_code, headers = api_instance.delete_inbox_thread_with_http_info(thread_id)
498
573
  p status_code # => 2xx
499
574
  p headers # => { ... }
500
- p data # => <InboxListResponse>
575
+ p data # => nil
501
576
  rescue Zyphr::ApiError => e
502
- puts "Error when calling InboundEmailApi->list_inboxes_with_http_info: #{e}"
577
+ puts "Error when calling InboundEmailApi->delete_inbox_thread_with_http_info: #{e}"
503
578
  end
504
579
  ```
505
580
 
@@ -507,11 +582,11 @@ end
507
582
 
508
583
  | Name | Type | Description | Notes |
509
584
  | ---- | ---- | ----------- | ----- |
510
- | **include_counts** | **Boolean** | Add &#x60;received_count&#x60; to each inbox and &#x60;meta.received_total&#x60; (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list. | [optional] |
585
+ | **thread_id** | **String** | | |
511
586
 
512
587
  ### Return type
513
588
 
514
- [**InboxListResponse**](InboxListResponse.md)
589
+ nil (empty response body)
515
590
 
516
591
  ### Authorization
517
592
 
@@ -520,16 +595,16 @@ end
520
595
  ### HTTP request headers
521
596
 
522
597
  - **Content-Type**: Not defined
523
- - **Accept**: application/json
598
+ - **Accept**: Not defined
524
599
 
525
600
 
526
- ## reply_to_inbound_email
601
+ ## forward_inbound_email
527
602
 
528
- > <SendEmailResponse> reply_to_inbound_email(id, reply_to_inbound_email_request, opts)
603
+ > <SendEmailResponse> forward_inbound_email(id, forward_email_request, opts)
529
604
 
530
- Reply to a received email
605
+ Forward a received email
531
606
 
532
- Send a reply to a received email that threads under the original in the recipient's mail client. Zyphr sets `to` (the original sender), the `Re:` subject, and the `In-Reply-To` / `References` headers from the received email; any of those fields in the body are ignored. Everything else behaves exactly like `POST /emails` (`html`/`text`, `send_at`/`delay`, quotas, suppression). A reply is relationship mail (no `List-Unsubscribe` headers; a recipient's marketing unsubscribe and the throttle's random drop do not block it; bounces and complaints still do) when the received email passed DMARC, the reply is not `classification: marketing`, it is sent within 30 days of receipt, and it is one of the first 3 such replies to that email. Otherwise it is sent as ordinary mail. Templates are not supported, because a template's own subject would break threading. Quarantined or dropped mail cannot be replied to.
607
+ Send a received email on to someone else. Zyphr sets the `Fwd:` subject and quotes the original (sender, date, subject, recipients and body) under your optional `text`/`html` note. The original attachments go with it unless `include_attachments` is false; they are copied inside Zyphr, never re-uploaded. The whole email, attachments included, must fit the 10 MB email limit (about 7 MB of attachments). `reply_to` defaults to the inbox address, so an answer comes back to Zyphr. The forward joins the email's thread. It is ordinary mail: suppression and unsubscribes apply. Forwards are sent immediately (no `send_at`/`delay`) and cannot use a template. Quarantined or dropped mail cannot be forwarded.
533
608
 
534
609
  ### Examples
535
610
 
@@ -546,35 +621,35 @@ end
546
621
 
547
622
  api_instance = Zyphr::InboundEmailApi.new
548
623
  id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
549
- reply_to_inbound_email_request = Zyphr::ReplyToInboundEmailRequest.new({from: Zyphr::EmailAddress.new}) # ReplyToInboundEmailRequest |
624
+ forward_email_request = Zyphr::ForwardEmailRequest.new({from: Zyphr::EmailAddress.new, to: Zyphr::EmailAddress.new}) # ForwardEmailRequest |
550
625
  opts = {
551
626
  idempotency_key: 'idempotency_key_example' # String |
552
627
  }
553
628
 
554
629
  begin
555
- # Reply to a received email
556
- result = api_instance.reply_to_inbound_email(id, reply_to_inbound_email_request, opts)
630
+ # Forward a received email
631
+ result = api_instance.forward_inbound_email(id, forward_email_request, opts)
557
632
  p result
558
633
  rescue Zyphr::ApiError => e
559
- puts "Error when calling InboundEmailApi->reply_to_inbound_email: #{e}"
634
+ puts "Error when calling InboundEmailApi->forward_inbound_email: #{e}"
560
635
  end
561
636
  ```
562
637
 
563
- #### Using the reply_to_inbound_email_with_http_info variant
638
+ #### Using the forward_inbound_email_with_http_info variant
564
639
 
565
640
  This returns an Array which contains the response data, status code and headers.
566
641
 
567
- > <Array(<SendEmailResponse>, Integer, Hash)> reply_to_inbound_email_with_http_info(id, reply_to_inbound_email_request, opts)
642
+ > <Array(<SendEmailResponse>, Integer, Hash)> forward_inbound_email_with_http_info(id, forward_email_request, opts)
568
643
 
569
644
  ```ruby
570
645
  begin
571
- # Reply to a received email
572
- data, status_code, headers = api_instance.reply_to_inbound_email_with_http_info(id, reply_to_inbound_email_request, opts)
646
+ # Forward a received email
647
+ data, status_code, headers = api_instance.forward_inbound_email_with_http_info(id, forward_email_request, opts)
573
648
  p status_code # => 2xx
574
649
  p headers # => { ... }
575
650
  p data # => <SendEmailResponse>
576
651
  rescue Zyphr::ApiError => e
577
- puts "Error when calling InboundEmailApi->reply_to_inbound_email_with_http_info: #{e}"
652
+ puts "Error when calling InboundEmailApi->forward_inbound_email_with_http_info: #{e}"
578
653
  end
579
654
  ```
580
655
 
@@ -583,7 +658,7 @@ end
583
658
  | Name | Type | Description | Notes |
584
659
  | ---- | ---- | ----------- | ----- |
585
660
  | **id** | **String** | | |
586
- | **reply_to_inbound_email_request** | [**ReplyToInboundEmailRequest**](ReplyToInboundEmailRequest.md) | | |
661
+ | **forward_email_request** | [**ForwardEmailRequest**](ForwardEmailRequest.md) | | |
587
662
  | **idempotency_key** | **String** | | [optional] |
588
663
 
589
664
  ### Return type
@@ -600,13 +675,13 @@ end
600
675
  - **Accept**: application/json
601
676
 
602
677
 
603
- ## update_inbox
678
+ ## forward_inbox_thread_email
604
679
 
605
- > <InboxResponse> update_inbox(id, update_inbox_request)
680
+ > <SendEmailResponse> forward_inbox_thread_email(thread_id, email_id, forward_email_request, opts)
606
681
 
607
- Update an inbox
682
+ Forward an email in a thread
608
683
 
609
- Rename the inbox or change the display name recipients see. The address cannot change. On the catch-all, `enabled: false` turns on strict addresses: mail to any address without a named inbox is dropped until it is re-enabled. Named inboxes cannot be disabled (422 `not_catch_all`).
684
+ Forwards one received email of the thread, exactly as `POST /inbound-emails/{id}/forward` does: `Fwd:` subject, the original quoted under your note, its attachments copied unless `include_attachments` is false, and `reply_to` defaulting to the inbox address. The forward joins this thread. Sent emails cannot be forwarded here. Test-mode keys cannot forward.
610
685
 
611
686
  ### Examples
612
687
 
@@ -622,33 +697,37 @@ Zyphr.configure do |config|
622
697
  end
623
698
 
624
699
  api_instance = Zyphr::InboundEmailApi.new
625
- id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
626
- update_inbox_request = Zyphr::UpdateInboxRequest.new # UpdateInboxRequest |
700
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
701
+ email_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
702
+ forward_email_request = Zyphr::ForwardEmailRequest.new({from: Zyphr::EmailAddress.new, to: Zyphr::EmailAddress.new}) # ForwardEmailRequest |
703
+ opts = {
704
+ idempotency_key: 'idempotency_key_example' # String |
705
+ }
627
706
 
628
707
  begin
629
- # Update an inbox
630
- result = api_instance.update_inbox(id, update_inbox_request)
708
+ # Forward an email in a thread
709
+ result = api_instance.forward_inbox_thread_email(thread_id, email_id, forward_email_request, opts)
631
710
  p result
632
711
  rescue Zyphr::ApiError => e
633
- puts "Error when calling InboundEmailApi->update_inbox: #{e}"
712
+ puts "Error when calling InboundEmailApi->forward_inbox_thread_email: #{e}"
634
713
  end
635
714
  ```
636
715
 
637
- #### Using the update_inbox_with_http_info variant
716
+ #### Using the forward_inbox_thread_email_with_http_info variant
638
717
 
639
718
  This returns an Array which contains the response data, status code and headers.
640
719
 
641
- > <Array(<InboxResponse>, Integer, Hash)> update_inbox_with_http_info(id, update_inbox_request)
720
+ > <Array(<SendEmailResponse>, Integer, Hash)> forward_inbox_thread_email_with_http_info(thread_id, email_id, forward_email_request, opts)
642
721
 
643
722
  ```ruby
644
723
  begin
645
- # Update an inbox
646
- data, status_code, headers = api_instance.update_inbox_with_http_info(id, update_inbox_request)
724
+ # Forward an email in a thread
725
+ data, status_code, headers = api_instance.forward_inbox_thread_email_with_http_info(thread_id, email_id, forward_email_request, opts)
647
726
  p status_code # => 2xx
648
727
  p headers # => { ... }
649
- p data # => <InboxResponse>
728
+ p data # => <SendEmailResponse>
650
729
  rescue Zyphr::ApiError => e
651
- puts "Error when calling InboundEmailApi->update_inbox_with_http_info: #{e}"
730
+ puts "Error when calling InboundEmailApi->forward_inbox_thread_email_with_http_info: #{e}"
652
731
  end
653
732
  ```
654
733
 
@@ -656,12 +735,1629 @@ end
656
735
 
657
736
  | Name | Type | Description | Notes |
658
737
  | ---- | ---- | ----------- | ----- |
659
- | **id** | **String** | | |
660
- | **update_inbox_request** | [**UpdateInboxRequest**](UpdateInboxRequest.md) | | |
738
+ | **thread_id** | **String** | | |
739
+ | **email_id** | **String** | | |
740
+ | **forward_email_request** | [**ForwardEmailRequest**](ForwardEmailRequest.md) | | |
741
+ | **idempotency_key** | **String** | | [optional] |
661
742
 
662
743
  ### Return type
663
744
 
664
- [**InboxResponse**](InboxResponse.md)
745
+ [**SendEmailResponse**](SendEmailResponse.md)
746
+
747
+ ### Authorization
748
+
749
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
750
+
751
+ ### HTTP request headers
752
+
753
+ - **Content-Type**: application/json
754
+ - **Accept**: application/json
755
+
756
+
757
+ ## get_inbound_attachment_url
758
+
759
+ > <InboundAttachmentUrlResponse> get_inbound_attachment_url(id, attachment_id)
760
+
761
+ Get an attachment download URL
762
+
763
+ Return a short-lived presigned S3 download URL for one attachment of a received email. `attachmentId` is the positional id from the email's `attachments` array.
764
+
765
+ ### Examples
766
+
767
+ ```ruby
768
+ require 'time'
769
+ require 'zyphr'
770
+ # setup authorization
771
+ Zyphr.configure do |config|
772
+ # Configure API key authorization: ApiKeyAuth
773
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
774
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
775
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
776
+ end
777
+
778
+ api_instance = Zyphr::InboundEmailApi.new
779
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
780
+ attachment_id = 'attachment_id_example' # String |
781
+
782
+ begin
783
+ # Get an attachment download URL
784
+ result = api_instance.get_inbound_attachment_url(id, attachment_id)
785
+ p result
786
+ rescue Zyphr::ApiError => e
787
+ puts "Error when calling InboundEmailApi->get_inbound_attachment_url: #{e}"
788
+ end
789
+ ```
790
+
791
+ #### Using the get_inbound_attachment_url_with_http_info variant
792
+
793
+ This returns an Array which contains the response data, status code and headers.
794
+
795
+ > <Array(<InboundAttachmentUrlResponse>, Integer, Hash)> get_inbound_attachment_url_with_http_info(id, attachment_id)
796
+
797
+ ```ruby
798
+ begin
799
+ # Get an attachment download URL
800
+ data, status_code, headers = api_instance.get_inbound_attachment_url_with_http_info(id, attachment_id)
801
+ p status_code # => 2xx
802
+ p headers # => { ... }
803
+ p data # => <InboundAttachmentUrlResponse>
804
+ rescue Zyphr::ApiError => e
805
+ puts "Error when calling InboundEmailApi->get_inbound_attachment_url_with_http_info: #{e}"
806
+ end
807
+ ```
808
+
809
+ ### Parameters
810
+
811
+ | Name | Type | Description | Notes |
812
+ | ---- | ---- | ----------- | ----- |
813
+ | **id** | **String** | | |
814
+ | **attachment_id** | **String** | | |
815
+
816
+ ### Return type
817
+
818
+ [**InboundAttachmentUrlResponse**](InboundAttachmentUrlResponse.md)
819
+
820
+ ### Authorization
821
+
822
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
823
+
824
+ ### HTTP request headers
825
+
826
+ - **Content-Type**: Not defined
827
+ - **Accept**: application/json
828
+
829
+
830
+ ## get_inbound_email
831
+
832
+ > <InboundEmailResponse> get_inbound_email(id)
833
+
834
+ Get a received email
835
+
836
+ Retrieve a single inbound email by id (scoped to the project).
837
+
838
+ ### Examples
839
+
840
+ ```ruby
841
+ require 'time'
842
+ require 'zyphr'
843
+ # setup authorization
844
+ Zyphr.configure do |config|
845
+ # Configure API key authorization: ApiKeyAuth
846
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
847
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
848
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
849
+ end
850
+
851
+ api_instance = Zyphr::InboundEmailApi.new
852
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
853
+
854
+ begin
855
+ # Get a received email
856
+ result = api_instance.get_inbound_email(id)
857
+ p result
858
+ rescue Zyphr::ApiError => e
859
+ puts "Error when calling InboundEmailApi->get_inbound_email: #{e}"
860
+ end
861
+ ```
862
+
863
+ #### Using the get_inbound_email_with_http_info variant
864
+
865
+ This returns an Array which contains the response data, status code and headers.
866
+
867
+ > <Array(<InboundEmailResponse>, Integer, Hash)> get_inbound_email_with_http_info(id)
868
+
869
+ ```ruby
870
+ begin
871
+ # Get a received email
872
+ data, status_code, headers = api_instance.get_inbound_email_with_http_info(id)
873
+ p status_code # => 2xx
874
+ p headers # => { ... }
875
+ p data # => <InboundEmailResponse>
876
+ rescue Zyphr::ApiError => e
877
+ puts "Error when calling InboundEmailApi->get_inbound_email_with_http_info: #{e}"
878
+ end
879
+ ```
880
+
881
+ ### Parameters
882
+
883
+ | Name | Type | Description | Notes |
884
+ | ---- | ---- | ----------- | ----- |
885
+ | **id** | **String** | | |
886
+
887
+ ### Return type
888
+
889
+ [**InboundEmailResponse**](InboundEmailResponse.md)
890
+
891
+ ### Authorization
892
+
893
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
894
+
895
+ ### HTTP request headers
896
+
897
+ - **Content-Type**: Not defined
898
+ - **Accept**: application/json
899
+
900
+
901
+ ## get_inbox
902
+
903
+ > <InboxResponse> get_inbox(id)
904
+
905
+ Get an inbox
906
+
907
+ ### Examples
908
+
909
+ ```ruby
910
+ require 'time'
911
+ require 'zyphr'
912
+ # setup authorization
913
+ Zyphr.configure do |config|
914
+ # Configure API key authorization: ApiKeyAuth
915
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
916
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
917
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
918
+ end
919
+
920
+ api_instance = Zyphr::InboundEmailApi.new
921
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
922
+
923
+ begin
924
+ # Get an inbox
925
+ result = api_instance.get_inbox(id)
926
+ p result
927
+ rescue Zyphr::ApiError => e
928
+ puts "Error when calling InboundEmailApi->get_inbox: #{e}"
929
+ end
930
+ ```
931
+
932
+ #### Using the get_inbox_with_http_info variant
933
+
934
+ This returns an Array which contains the response data, status code and headers.
935
+
936
+ > <Array(<InboxResponse>, Integer, Hash)> get_inbox_with_http_info(id)
937
+
938
+ ```ruby
939
+ begin
940
+ # Get an inbox
941
+ data, status_code, headers = api_instance.get_inbox_with_http_info(id)
942
+ p status_code # => 2xx
943
+ p headers # => { ... }
944
+ p data # => <InboxResponse>
945
+ rescue Zyphr::ApiError => e
946
+ puts "Error when calling InboundEmailApi->get_inbox_with_http_info: #{e}"
947
+ end
948
+ ```
949
+
950
+ ### Parameters
951
+
952
+ | Name | Type | Description | Notes |
953
+ | ---- | ---- | ----------- | ----- |
954
+ | **id** | **String** | | |
955
+
956
+ ### Return type
957
+
958
+ [**InboxResponse**](InboxResponse.md)
959
+
960
+ ### Authorization
961
+
962
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
963
+
964
+ ### HTTP request headers
965
+
966
+ - **Content-Type**: Not defined
967
+ - **Accept**: application/json
968
+
969
+
970
+ ## get_inbox_draft
971
+
972
+ > <DraftResponse> get_inbox_draft(draft_id)
973
+
974
+ Get a draft
975
+
976
+ ### Examples
977
+
978
+ ```ruby
979
+ require 'time'
980
+ require 'zyphr'
981
+ # setup authorization
982
+ Zyphr.configure do |config|
983
+ # Configure API key authorization: ApiKeyAuth
984
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
985
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
986
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
987
+ end
988
+
989
+ api_instance = Zyphr::InboundEmailApi.new
990
+ draft_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
991
+
992
+ begin
993
+ # Get a draft
994
+ result = api_instance.get_inbox_draft(draft_id)
995
+ p result
996
+ rescue Zyphr::ApiError => e
997
+ puts "Error when calling InboundEmailApi->get_inbox_draft: #{e}"
998
+ end
999
+ ```
1000
+
1001
+ #### Using the get_inbox_draft_with_http_info variant
1002
+
1003
+ This returns an Array which contains the response data, status code and headers.
1004
+
1005
+ > <Array(<DraftResponse>, Integer, Hash)> get_inbox_draft_with_http_info(draft_id)
1006
+
1007
+ ```ruby
1008
+ begin
1009
+ # Get a draft
1010
+ data, status_code, headers = api_instance.get_inbox_draft_with_http_info(draft_id)
1011
+ p status_code # => 2xx
1012
+ p headers # => { ... }
1013
+ p data # => <DraftResponse>
1014
+ rescue Zyphr::ApiError => e
1015
+ puts "Error when calling InboundEmailApi->get_inbox_draft_with_http_info: #{e}"
1016
+ end
1017
+ ```
1018
+
1019
+ ### Parameters
1020
+
1021
+ | Name | Type | Description | Notes |
1022
+ | ---- | ---- | ----------- | ----- |
1023
+ | **draft_id** | **String** | | |
1024
+
1025
+ ### Return type
1026
+
1027
+ [**DraftResponse**](DraftResponse.md)
1028
+
1029
+ ### Authorization
1030
+
1031
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1032
+
1033
+ ### HTTP request headers
1034
+
1035
+ - **Content-Type**: Not defined
1036
+ - **Accept**: application/json
1037
+
1038
+
1039
+ ## get_inbox_label
1040
+
1041
+ > <InboxLabelResponse> get_inbox_label(label_id)
1042
+
1043
+ Get a label
1044
+
1045
+ ### Examples
1046
+
1047
+ ```ruby
1048
+ require 'time'
1049
+ require 'zyphr'
1050
+ # setup authorization
1051
+ Zyphr.configure do |config|
1052
+ # Configure API key authorization: ApiKeyAuth
1053
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1054
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1055
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1056
+ end
1057
+
1058
+ api_instance = Zyphr::InboundEmailApi.new
1059
+ label_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
1060
+
1061
+ begin
1062
+ # Get a label
1063
+ result = api_instance.get_inbox_label(label_id)
1064
+ p result
1065
+ rescue Zyphr::ApiError => e
1066
+ puts "Error when calling InboundEmailApi->get_inbox_label: #{e}"
1067
+ end
1068
+ ```
1069
+
1070
+ #### Using the get_inbox_label_with_http_info variant
1071
+
1072
+ This returns an Array which contains the response data, status code and headers.
1073
+
1074
+ > <Array(<InboxLabelResponse>, Integer, Hash)> get_inbox_label_with_http_info(label_id)
1075
+
1076
+ ```ruby
1077
+ begin
1078
+ # Get a label
1079
+ data, status_code, headers = api_instance.get_inbox_label_with_http_info(label_id)
1080
+ p status_code # => 2xx
1081
+ p headers # => { ... }
1082
+ p data # => <InboxLabelResponse>
1083
+ rescue Zyphr::ApiError => e
1084
+ puts "Error when calling InboundEmailApi->get_inbox_label_with_http_info: #{e}"
1085
+ end
1086
+ ```
1087
+
1088
+ ### Parameters
1089
+
1090
+ | Name | Type | Description | Notes |
1091
+ | ---- | ---- | ----------- | ----- |
1092
+ | **label_id** | **String** | | |
1093
+
1094
+ ### Return type
1095
+
1096
+ [**InboxLabelResponse**](InboxLabelResponse.md)
1097
+
1098
+ ### Authorization
1099
+
1100
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1101
+
1102
+ ### HTTP request headers
1103
+
1104
+ - **Content-Type**: Not defined
1105
+ - **Accept**: application/json
1106
+
1107
+
1108
+ ## get_inbox_thread
1109
+
1110
+ > <ThreadResponse> get_inbox_thread(thread_id)
1111
+
1112
+ Get a thread
1113
+
1114
+ ### Examples
1115
+
1116
+ ```ruby
1117
+ require 'time'
1118
+ require 'zyphr'
1119
+ # setup authorization
1120
+ Zyphr.configure do |config|
1121
+ # Configure API key authorization: ApiKeyAuth
1122
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1123
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1124
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1125
+ end
1126
+
1127
+ api_instance = Zyphr::InboundEmailApi.new
1128
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
1129
+
1130
+ begin
1131
+ # Get a thread
1132
+ result = api_instance.get_inbox_thread(thread_id)
1133
+ p result
1134
+ rescue Zyphr::ApiError => e
1135
+ puts "Error when calling InboundEmailApi->get_inbox_thread: #{e}"
1136
+ end
1137
+ ```
1138
+
1139
+ #### Using the get_inbox_thread_with_http_info variant
1140
+
1141
+ This returns an Array which contains the response data, status code and headers.
1142
+
1143
+ > <Array(<ThreadResponse>, Integer, Hash)> get_inbox_thread_with_http_info(thread_id)
1144
+
1145
+ ```ruby
1146
+ begin
1147
+ # Get a thread
1148
+ data, status_code, headers = api_instance.get_inbox_thread_with_http_info(thread_id)
1149
+ p status_code # => 2xx
1150
+ p headers # => { ... }
1151
+ p data # => <ThreadResponse>
1152
+ rescue Zyphr::ApiError => e
1153
+ puts "Error when calling InboundEmailApi->get_inbox_thread_with_http_info: #{e}"
1154
+ end
1155
+ ```
1156
+
1157
+ ### Parameters
1158
+
1159
+ | Name | Type | Description | Notes |
1160
+ | ---- | ---- | ----------- | ----- |
1161
+ | **thread_id** | **String** | | |
1162
+
1163
+ ### Return type
1164
+
1165
+ [**ThreadResponse**](ThreadResponse.md)
1166
+
1167
+ ### Authorization
1168
+
1169
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1170
+
1171
+ ### HTTP request headers
1172
+
1173
+ - **Content-Type**: Not defined
1174
+ - **Accept**: application/json
1175
+
1176
+
1177
+ ## get_inbox_thread_email
1178
+
1179
+ > <ThreadEmailResponse> get_inbox_thread_email(thread_id, email_id)
1180
+
1181
+ Get an email in a thread
1182
+
1183
+ ### Examples
1184
+
1185
+ ```ruby
1186
+ require 'time'
1187
+ require 'zyphr'
1188
+ # setup authorization
1189
+ Zyphr.configure do |config|
1190
+ # Configure API key authorization: ApiKeyAuth
1191
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1192
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1193
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1194
+ end
1195
+
1196
+ api_instance = Zyphr::InboundEmailApi.new
1197
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
1198
+ email_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
1199
+
1200
+ begin
1201
+ # Get an email in a thread
1202
+ result = api_instance.get_inbox_thread_email(thread_id, email_id)
1203
+ p result
1204
+ rescue Zyphr::ApiError => e
1205
+ puts "Error when calling InboundEmailApi->get_inbox_thread_email: #{e}"
1206
+ end
1207
+ ```
1208
+
1209
+ #### Using the get_inbox_thread_email_with_http_info variant
1210
+
1211
+ This returns an Array which contains the response data, status code and headers.
1212
+
1213
+ > <Array(<ThreadEmailResponse>, Integer, Hash)> get_inbox_thread_email_with_http_info(thread_id, email_id)
1214
+
1215
+ ```ruby
1216
+ begin
1217
+ # Get an email in a thread
1218
+ data, status_code, headers = api_instance.get_inbox_thread_email_with_http_info(thread_id, email_id)
1219
+ p status_code # => 2xx
1220
+ p headers # => { ... }
1221
+ p data # => <ThreadEmailResponse>
1222
+ rescue Zyphr::ApiError => e
1223
+ puts "Error when calling InboundEmailApi->get_inbox_thread_email_with_http_info: #{e}"
1224
+ end
1225
+ ```
1226
+
1227
+ ### Parameters
1228
+
1229
+ | Name | Type | Description | Notes |
1230
+ | ---- | ---- | ----------- | ----- |
1231
+ | **thread_id** | **String** | | |
1232
+ | **email_id** | **String** | | |
1233
+
1234
+ ### Return type
1235
+
1236
+ [**ThreadEmailResponse**](ThreadEmailResponse.md)
1237
+
1238
+ ### Authorization
1239
+
1240
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1241
+
1242
+ ### HTTP request headers
1243
+
1244
+ - **Content-Type**: Not defined
1245
+ - **Accept**: application/json
1246
+
1247
+
1248
+ ## list_inbound_emails
1249
+
1250
+ > <InboundEmailListResponse> list_inbound_emails(opts)
1251
+
1252
+ List received emails
1253
+
1254
+ List inbound (received) emails for the project, newest first. By default only delivered mail (`received`/`processed`) is returned; pass `include_withheld=true` to also see quarantined/dropped.
1255
+
1256
+ ### Examples
1257
+
1258
+ ```ruby
1259
+ require 'time'
1260
+ require 'zyphr'
1261
+ # setup authorization
1262
+ Zyphr.configure do |config|
1263
+ # Configure API key authorization: ApiKeyAuth
1264
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1265
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1266
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1267
+ end
1268
+
1269
+ api_instance = Zyphr::InboundEmailApi.new
1270
+ opts = {
1271
+ status: 'received', # String |
1272
+ to: 'to_example', # String | Filter by receiving address
1273
+ inbox_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String | Only mail that landed in this inbox (see /inboxes)
1274
+ include_withheld: true, # Boolean | Include quarantined/dropped mail
1275
+ limit: 56, # Integer |
1276
+ offset: 56 # Integer |
1277
+ }
1278
+
1279
+ begin
1280
+ # List received emails
1281
+ result = api_instance.list_inbound_emails(opts)
1282
+ p result
1283
+ rescue Zyphr::ApiError => e
1284
+ puts "Error when calling InboundEmailApi->list_inbound_emails: #{e}"
1285
+ end
1286
+ ```
1287
+
1288
+ #### Using the list_inbound_emails_with_http_info variant
1289
+
1290
+ This returns an Array which contains the response data, status code and headers.
1291
+
1292
+ > <Array(<InboundEmailListResponse>, Integer, Hash)> list_inbound_emails_with_http_info(opts)
1293
+
1294
+ ```ruby
1295
+ begin
1296
+ # List received emails
1297
+ data, status_code, headers = api_instance.list_inbound_emails_with_http_info(opts)
1298
+ p status_code # => 2xx
1299
+ p headers # => { ... }
1300
+ p data # => <InboundEmailListResponse>
1301
+ rescue Zyphr::ApiError => e
1302
+ puts "Error when calling InboundEmailApi->list_inbound_emails_with_http_info: #{e}"
1303
+ end
1304
+ ```
1305
+
1306
+ ### Parameters
1307
+
1308
+ | Name | Type | Description | Notes |
1309
+ | ---- | ---- | ----------- | ----- |
1310
+ | **status** | **String** | | [optional] |
1311
+ | **to** | **String** | Filter by receiving address | [optional] |
1312
+ | **inbox_id** | **String** | Only mail that landed in this inbox (see /inboxes) | [optional] |
1313
+ | **include_withheld** | **Boolean** | Include quarantined/dropped mail | [optional] |
1314
+ | **limit** | **Integer** | | [optional][default to 50] |
1315
+ | **offset** | **Integer** | | [optional][default to 0] |
1316
+
1317
+ ### Return type
1318
+
1319
+ [**InboundEmailListResponse**](InboundEmailListResponse.md)
1320
+
1321
+ ### Authorization
1322
+
1323
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1324
+
1325
+ ### HTTP request headers
1326
+
1327
+ - **Content-Type**: Not defined
1328
+ - **Accept**: application/json
1329
+
1330
+
1331
+ ## list_inbox_drafts
1332
+
1333
+ > <DraftListResponse> list_inbox_drafts(opts)
1334
+
1335
+ List drafts
1336
+
1337
+ Unsent emails in the project, newest first. Filter to one thread's drafts with `thread_id`.
1338
+
1339
+ ### Examples
1340
+
1341
+ ```ruby
1342
+ require 'time'
1343
+ require 'zyphr'
1344
+ # setup authorization
1345
+ Zyphr.configure do |config|
1346
+ # Configure API key authorization: ApiKeyAuth
1347
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1348
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1349
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1350
+ end
1351
+
1352
+ api_instance = Zyphr::InboundEmailApi.new
1353
+ opts = {
1354
+ thread_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String |
1355
+ limit: 56, # Integer |
1356
+ cursor: 'cursor_example' # String | `meta.next_cursor` from the previous page
1357
+ }
1358
+
1359
+ begin
1360
+ # List drafts
1361
+ result = api_instance.list_inbox_drafts(opts)
1362
+ p result
1363
+ rescue Zyphr::ApiError => e
1364
+ puts "Error when calling InboundEmailApi->list_inbox_drafts: #{e}"
1365
+ end
1366
+ ```
1367
+
1368
+ #### Using the list_inbox_drafts_with_http_info variant
1369
+
1370
+ This returns an Array which contains the response data, status code and headers.
1371
+
1372
+ > <Array(<DraftListResponse>, Integer, Hash)> list_inbox_drafts_with_http_info(opts)
1373
+
1374
+ ```ruby
1375
+ begin
1376
+ # List drafts
1377
+ data, status_code, headers = api_instance.list_inbox_drafts_with_http_info(opts)
1378
+ p status_code # => 2xx
1379
+ p headers # => { ... }
1380
+ p data # => <DraftListResponse>
1381
+ rescue Zyphr::ApiError => e
1382
+ puts "Error when calling InboundEmailApi->list_inbox_drafts_with_http_info: #{e}"
1383
+ end
1384
+ ```
1385
+
1386
+ ### Parameters
1387
+
1388
+ | Name | Type | Description | Notes |
1389
+ | ---- | ---- | ----------- | ----- |
1390
+ | **thread_id** | **String** | | [optional] |
1391
+ | **limit** | **Integer** | | [optional][default to 25] |
1392
+ | **cursor** | **String** | &#x60;meta.next_cursor&#x60; from the previous page | [optional] |
1393
+
1394
+ ### Return type
1395
+
1396
+ [**DraftListResponse**](DraftListResponse.md)
1397
+
1398
+ ### Authorization
1399
+
1400
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1401
+
1402
+ ### HTTP request headers
1403
+
1404
+ - **Content-Type**: Not defined
1405
+ - **Accept**: application/json
1406
+
1407
+
1408
+ ## list_inbox_labels
1409
+
1410
+ > <InboxLabelListResponse> list_inbox_labels
1411
+
1412
+ List labels
1413
+
1414
+ ### Examples
1415
+
1416
+ ```ruby
1417
+ require 'time'
1418
+ require 'zyphr'
1419
+ # setup authorization
1420
+ Zyphr.configure do |config|
1421
+ # Configure API key authorization: ApiKeyAuth
1422
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1423
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1424
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1425
+ end
1426
+
1427
+ api_instance = Zyphr::InboundEmailApi.new
1428
+
1429
+ begin
1430
+ # List labels
1431
+ result = api_instance.list_inbox_labels
1432
+ p result
1433
+ rescue Zyphr::ApiError => e
1434
+ puts "Error when calling InboundEmailApi->list_inbox_labels: #{e}"
1435
+ end
1436
+ ```
1437
+
1438
+ #### Using the list_inbox_labels_with_http_info variant
1439
+
1440
+ This returns an Array which contains the response data, status code and headers.
1441
+
1442
+ > <Array(<InboxLabelListResponse>, Integer, Hash)> list_inbox_labels_with_http_info
1443
+
1444
+ ```ruby
1445
+ begin
1446
+ # List labels
1447
+ data, status_code, headers = api_instance.list_inbox_labels_with_http_info
1448
+ p status_code # => 2xx
1449
+ p headers # => { ... }
1450
+ p data # => <InboxLabelListResponse>
1451
+ rescue Zyphr::ApiError => e
1452
+ puts "Error when calling InboundEmailApi->list_inbox_labels_with_http_info: #{e}"
1453
+ end
1454
+ ```
1455
+
1456
+ ### Parameters
1457
+
1458
+ This endpoint does not need any parameter.
1459
+
1460
+ ### Return type
1461
+
1462
+ [**InboxLabelListResponse**](InboxLabelListResponse.md)
1463
+
1464
+ ### Authorization
1465
+
1466
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1467
+
1468
+ ### HTTP request headers
1469
+
1470
+ - **Content-Type**: Not defined
1471
+ - **Accept**: application/json
1472
+
1473
+
1474
+ ## list_inbox_thread_emails
1475
+
1476
+ > <ThreadEmailListResponse> list_inbox_thread_emails(thread_id, opts)
1477
+
1478
+ List a thread's emails
1479
+
1480
+ The conversation, oldest first, received (`inbound`) and sent (`outbound`) together.
1481
+
1482
+ ### Examples
1483
+
1484
+ ```ruby
1485
+ require 'time'
1486
+ require 'zyphr'
1487
+ # setup authorization
1488
+ Zyphr.configure do |config|
1489
+ # Configure API key authorization: ApiKeyAuth
1490
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1491
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1492
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1493
+ end
1494
+
1495
+ api_instance = Zyphr::InboundEmailApi.new
1496
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
1497
+ opts = {
1498
+ limit: 56, # Integer |
1499
+ cursor: 'cursor_example' # String |
1500
+ }
1501
+
1502
+ begin
1503
+ # List a thread's emails
1504
+ result = api_instance.list_inbox_thread_emails(thread_id, opts)
1505
+ p result
1506
+ rescue Zyphr::ApiError => e
1507
+ puts "Error when calling InboundEmailApi->list_inbox_thread_emails: #{e}"
1508
+ end
1509
+ ```
1510
+
1511
+ #### Using the list_inbox_thread_emails_with_http_info variant
1512
+
1513
+ This returns an Array which contains the response data, status code and headers.
1514
+
1515
+ > <Array(<ThreadEmailListResponse>, Integer, Hash)> list_inbox_thread_emails_with_http_info(thread_id, opts)
1516
+
1517
+ ```ruby
1518
+ begin
1519
+ # List a thread's emails
1520
+ data, status_code, headers = api_instance.list_inbox_thread_emails_with_http_info(thread_id, opts)
1521
+ p status_code # => 2xx
1522
+ p headers # => { ... }
1523
+ p data # => <ThreadEmailListResponse>
1524
+ rescue Zyphr::ApiError => e
1525
+ puts "Error when calling InboundEmailApi->list_inbox_thread_emails_with_http_info: #{e}"
1526
+ end
1527
+ ```
1528
+
1529
+ ### Parameters
1530
+
1531
+ | Name | Type | Description | Notes |
1532
+ | ---- | ---- | ----------- | ----- |
1533
+ | **thread_id** | **String** | | |
1534
+ | **limit** | **Integer** | | [optional][default to 50] |
1535
+ | **cursor** | **String** | | [optional] |
1536
+
1537
+ ### Return type
1538
+
1539
+ [**ThreadEmailListResponse**](ThreadEmailListResponse.md)
1540
+
1541
+ ### Authorization
1542
+
1543
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1544
+
1545
+ ### HTTP request headers
1546
+
1547
+ - **Content-Type**: Not defined
1548
+ - **Accept**: application/json
1549
+
1550
+
1551
+ ## list_inbox_threads
1552
+
1553
+ > <ThreadListResponse> list_inbox_threads(opts)
1554
+
1555
+ List threads
1556
+
1557
+ Conversations in the project, most recent activity first. A thread groups received mail and your replies by their `In-Reply-To` / `References` headers. Filters combine with AND; `q` matches the subject, participant addresses and message text. Paginate with the `next_cursor` from the previous page.
1558
+
1559
+ ### Examples
1560
+
1561
+ ```ruby
1562
+ require 'time'
1563
+ require 'zyphr'
1564
+ # setup authorization
1565
+ Zyphr.configure do |config|
1566
+ # Configure API key authorization: ApiKeyAuth
1567
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1568
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1569
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1570
+ end
1571
+
1572
+ api_instance = Zyphr::InboundEmailApi.new
1573
+ opts = {
1574
+ inbox_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String |
1575
+ folder: Zyphr::ThreadFolder::INBOX, # ThreadFolder |
1576
+ read: true, # Boolean |
1577
+ assignee_user_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String |
1578
+ label_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String |
1579
+ q: 'q_example', # String |
1580
+ limit: 56, # Integer |
1581
+ cursor: 'cursor_example' # String |
1582
+ }
1583
+
1584
+ begin
1585
+ # List threads
1586
+ result = api_instance.list_inbox_threads(opts)
1587
+ p result
1588
+ rescue Zyphr::ApiError => e
1589
+ puts "Error when calling InboundEmailApi->list_inbox_threads: #{e}"
1590
+ end
1591
+ ```
1592
+
1593
+ #### Using the list_inbox_threads_with_http_info variant
1594
+
1595
+ This returns an Array which contains the response data, status code and headers.
1596
+
1597
+ > <Array(<ThreadListResponse>, Integer, Hash)> list_inbox_threads_with_http_info(opts)
1598
+
1599
+ ```ruby
1600
+ begin
1601
+ # List threads
1602
+ data, status_code, headers = api_instance.list_inbox_threads_with_http_info(opts)
1603
+ p status_code # => 2xx
1604
+ p headers # => { ... }
1605
+ p data # => <ThreadListResponse>
1606
+ rescue Zyphr::ApiError => e
1607
+ puts "Error when calling InboundEmailApi->list_inbox_threads_with_http_info: #{e}"
1608
+ end
1609
+ ```
1610
+
1611
+ ### Parameters
1612
+
1613
+ | Name | Type | Description | Notes |
1614
+ | ---- | ---- | ----------- | ----- |
1615
+ | **inbox_id** | **String** | | [optional] |
1616
+ | **folder** | [**ThreadFolder**](.md) | | [optional] |
1617
+ | **read** | **Boolean** | | [optional] |
1618
+ | **assignee_user_id** | **String** | | [optional] |
1619
+ | **label_id** | **String** | | [optional] |
1620
+ | **q** | **String** | | [optional] |
1621
+ | **limit** | **Integer** | | [optional][default to 25] |
1622
+ | **cursor** | **String** | | [optional] |
1623
+
1624
+ ### Return type
1625
+
1626
+ [**ThreadListResponse**](ThreadListResponse.md)
1627
+
1628
+ ### Authorization
1629
+
1630
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1631
+
1632
+ ### HTTP request headers
1633
+
1634
+ - **Content-Type**: Not defined
1635
+ - **Accept**: application/json
1636
+
1637
+
1638
+ ## list_inboxes
1639
+
1640
+ > <InboxListResponse> list_inboxes(opts)
1641
+
1642
+ List inboxes
1643
+
1644
+ ### Examples
1645
+
1646
+ ```ruby
1647
+ require 'time'
1648
+ require 'zyphr'
1649
+ # setup authorization
1650
+ Zyphr.configure do |config|
1651
+ # Configure API key authorization: ApiKeyAuth
1652
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1653
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1654
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1655
+ end
1656
+
1657
+ api_instance = Zyphr::InboundEmailApi.new
1658
+ opts = {
1659
+ include_counts: true # Boolean | Add `received_count` to each inbox and `meta.received_total` (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list.
1660
+ }
1661
+
1662
+ begin
1663
+ # List inboxes
1664
+ result = api_instance.list_inboxes(opts)
1665
+ p result
1666
+ rescue Zyphr::ApiError => e
1667
+ puts "Error when calling InboundEmailApi->list_inboxes: #{e}"
1668
+ end
1669
+ ```
1670
+
1671
+ #### Using the list_inboxes_with_http_info variant
1672
+
1673
+ This returns an Array which contains the response data, status code and headers.
1674
+
1675
+ > <Array(<InboxListResponse>, Integer, Hash)> list_inboxes_with_http_info(opts)
1676
+
1677
+ ```ruby
1678
+ begin
1679
+ # List inboxes
1680
+ data, status_code, headers = api_instance.list_inboxes_with_http_info(opts)
1681
+ p status_code # => 2xx
1682
+ p headers # => { ... }
1683
+ p data # => <InboxListResponse>
1684
+ rescue Zyphr::ApiError => e
1685
+ puts "Error when calling InboundEmailApi->list_inboxes_with_http_info: #{e}"
1686
+ end
1687
+ ```
1688
+
1689
+ ### Parameters
1690
+
1691
+ | Name | Type | Description | Notes |
1692
+ | ---- | ---- | ----------- | ----- |
1693
+ | **include_counts** | **Boolean** | Add &#x60;received_count&#x60; to each inbox and &#x60;meta.received_total&#x60; (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list. | [optional] |
1694
+
1695
+ ### Return type
1696
+
1697
+ [**InboxListResponse**](InboxListResponse.md)
1698
+
1699
+ ### Authorization
1700
+
1701
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1702
+
1703
+ ### HTTP request headers
1704
+
1705
+ - **Content-Type**: Not defined
1706
+ - **Accept**: application/json
1707
+
1708
+
1709
+ ## remove_inbox_thread_label
1710
+
1711
+ > <ThreadResponse> remove_inbox_thread_label(thread_id, label_id)
1712
+
1713
+ Remove a label from a thread
1714
+
1715
+ ### Examples
1716
+
1717
+ ```ruby
1718
+ require 'time'
1719
+ require 'zyphr'
1720
+ # setup authorization
1721
+ Zyphr.configure do |config|
1722
+ # Configure API key authorization: ApiKeyAuth
1723
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1724
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1725
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1726
+ end
1727
+
1728
+ api_instance = Zyphr::InboundEmailApi.new
1729
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
1730
+ label_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
1731
+
1732
+ begin
1733
+ # Remove a label from a thread
1734
+ result = api_instance.remove_inbox_thread_label(thread_id, label_id)
1735
+ p result
1736
+ rescue Zyphr::ApiError => e
1737
+ puts "Error when calling InboundEmailApi->remove_inbox_thread_label: #{e}"
1738
+ end
1739
+ ```
1740
+
1741
+ #### Using the remove_inbox_thread_label_with_http_info variant
1742
+
1743
+ This returns an Array which contains the response data, status code and headers.
1744
+
1745
+ > <Array(<ThreadResponse>, Integer, Hash)> remove_inbox_thread_label_with_http_info(thread_id, label_id)
1746
+
1747
+ ```ruby
1748
+ begin
1749
+ # Remove a label from a thread
1750
+ data, status_code, headers = api_instance.remove_inbox_thread_label_with_http_info(thread_id, label_id)
1751
+ p status_code # => 2xx
1752
+ p headers # => { ... }
1753
+ p data # => <ThreadResponse>
1754
+ rescue Zyphr::ApiError => e
1755
+ puts "Error when calling InboundEmailApi->remove_inbox_thread_label_with_http_info: #{e}"
1756
+ end
1757
+ ```
1758
+
1759
+ ### Parameters
1760
+
1761
+ | Name | Type | Description | Notes |
1762
+ | ---- | ---- | ----------- | ----- |
1763
+ | **thread_id** | **String** | | |
1764
+ | **label_id** | **String** | | |
1765
+
1766
+ ### Return type
1767
+
1768
+ [**ThreadResponse**](ThreadResponse.md)
1769
+
1770
+ ### Authorization
1771
+
1772
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1773
+
1774
+ ### HTTP request headers
1775
+
1776
+ - **Content-Type**: Not defined
1777
+ - **Accept**: application/json
1778
+
1779
+
1780
+ ## reply_to_inbound_email
1781
+
1782
+ > <SendEmailResponse> reply_to_inbound_email(id, reply_email_request, opts)
1783
+
1784
+ Reply to a received email
1785
+
1786
+ Send a reply to a received email that threads under the original in the recipient's mail client. Zyphr sets `to` (the original sender), the `Re:` subject, and the `In-Reply-To` / `References` headers from the received email; any of those fields in the body are ignored. Everything else behaves exactly like `POST /emails` (`html`/`text`, `send_at`/`delay`, quotas, suppression). A reply is relationship mail (no `List-Unsubscribe` headers; a recipient's marketing unsubscribe and the throttle's random drop do not block it; bounces and complaints still do) when the received email passed DMARC, the reply is not `classification: marketing`, it is sent within 30 days of receipt, and it is one of the first 3 such replies to that email. Otherwise it is sent as ordinary mail. Templates are not supported, because a template's own subject would break threading. Quarantined or dropped mail cannot be replied to.
1787
+
1788
+ ### Examples
1789
+
1790
+ ```ruby
1791
+ require 'time'
1792
+ require 'zyphr'
1793
+ # setup authorization
1794
+ Zyphr.configure do |config|
1795
+ # Configure API key authorization: ApiKeyAuth
1796
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1797
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1798
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1799
+ end
1800
+
1801
+ api_instance = Zyphr::InboundEmailApi.new
1802
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
1803
+ reply_email_request = Zyphr::ReplyEmailRequest.new({from: Zyphr::EmailAddress.new}) # ReplyEmailRequest |
1804
+ opts = {
1805
+ idempotency_key: 'idempotency_key_example' # String |
1806
+ }
1807
+
1808
+ begin
1809
+ # Reply to a received email
1810
+ result = api_instance.reply_to_inbound_email(id, reply_email_request, opts)
1811
+ p result
1812
+ rescue Zyphr::ApiError => e
1813
+ puts "Error when calling InboundEmailApi->reply_to_inbound_email: #{e}"
1814
+ end
1815
+ ```
1816
+
1817
+ #### Using the reply_to_inbound_email_with_http_info variant
1818
+
1819
+ This returns an Array which contains the response data, status code and headers.
1820
+
1821
+ > <Array(<SendEmailResponse>, Integer, Hash)> reply_to_inbound_email_with_http_info(id, reply_email_request, opts)
1822
+
1823
+ ```ruby
1824
+ begin
1825
+ # Reply to a received email
1826
+ data, status_code, headers = api_instance.reply_to_inbound_email_with_http_info(id, reply_email_request, opts)
1827
+ p status_code # => 2xx
1828
+ p headers # => { ... }
1829
+ p data # => <SendEmailResponse>
1830
+ rescue Zyphr::ApiError => e
1831
+ puts "Error when calling InboundEmailApi->reply_to_inbound_email_with_http_info: #{e}"
1832
+ end
1833
+ ```
1834
+
1835
+ ### Parameters
1836
+
1837
+ | Name | Type | Description | Notes |
1838
+ | ---- | ---- | ----------- | ----- |
1839
+ | **id** | **String** | | |
1840
+ | **reply_email_request** | [**ReplyEmailRequest**](ReplyEmailRequest.md) | | |
1841
+ | **idempotency_key** | **String** | | [optional] |
1842
+
1843
+ ### Return type
1844
+
1845
+ [**SendEmailResponse**](SendEmailResponse.md)
1846
+
1847
+ ### Authorization
1848
+
1849
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1850
+
1851
+ ### HTTP request headers
1852
+
1853
+ - **Content-Type**: application/json
1854
+ - **Accept**: application/json
1855
+
1856
+
1857
+ ## reply_to_inbox_thread
1858
+
1859
+ > <SendEmailResponse> reply_to_inbox_thread(thread_id, reply_email_request, opts)
1860
+
1861
+ Reply to a thread
1862
+
1863
+ Replies to the newest received email in the thread, exactly as `POST /inbound-emails/{id}/reply` does: the recipient, `Re:` subject and threading headers come from that email, and `reply_to` defaults to the inbox address so the customer's answer comes back to this thread. Test-mode keys cannot reply here.
1864
+
1865
+ ### Examples
1866
+
1867
+ ```ruby
1868
+ require 'time'
1869
+ require 'zyphr'
1870
+ # setup authorization
1871
+ Zyphr.configure do |config|
1872
+ # Configure API key authorization: ApiKeyAuth
1873
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1874
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1875
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1876
+ end
1877
+
1878
+ api_instance = Zyphr::InboundEmailApi.new
1879
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
1880
+ reply_email_request = Zyphr::ReplyEmailRequest.new({from: Zyphr::EmailAddress.new}) # ReplyEmailRequest |
1881
+ opts = {
1882
+ idempotency_key: 'idempotency_key_example' # String |
1883
+ }
1884
+
1885
+ begin
1886
+ # Reply to a thread
1887
+ result = api_instance.reply_to_inbox_thread(thread_id, reply_email_request, opts)
1888
+ p result
1889
+ rescue Zyphr::ApiError => e
1890
+ puts "Error when calling InboundEmailApi->reply_to_inbox_thread: #{e}"
1891
+ end
1892
+ ```
1893
+
1894
+ #### Using the reply_to_inbox_thread_with_http_info variant
1895
+
1896
+ This returns an Array which contains the response data, status code and headers.
1897
+
1898
+ > <Array(<SendEmailResponse>, Integer, Hash)> reply_to_inbox_thread_with_http_info(thread_id, reply_email_request, opts)
1899
+
1900
+ ```ruby
1901
+ begin
1902
+ # Reply to a thread
1903
+ data, status_code, headers = api_instance.reply_to_inbox_thread_with_http_info(thread_id, reply_email_request, opts)
1904
+ p status_code # => 2xx
1905
+ p headers # => { ... }
1906
+ p data # => <SendEmailResponse>
1907
+ rescue Zyphr::ApiError => e
1908
+ puts "Error when calling InboundEmailApi->reply_to_inbox_thread_with_http_info: #{e}"
1909
+ end
1910
+ ```
1911
+
1912
+ ### Parameters
1913
+
1914
+ | Name | Type | Description | Notes |
1915
+ | ---- | ---- | ----------- | ----- |
1916
+ | **thread_id** | **String** | | |
1917
+ | **reply_email_request** | [**ReplyEmailRequest**](ReplyEmailRequest.md) | | |
1918
+ | **idempotency_key** | **String** | | [optional] |
1919
+
1920
+ ### Return type
1921
+
1922
+ [**SendEmailResponse**](SendEmailResponse.md)
1923
+
1924
+ ### Authorization
1925
+
1926
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1927
+
1928
+ ### HTTP request headers
1929
+
1930
+ - **Content-Type**: application/json
1931
+ - **Accept**: application/json
1932
+
1933
+
1934
+ ## send_inbox_draft
1935
+
1936
+ > <SendEmailResponse> send_inbox_draft(draft_id, opts)
1937
+
1938
+ Send a draft
1939
+
1940
+ A draft in a thread is sent exactly like `POST /inboxes/threads/{id}/reply`: to the thread's newest received email, with the `Re:` subject, threading headers, and `reply_to` defaulting to the inbox address. A draft with no thread is sent like `POST /emails`. The draft is deleted once the send is accepted; if the send is refused (a 4xx) the draft is kept and can be fixed and sent again. Takes no body.
1941
+
1942
+ ### Examples
1943
+
1944
+ ```ruby
1945
+ require 'time'
1946
+ require 'zyphr'
1947
+ # setup authorization
1948
+ Zyphr.configure do |config|
1949
+ # Configure API key authorization: ApiKeyAuth
1950
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
1951
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1952
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
1953
+ end
1954
+
1955
+ api_instance = Zyphr::InboundEmailApi.new
1956
+ draft_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
1957
+ opts = {
1958
+ idempotency_key: 'idempotency_key_example' # String |
1959
+ }
1960
+
1961
+ begin
1962
+ # Send a draft
1963
+ result = api_instance.send_inbox_draft(draft_id, opts)
1964
+ p result
1965
+ rescue Zyphr::ApiError => e
1966
+ puts "Error when calling InboundEmailApi->send_inbox_draft: #{e}"
1967
+ end
1968
+ ```
1969
+
1970
+ #### Using the send_inbox_draft_with_http_info variant
1971
+
1972
+ This returns an Array which contains the response data, status code and headers.
1973
+
1974
+ > <Array(<SendEmailResponse>, Integer, Hash)> send_inbox_draft_with_http_info(draft_id, opts)
1975
+
1976
+ ```ruby
1977
+ begin
1978
+ # Send a draft
1979
+ data, status_code, headers = api_instance.send_inbox_draft_with_http_info(draft_id, opts)
1980
+ p status_code # => 2xx
1981
+ p headers # => { ... }
1982
+ p data # => <SendEmailResponse>
1983
+ rescue Zyphr::ApiError => e
1984
+ puts "Error when calling InboundEmailApi->send_inbox_draft_with_http_info: #{e}"
1985
+ end
1986
+ ```
1987
+
1988
+ ### Parameters
1989
+
1990
+ | Name | Type | Description | Notes |
1991
+ | ---- | ---- | ----------- | ----- |
1992
+ | **draft_id** | **String** | | |
1993
+ | **idempotency_key** | **String** | | [optional] |
1994
+
1995
+ ### Return type
1996
+
1997
+ [**SendEmailResponse**](SendEmailResponse.md)
1998
+
1999
+ ### Authorization
2000
+
2001
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
2002
+
2003
+ ### HTTP request headers
2004
+
2005
+ - **Content-Type**: Not defined
2006
+ - **Accept**: application/json
2007
+
2008
+
2009
+ ## set_inbox_thread_labels
2010
+
2011
+ > <ThreadResponse> set_inbox_thread_labels(thread_id, thread_labels_request)
2012
+
2013
+ Set a thread's labels
2014
+
2015
+ Replaces the thread's labels with exactly `label_ids` (an empty list clears them).
2016
+
2017
+ ### Examples
2018
+
2019
+ ```ruby
2020
+ require 'time'
2021
+ require 'zyphr'
2022
+ # setup authorization
2023
+ Zyphr.configure do |config|
2024
+ # Configure API key authorization: ApiKeyAuth
2025
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
2026
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
2027
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
2028
+ end
2029
+
2030
+ api_instance = Zyphr::InboundEmailApi.new
2031
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
2032
+ thread_labels_request = Zyphr::ThreadLabelsRequest.new({label_ids: ['label_ids_example']}) # ThreadLabelsRequest |
2033
+
2034
+ begin
2035
+ # Set a thread's labels
2036
+ result = api_instance.set_inbox_thread_labels(thread_id, thread_labels_request)
2037
+ p result
2038
+ rescue Zyphr::ApiError => e
2039
+ puts "Error when calling InboundEmailApi->set_inbox_thread_labels: #{e}"
2040
+ end
2041
+ ```
2042
+
2043
+ #### Using the set_inbox_thread_labels_with_http_info variant
2044
+
2045
+ This returns an Array which contains the response data, status code and headers.
2046
+
2047
+ > <Array(<ThreadResponse>, Integer, Hash)> set_inbox_thread_labels_with_http_info(thread_id, thread_labels_request)
2048
+
2049
+ ```ruby
2050
+ begin
2051
+ # Set a thread's labels
2052
+ data, status_code, headers = api_instance.set_inbox_thread_labels_with_http_info(thread_id, thread_labels_request)
2053
+ p status_code # => 2xx
2054
+ p headers # => { ... }
2055
+ p data # => <ThreadResponse>
2056
+ rescue Zyphr::ApiError => e
2057
+ puts "Error when calling InboundEmailApi->set_inbox_thread_labels_with_http_info: #{e}"
2058
+ end
2059
+ ```
2060
+
2061
+ ### Parameters
2062
+
2063
+ | Name | Type | Description | Notes |
2064
+ | ---- | ---- | ----------- | ----- |
2065
+ | **thread_id** | **String** | | |
2066
+ | **thread_labels_request** | [**ThreadLabelsRequest**](ThreadLabelsRequest.md) | | |
2067
+
2068
+ ### Return type
2069
+
2070
+ [**ThreadResponse**](ThreadResponse.md)
2071
+
2072
+ ### Authorization
2073
+
2074
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
2075
+
2076
+ ### HTTP request headers
2077
+
2078
+ - **Content-Type**: application/json
2079
+ - **Accept**: application/json
2080
+
2081
+
2082
+ ## update_inbox
2083
+
2084
+ > <InboxResponse> update_inbox(id, update_inbox_request)
2085
+
2086
+ Update an inbox
2087
+
2088
+ Rename the inbox or change the display name recipients see. The address cannot change. On the catch-all, `enabled: false` turns on strict addresses: mail to any address without a named inbox is dropped until it is re-enabled. Named inboxes cannot be disabled (422 `not_catch_all`).
2089
+
2090
+ ### Examples
2091
+
2092
+ ```ruby
2093
+ require 'time'
2094
+ require 'zyphr'
2095
+ # setup authorization
2096
+ Zyphr.configure do |config|
2097
+ # Configure API key authorization: ApiKeyAuth
2098
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
2099
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
2100
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
2101
+ end
2102
+
2103
+ api_instance = Zyphr::InboundEmailApi.new
2104
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
2105
+ update_inbox_request = Zyphr::UpdateInboxRequest.new # UpdateInboxRequest |
2106
+
2107
+ begin
2108
+ # Update an inbox
2109
+ result = api_instance.update_inbox(id, update_inbox_request)
2110
+ p result
2111
+ rescue Zyphr::ApiError => e
2112
+ puts "Error when calling InboundEmailApi->update_inbox: #{e}"
2113
+ end
2114
+ ```
2115
+
2116
+ #### Using the update_inbox_with_http_info variant
2117
+
2118
+ This returns an Array which contains the response data, status code and headers.
2119
+
2120
+ > <Array(<InboxResponse>, Integer, Hash)> update_inbox_with_http_info(id, update_inbox_request)
2121
+
2122
+ ```ruby
2123
+ begin
2124
+ # Update an inbox
2125
+ data, status_code, headers = api_instance.update_inbox_with_http_info(id, update_inbox_request)
2126
+ p status_code # => 2xx
2127
+ p headers # => { ... }
2128
+ p data # => <InboxResponse>
2129
+ rescue Zyphr::ApiError => e
2130
+ puts "Error when calling InboundEmailApi->update_inbox_with_http_info: #{e}"
2131
+ end
2132
+ ```
2133
+
2134
+ ### Parameters
2135
+
2136
+ | Name | Type | Description | Notes |
2137
+ | ---- | ---- | ----------- | ----- |
2138
+ | **id** | **String** | | |
2139
+ | **update_inbox_request** | [**UpdateInboxRequest**](UpdateInboxRequest.md) | | |
2140
+
2141
+ ### Return type
2142
+
2143
+ [**InboxResponse**](InboxResponse.md)
2144
+
2145
+ ### Authorization
2146
+
2147
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
2148
+
2149
+ ### HTTP request headers
2150
+
2151
+ - **Content-Type**: application/json
2152
+ - **Accept**: application/json
2153
+
2154
+
2155
+ ## update_inbox_draft
2156
+
2157
+ > <DraftResponse> update_inbox_draft(draft_id, draft_request)
2158
+
2159
+ Update a draft
2160
+
2161
+ Change any field; `null` clears it. A draft that is being sent can't be changed.
2162
+
2163
+ ### Examples
2164
+
2165
+ ```ruby
2166
+ require 'time'
2167
+ require 'zyphr'
2168
+ # setup authorization
2169
+ Zyphr.configure do |config|
2170
+ # Configure API key authorization: ApiKeyAuth
2171
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
2172
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
2173
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
2174
+ end
2175
+
2176
+ api_instance = Zyphr::InboundEmailApi.new
2177
+ draft_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
2178
+ draft_request = Zyphr::DraftRequest.new # DraftRequest |
2179
+
2180
+ begin
2181
+ # Update a draft
2182
+ result = api_instance.update_inbox_draft(draft_id, draft_request)
2183
+ p result
2184
+ rescue Zyphr::ApiError => e
2185
+ puts "Error when calling InboundEmailApi->update_inbox_draft: #{e}"
2186
+ end
2187
+ ```
2188
+
2189
+ #### Using the update_inbox_draft_with_http_info variant
2190
+
2191
+ This returns an Array which contains the response data, status code and headers.
2192
+
2193
+ > <Array(<DraftResponse>, Integer, Hash)> update_inbox_draft_with_http_info(draft_id, draft_request)
2194
+
2195
+ ```ruby
2196
+ begin
2197
+ # Update a draft
2198
+ data, status_code, headers = api_instance.update_inbox_draft_with_http_info(draft_id, draft_request)
2199
+ p status_code # => 2xx
2200
+ p headers # => { ... }
2201
+ p data # => <DraftResponse>
2202
+ rescue Zyphr::ApiError => e
2203
+ puts "Error when calling InboundEmailApi->update_inbox_draft_with_http_info: #{e}"
2204
+ end
2205
+ ```
2206
+
2207
+ ### Parameters
2208
+
2209
+ | Name | Type | Description | Notes |
2210
+ | ---- | ---- | ----------- | ----- |
2211
+ | **draft_id** | **String** | | |
2212
+ | **draft_request** | [**DraftRequest**](DraftRequest.md) | | |
2213
+
2214
+ ### Return type
2215
+
2216
+ [**DraftResponse**](DraftResponse.md)
2217
+
2218
+ ### Authorization
2219
+
2220
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
2221
+
2222
+ ### HTTP request headers
2223
+
2224
+ - **Content-Type**: application/json
2225
+ - **Accept**: application/json
2226
+
2227
+
2228
+ ## update_inbox_label
2229
+
2230
+ > <InboxLabelResponse> update_inbox_label(label_id, update_inbox_label_request)
2231
+
2232
+ Update a label
2233
+
2234
+ ### Examples
2235
+
2236
+ ```ruby
2237
+ require 'time'
2238
+ require 'zyphr'
2239
+ # setup authorization
2240
+ Zyphr.configure do |config|
2241
+ # Configure API key authorization: ApiKeyAuth
2242
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
2243
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
2244
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
2245
+ end
2246
+
2247
+ api_instance = Zyphr::InboundEmailApi.new
2248
+ label_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
2249
+ update_inbox_label_request = Zyphr::UpdateInboxLabelRequest.new # UpdateInboxLabelRequest |
2250
+
2251
+ begin
2252
+ # Update a label
2253
+ result = api_instance.update_inbox_label(label_id, update_inbox_label_request)
2254
+ p result
2255
+ rescue Zyphr::ApiError => e
2256
+ puts "Error when calling InboundEmailApi->update_inbox_label: #{e}"
2257
+ end
2258
+ ```
2259
+
2260
+ #### Using the update_inbox_label_with_http_info variant
2261
+
2262
+ This returns an Array which contains the response data, status code and headers.
2263
+
2264
+ > <Array(<InboxLabelResponse>, Integer, Hash)> update_inbox_label_with_http_info(label_id, update_inbox_label_request)
2265
+
2266
+ ```ruby
2267
+ begin
2268
+ # Update a label
2269
+ data, status_code, headers = api_instance.update_inbox_label_with_http_info(label_id, update_inbox_label_request)
2270
+ p status_code # => 2xx
2271
+ p headers # => { ... }
2272
+ p data # => <InboxLabelResponse>
2273
+ rescue Zyphr::ApiError => e
2274
+ puts "Error when calling InboundEmailApi->update_inbox_label_with_http_info: #{e}"
2275
+ end
2276
+ ```
2277
+
2278
+ ### Parameters
2279
+
2280
+ | Name | Type | Description | Notes |
2281
+ | ---- | ---- | ----------- | ----- |
2282
+ | **label_id** | **String** | | |
2283
+ | **update_inbox_label_request** | [**UpdateInboxLabelRequest**](UpdateInboxLabelRequest.md) | | |
2284
+
2285
+ ### Return type
2286
+
2287
+ [**InboxLabelResponse**](InboxLabelResponse.md)
2288
+
2289
+ ### Authorization
2290
+
2291
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
2292
+
2293
+ ### HTTP request headers
2294
+
2295
+ - **Content-Type**: application/json
2296
+ - **Accept**: application/json
2297
+
2298
+
2299
+ ## update_inbox_thread
2300
+
2301
+ > <ThreadResponse> update_inbox_thread(thread_id, update_thread_request)
2302
+
2303
+ Update a thread
2304
+
2305
+ Move it to a folder, mark it read or unread, or assign it to a member of your account (`null` unassigns).
2306
+
2307
+ ### Examples
2308
+
2309
+ ```ruby
2310
+ require 'time'
2311
+ require 'zyphr'
2312
+ # setup authorization
2313
+ Zyphr.configure do |config|
2314
+ # Configure API key authorization: ApiKeyAuth
2315
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
2316
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
2317
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
2318
+ end
2319
+
2320
+ api_instance = Zyphr::InboundEmailApi.new
2321
+ thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
2322
+ update_thread_request = Zyphr::UpdateThreadRequest.new # UpdateThreadRequest |
2323
+
2324
+ begin
2325
+ # Update a thread
2326
+ result = api_instance.update_inbox_thread(thread_id, update_thread_request)
2327
+ p result
2328
+ rescue Zyphr::ApiError => e
2329
+ puts "Error when calling InboundEmailApi->update_inbox_thread: #{e}"
2330
+ end
2331
+ ```
2332
+
2333
+ #### Using the update_inbox_thread_with_http_info variant
2334
+
2335
+ This returns an Array which contains the response data, status code and headers.
2336
+
2337
+ > <Array(<ThreadResponse>, Integer, Hash)> update_inbox_thread_with_http_info(thread_id, update_thread_request)
2338
+
2339
+ ```ruby
2340
+ begin
2341
+ # Update a thread
2342
+ data, status_code, headers = api_instance.update_inbox_thread_with_http_info(thread_id, update_thread_request)
2343
+ p status_code # => 2xx
2344
+ p headers # => { ... }
2345
+ p data # => <ThreadResponse>
2346
+ rescue Zyphr::ApiError => e
2347
+ puts "Error when calling InboundEmailApi->update_inbox_thread_with_http_info: #{e}"
2348
+ end
2349
+ ```
2350
+
2351
+ ### Parameters
2352
+
2353
+ | Name | Type | Description | Notes |
2354
+ | ---- | ---- | ----------- | ----- |
2355
+ | **thread_id** | **String** | | |
2356
+ | **update_thread_request** | [**UpdateThreadRequest**](UpdateThreadRequest.md) | | |
2357
+
2358
+ ### Return type
2359
+
2360
+ [**ThreadResponse**](ThreadResponse.md)
665
2361
 
666
2362
  ### Authorization
667
2363