zyphr 0.1.74 → 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.
- checksums.yaml +4 -4
- data/README.md +49 -1
- data/docs/CreateInboxLabelRequest.md +20 -0
- data/docs/Draft.md +36 -0
- data/docs/DraftAddress.md +20 -0
- data/docs/DraftListResponse.md +20 -0
- data/docs/DraftRequest.md +30 -0
- data/docs/DraftResponse.md +20 -0
- data/docs/ForwardEmailRequest.md +34 -0
- data/docs/InboundEmailApi.md +1855 -152
- data/docs/Inbox.md +3 -1
- data/docs/InboxLabel.md +26 -0
- data/docs/InboxLabelListResponse.md +20 -0
- data/docs/InboxLabelResponse.md +20 -0
- data/docs/InboxListResponse.md +1 -1
- data/docs/InboxListResponseMeta.md +22 -0
- data/docs/{ReplyToInboundEmailRequest.md → ReplyEmailRequest.md} +3 -3
- data/docs/Thread.md +40 -0
- data/docs/ThreadEmail.md +38 -0
- data/docs/ThreadEmailAttachmentsInner.md +24 -0
- data/docs/ThreadEmailFrom.md +20 -0
- data/docs/ThreadEmailListResponse.md +20 -0
- data/docs/ThreadEmailResponse.md +20 -0
- data/docs/ThreadFolder.md +15 -0
- data/docs/ThreadLabelsInner.md +22 -0
- data/docs/ThreadLabelsRequest.md +18 -0
- data/docs/ThreadListResponse.md +20 -0
- data/docs/ThreadListResponseMeta.md +20 -0
- data/docs/ThreadResponse.md +20 -0
- data/docs/UpdateInboxLabelRequest.md +20 -0
- data/docs/UpdateThreadRequest.md +22 -0
- data/lib/zyphr/api/inbound_email_api.rb +1774 -168
- data/lib/zyphr/models/create_inbox_label_request.rb +272 -0
- data/lib/zyphr/models/draft.rb +375 -0
- data/lib/zyphr/models/draft_address.rb +249 -0
- data/lib/zyphr/models/draft_list_response.rb +231 -0
- data/lib/zyphr/models/draft_request.rb +299 -0
- data/lib/zyphr/models/draft_response.rb +229 -0
- data/lib/zyphr/models/forward_email_request.rb +393 -0
- data/lib/zyphr/models/inbox.rb +14 -4
- data/lib/zyphr/models/inbox_label.rb +258 -0
- data/lib/zyphr/models/inbox_label_list_response.rb +231 -0
- data/lib/zyphr/models/inbox_label_response.rb +229 -0
- data/lib/zyphr/models/inbox_list_response.rb +1 -1
- data/lib/zyphr/models/inbox_list_response_meta.rb +246 -0
- data/lib/zyphr/models/{reply_to_inbound_email_request.rb → reply_email_request.rb} +4 -3
- data/lib/zyphr/models/thread.rb +352 -0
- data/lib/zyphr/models/thread_email.rb +353 -0
- data/lib/zyphr/models/thread_email_attachments_inner.rb +248 -0
- data/lib/zyphr/models/thread_email_from.rb +230 -0
- data/lib/zyphr/models/thread_email_list_response.rb +231 -0
- data/lib/zyphr/models/thread_email_response.rb +229 -0
- data/lib/zyphr/models/thread_folder.rb +43 -0
- data/lib/zyphr/models/thread_labels_inner.rb +239 -0
- data/lib/zyphr/models/thread_labels_request.rb +248 -0
- data/lib/zyphr/models/thread_list_response.rb +231 -0
- data/lib/zyphr/models/thread_list_response_meta.rb +237 -0
- data/lib/zyphr/models/thread_response.rb +229 -0
- data/lib/zyphr/models/update_inbox_label_request.rb +264 -0
- data/lib/zyphr/models/update_thread_request.rb +262 -0
- data/lib/zyphr.rb +26 -1
- data/spec/api/inbound_email_api_spec.rb +294 -1
- data/spec/models/create_inbox_label_request_spec.rb +42 -0
- data/spec/models/draft_address_spec.rb +42 -0
- data/spec/models/draft_list_response_spec.rb +42 -0
- data/spec/models/draft_request_spec.rb +72 -0
- data/spec/models/draft_response_spec.rb +42 -0
- data/spec/models/draft_spec.rb +90 -0
- data/spec/models/forward_email_request_spec.rb +88 -0
- data/spec/models/inbox_label_list_response_spec.rb +42 -0
- data/spec/models/inbox_label_response_spec.rb +42 -0
- data/spec/models/inbox_label_spec.rb +60 -0
- data/spec/models/inbox_list_response_meta_spec.rb +48 -0
- data/spec/models/inbox_spec.rb +6 -0
- data/spec/models/{reply_to_inbound_email_request_spec.rb → reply_email_request_spec.rb} +6 -6
- data/spec/models/thread_email_attachments_inner_spec.rb +54 -0
- data/spec/models/thread_email_from_spec.rb +42 -0
- data/spec/models/thread_email_list_response_spec.rb +42 -0
- data/spec/models/thread_email_response_spec.rb +42 -0
- data/spec/models/thread_email_spec.rb +100 -0
- data/spec/models/thread_folder_spec.rb +30 -0
- data/spec/models/thread_labels_inner_spec.rb +48 -0
- data/spec/models/thread_labels_request_spec.rb +36 -0
- data/spec/models/thread_list_response_meta_spec.rb +42 -0
- data/spec/models/thread_list_response_spec.rb +42 -0
- data/spec/models/thread_response_spec.rb +42 -0
- data/spec/models/thread_spec.rb +102 -0
- data/spec/models/update_inbox_label_request_spec.rb +42 -0
- data/spec/models/update_thread_request_spec.rb +48 -0
- data/zyphr.gemspec +1 -1
- metadata +106 -6
data/docs/InboundEmailApi.md
CHANGED
|
@@ -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
|
-
##
|
|
183
|
+
## create_inbox_draft
|
|
90
184
|
|
|
91
|
-
>
|
|
185
|
+
> <DraftResponse> create_inbox_draft(draft_request)
|
|
92
186
|
|
|
93
|
-
|
|
187
|
+
Create a draft
|
|
94
188
|
|
|
95
|
-
|
|
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
|
-
|
|
205
|
+
draft_request = Zyphr::DraftRequest.new # DraftRequest |
|
|
112
206
|
|
|
113
207
|
begin
|
|
114
|
-
#
|
|
115
|
-
api_instance.
|
|
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->
|
|
212
|
+
puts "Error when calling InboundEmailApi->create_inbox_draft: #{e}"
|
|
118
213
|
end
|
|
119
214
|
```
|
|
120
215
|
|
|
121
|
-
#### Using the
|
|
216
|
+
#### Using the create_inbox_draft_with_http_info variant
|
|
122
217
|
|
|
123
|
-
This returns an Array which contains the response data
|
|
218
|
+
This returns an Array which contains the response data, status code and headers.
|
|
124
219
|
|
|
125
|
-
> <Array(
|
|
220
|
+
> <Array(<DraftResponse>, Integer, Hash)> create_inbox_draft_with_http_info(draft_request)
|
|
126
221
|
|
|
127
222
|
```ruby
|
|
128
223
|
begin
|
|
129
|
-
#
|
|
130
|
-
data, status_code, headers = api_instance.
|
|
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 # =>
|
|
228
|
+
p data # => <DraftResponse>
|
|
134
229
|
rescue Zyphr::ApiError => e
|
|
135
|
-
puts "Error when calling InboundEmailApi->
|
|
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
|
-
| **
|
|
238
|
+
| **draft_request** | [**DraftRequest**](DraftRequest.md) | | |
|
|
144
239
|
|
|
145
240
|
### Return type
|
|
146
241
|
|
|
147
|
-
|
|
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**:
|
|
156
|
-
- **Accept**:
|
|
157
|
-
|
|
250
|
+
- **Content-Type**: application/json
|
|
251
|
+
- **Accept**: application/json
|
|
158
252
|
|
|
159
|
-
## get_inbound_attachment_url
|
|
160
253
|
|
|
161
|
-
|
|
254
|
+
## create_inbox_label
|
|
162
255
|
|
|
163
|
-
|
|
256
|
+
> <InboxLabelResponse> create_inbox_label(create_inbox_label_request)
|
|
164
257
|
|
|
165
|
-
|
|
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
|
-
|
|
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
|
-
#
|
|
186
|
-
result = api_instance.
|
|
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->
|
|
281
|
+
puts "Error when calling InboundEmailApi->create_inbox_label: #{e}"
|
|
190
282
|
end
|
|
191
283
|
```
|
|
192
284
|
|
|
193
|
-
#### Using the
|
|
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(<
|
|
289
|
+
> <Array(<InboxLabelResponse>, Integer, Hash)> create_inbox_label_with_http_info(create_inbox_label_request)
|
|
198
290
|
|
|
199
291
|
```ruby
|
|
200
292
|
begin
|
|
201
|
-
#
|
|
202
|
-
data, status_code, headers = api_instance.
|
|
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 # => <
|
|
297
|
+
p data # => <InboxLabelResponse>
|
|
206
298
|
rescue Zyphr::ApiError => e
|
|
207
|
-
puts "Error when calling InboundEmailApi->
|
|
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
|
-
| **
|
|
216
|
-
| **attachment_id** | **String** | | |
|
|
307
|
+
| **create_inbox_label_request** | [**CreateInboxLabelRequest**](CreateInboxLabelRequest.md) | | |
|
|
217
308
|
|
|
218
309
|
### Return type
|
|
219
310
|
|
|
220
|
-
[**
|
|
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**:
|
|
319
|
+
- **Content-Type**: application/json
|
|
229
320
|
- **Accept**: application/json
|
|
230
321
|
|
|
231
322
|
|
|
232
|
-
##
|
|
323
|
+
## delete_inbox
|
|
233
324
|
|
|
234
|
-
>
|
|
325
|
+
> delete_inbox(id)
|
|
235
326
|
|
|
236
|
-
|
|
327
|
+
Delete an inbox
|
|
237
328
|
|
|
238
|
-
|
|
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
|
-
#
|
|
258
|
-
|
|
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->
|
|
351
|
+
puts "Error when calling InboundEmailApi->delete_inbox: #{e}"
|
|
262
352
|
end
|
|
263
353
|
```
|
|
264
354
|
|
|
265
|
-
#### Using the
|
|
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(
|
|
359
|
+
> <Array(nil, Integer, Hash)> delete_inbox_with_http_info(id)
|
|
270
360
|
|
|
271
361
|
```ruby
|
|
272
362
|
begin
|
|
273
|
-
#
|
|
274
|
-
data, status_code, headers = api_instance.
|
|
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 # =>
|
|
367
|
+
p data # => nil
|
|
278
368
|
rescue Zyphr::ApiError => e
|
|
279
|
-
puts "Error when calling InboundEmailApi->
|
|
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
|
-
|
|
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**:
|
|
390
|
+
- **Accept**: Not defined
|
|
301
391
|
|
|
302
392
|
|
|
303
|
-
##
|
|
393
|
+
## delete_inbox_draft
|
|
304
394
|
|
|
305
|
-
>
|
|
395
|
+
> delete_inbox_draft(draft_id)
|
|
306
396
|
|
|
307
|
-
|
|
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
|
-
|
|
413
|
+
draft_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
324
414
|
|
|
325
415
|
begin
|
|
326
|
-
#
|
|
327
|
-
|
|
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->
|
|
419
|
+
puts "Error when calling InboundEmailApi->delete_inbox_draft: #{e}"
|
|
331
420
|
end
|
|
332
421
|
```
|
|
333
422
|
|
|
334
|
-
#### Using the
|
|
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(
|
|
427
|
+
> <Array(nil, Integer, Hash)> delete_inbox_draft_with_http_info(draft_id)
|
|
339
428
|
|
|
340
429
|
```ruby
|
|
341
430
|
begin
|
|
342
|
-
#
|
|
343
|
-
data, status_code, headers = api_instance.
|
|
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 # =>
|
|
435
|
+
p data # => nil
|
|
347
436
|
rescue Zyphr::ApiError => e
|
|
348
|
-
puts "Error when calling InboundEmailApi->
|
|
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
|
-
| **
|
|
445
|
+
| **draft_id** | **String** | | |
|
|
357
446
|
|
|
358
447
|
### Return type
|
|
359
448
|
|
|
360
|
-
|
|
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**:
|
|
458
|
+
- **Accept**: Not defined
|
|
370
459
|
|
|
371
460
|
|
|
372
|
-
##
|
|
461
|
+
## delete_inbox_label
|
|
373
462
|
|
|
374
|
-
>
|
|
463
|
+
> delete_inbox_label(label_id)
|
|
375
464
|
|
|
376
|
-
|
|
465
|
+
Delete a label
|
|
377
466
|
|
|
378
|
-
|
|
467
|
+
Also removes it from every thread.
|
|
379
468
|
|
|
380
469
|
### Examples
|
|
381
470
|
|
|
@@ -391,38 +480,31 @@ Zyphr.configure do |config|
|
|
|
391
480
|
end
|
|
392
481
|
|
|
393
482
|
api_instance = Zyphr::InboundEmailApi.new
|
|
394
|
-
|
|
395
|
-
status: 'received', # String |
|
|
396
|
-
to: 'to_example', # String | Filter by receiving address
|
|
397
|
-
include_withheld: true, # Boolean | Include quarantined/dropped mail
|
|
398
|
-
limit: 56, # Integer |
|
|
399
|
-
offset: 56 # Integer |
|
|
400
|
-
}
|
|
483
|
+
label_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
401
484
|
|
|
402
485
|
begin
|
|
403
|
-
#
|
|
404
|
-
|
|
405
|
-
p result
|
|
486
|
+
# Delete a label
|
|
487
|
+
api_instance.delete_inbox_label(label_id)
|
|
406
488
|
rescue Zyphr::ApiError => e
|
|
407
|
-
puts "Error when calling InboundEmailApi->
|
|
489
|
+
puts "Error when calling InboundEmailApi->delete_inbox_label: #{e}"
|
|
408
490
|
end
|
|
409
491
|
```
|
|
410
492
|
|
|
411
|
-
#### Using the
|
|
493
|
+
#### Using the delete_inbox_label_with_http_info variant
|
|
412
494
|
|
|
413
|
-
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.
|
|
414
496
|
|
|
415
|
-
> <Array(
|
|
497
|
+
> <Array(nil, Integer, Hash)> delete_inbox_label_with_http_info(label_id)
|
|
416
498
|
|
|
417
499
|
```ruby
|
|
418
500
|
begin
|
|
419
|
-
#
|
|
420
|
-
data, status_code, headers = api_instance.
|
|
501
|
+
# Delete a label
|
|
502
|
+
data, status_code, headers = api_instance.delete_inbox_label_with_http_info(label_id)
|
|
421
503
|
p status_code # => 2xx
|
|
422
504
|
p headers # => { ... }
|
|
423
|
-
p data # =>
|
|
505
|
+
p data # => nil
|
|
424
506
|
rescue Zyphr::ApiError => e
|
|
425
|
-
puts "Error when calling InboundEmailApi->
|
|
507
|
+
puts "Error when calling InboundEmailApi->delete_inbox_label_with_http_info: #{e}"
|
|
426
508
|
end
|
|
427
509
|
```
|
|
428
510
|
|
|
@@ -430,15 +512,11 @@ end
|
|
|
430
512
|
|
|
431
513
|
| Name | Type | Description | Notes |
|
|
432
514
|
| ---- | ---- | ----------- | ----- |
|
|
433
|
-
| **
|
|
434
|
-
| **to** | **String** | Filter by receiving address | [optional] |
|
|
435
|
-
| **include_withheld** | **Boolean** | Include quarantined/dropped mail | [optional] |
|
|
436
|
-
| **limit** | **Integer** | | [optional][default to 50] |
|
|
437
|
-
| **offset** | **Integer** | | [optional][default to 0] |
|
|
515
|
+
| **label_id** | **String** | | |
|
|
438
516
|
|
|
439
517
|
### Return type
|
|
440
518
|
|
|
441
|
-
|
|
519
|
+
nil (empty response body)
|
|
442
520
|
|
|
443
521
|
### Authorization
|
|
444
522
|
|
|
@@ -447,14 +525,16 @@ end
|
|
|
447
525
|
### HTTP request headers
|
|
448
526
|
|
|
449
527
|
- **Content-Type**: Not defined
|
|
450
|
-
- **Accept**:
|
|
528
|
+
- **Accept**: Not defined
|
|
451
529
|
|
|
452
530
|
|
|
453
|
-
##
|
|
531
|
+
## delete_inbox_thread
|
|
454
532
|
|
|
455
|
-
>
|
|
533
|
+
> delete_inbox_thread(thread_id)
|
|
456
534
|
|
|
457
|
-
|
|
535
|
+
Delete a thread
|
|
536
|
+
|
|
537
|
+
Deletes the conversation. Its emails are kept and still appear in the received list, unthreaded.
|
|
458
538
|
|
|
459
539
|
### Examples
|
|
460
540
|
|
|
@@ -470,41 +550,43 @@ Zyphr.configure do |config|
|
|
|
470
550
|
end
|
|
471
551
|
|
|
472
552
|
api_instance = Zyphr::InboundEmailApi.new
|
|
553
|
+
thread_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
473
554
|
|
|
474
555
|
begin
|
|
475
|
-
#
|
|
476
|
-
|
|
477
|
-
p result
|
|
556
|
+
# Delete a thread
|
|
557
|
+
api_instance.delete_inbox_thread(thread_id)
|
|
478
558
|
rescue Zyphr::ApiError => e
|
|
479
|
-
puts "Error when calling InboundEmailApi->
|
|
559
|
+
puts "Error when calling InboundEmailApi->delete_inbox_thread: #{e}"
|
|
480
560
|
end
|
|
481
561
|
```
|
|
482
562
|
|
|
483
|
-
#### Using the
|
|
563
|
+
#### Using the delete_inbox_thread_with_http_info variant
|
|
484
564
|
|
|
485
|
-
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.
|
|
486
566
|
|
|
487
|
-
> <Array(
|
|
567
|
+
> <Array(nil, Integer, Hash)> delete_inbox_thread_with_http_info(thread_id)
|
|
488
568
|
|
|
489
569
|
```ruby
|
|
490
570
|
begin
|
|
491
|
-
#
|
|
492
|
-
data, status_code, headers = api_instance.
|
|
571
|
+
# Delete a thread
|
|
572
|
+
data, status_code, headers = api_instance.delete_inbox_thread_with_http_info(thread_id)
|
|
493
573
|
p status_code # => 2xx
|
|
494
574
|
p headers # => { ... }
|
|
495
|
-
p data # =>
|
|
575
|
+
p data # => nil
|
|
496
576
|
rescue Zyphr::ApiError => e
|
|
497
|
-
puts "Error when calling InboundEmailApi->
|
|
577
|
+
puts "Error when calling InboundEmailApi->delete_inbox_thread_with_http_info: #{e}"
|
|
498
578
|
end
|
|
499
579
|
```
|
|
500
580
|
|
|
501
581
|
### Parameters
|
|
502
582
|
|
|
503
|
-
|
|
583
|
+
| Name | Type | Description | Notes |
|
|
584
|
+
| ---- | ---- | ----------- | ----- |
|
|
585
|
+
| **thread_id** | **String** | | |
|
|
504
586
|
|
|
505
587
|
### Return type
|
|
506
588
|
|
|
507
|
-
|
|
589
|
+
nil (empty response body)
|
|
508
590
|
|
|
509
591
|
### Authorization
|
|
510
592
|
|
|
@@ -513,16 +595,16 @@ This endpoint does not need any parameter.
|
|
|
513
595
|
### HTTP request headers
|
|
514
596
|
|
|
515
597
|
- **Content-Type**: Not defined
|
|
516
|
-
- **Accept**:
|
|
598
|
+
- **Accept**: Not defined
|
|
517
599
|
|
|
518
600
|
|
|
519
|
-
##
|
|
601
|
+
## forward_inbound_email
|
|
520
602
|
|
|
521
|
-
> <SendEmailResponse>
|
|
603
|
+
> <SendEmailResponse> forward_inbound_email(id, forward_email_request, opts)
|
|
522
604
|
|
|
523
|
-
|
|
605
|
+
Forward a received email
|
|
524
606
|
|
|
525
|
-
Send a
|
|
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.
|
|
526
608
|
|
|
527
609
|
### Examples
|
|
528
610
|
|
|
@@ -539,35 +621,35 @@ end
|
|
|
539
621
|
|
|
540
622
|
api_instance = Zyphr::InboundEmailApi.new
|
|
541
623
|
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
542
|
-
|
|
624
|
+
forward_email_request = Zyphr::ForwardEmailRequest.new({from: Zyphr::EmailAddress.new, to: Zyphr::EmailAddress.new}) # ForwardEmailRequest |
|
|
543
625
|
opts = {
|
|
544
626
|
idempotency_key: 'idempotency_key_example' # String |
|
|
545
627
|
}
|
|
546
628
|
|
|
547
629
|
begin
|
|
548
|
-
#
|
|
549
|
-
result = api_instance.
|
|
630
|
+
# Forward a received email
|
|
631
|
+
result = api_instance.forward_inbound_email(id, forward_email_request, opts)
|
|
550
632
|
p result
|
|
551
633
|
rescue Zyphr::ApiError => e
|
|
552
|
-
puts "Error when calling InboundEmailApi->
|
|
634
|
+
puts "Error when calling InboundEmailApi->forward_inbound_email: #{e}"
|
|
553
635
|
end
|
|
554
636
|
```
|
|
555
637
|
|
|
556
|
-
#### Using the
|
|
638
|
+
#### Using the forward_inbound_email_with_http_info variant
|
|
557
639
|
|
|
558
640
|
This returns an Array which contains the response data, status code and headers.
|
|
559
641
|
|
|
560
|
-
> <Array(<SendEmailResponse>, Integer, Hash)>
|
|
642
|
+
> <Array(<SendEmailResponse>, Integer, Hash)> forward_inbound_email_with_http_info(id, forward_email_request, opts)
|
|
561
643
|
|
|
562
644
|
```ruby
|
|
563
645
|
begin
|
|
564
|
-
#
|
|
565
|
-
data, status_code, headers = api_instance.
|
|
646
|
+
# Forward a received email
|
|
647
|
+
data, status_code, headers = api_instance.forward_inbound_email_with_http_info(id, forward_email_request, opts)
|
|
566
648
|
p status_code # => 2xx
|
|
567
649
|
p headers # => { ... }
|
|
568
650
|
p data # => <SendEmailResponse>
|
|
569
651
|
rescue Zyphr::ApiError => e
|
|
570
|
-
puts "Error when calling InboundEmailApi->
|
|
652
|
+
puts "Error when calling InboundEmailApi->forward_inbound_email_with_http_info: #{e}"
|
|
571
653
|
end
|
|
572
654
|
```
|
|
573
655
|
|
|
@@ -576,7 +658,7 @@ end
|
|
|
576
658
|
| Name | Type | Description | Notes |
|
|
577
659
|
| ---- | ---- | ----------- | ----- |
|
|
578
660
|
| **id** | **String** | | |
|
|
579
|
-
| **
|
|
661
|
+
| **forward_email_request** | [**ForwardEmailRequest**](ForwardEmailRequest.md) | | |
|
|
580
662
|
| **idempotency_key** | **String** | | [optional] |
|
|
581
663
|
|
|
582
664
|
### Return type
|
|
@@ -593,13 +675,13 @@ end
|
|
|
593
675
|
- **Accept**: application/json
|
|
594
676
|
|
|
595
677
|
|
|
596
|
-
##
|
|
678
|
+
## forward_inbox_thread_email
|
|
597
679
|
|
|
598
|
-
> <
|
|
680
|
+
> <SendEmailResponse> forward_inbox_thread_email(thread_id, email_id, forward_email_request, opts)
|
|
599
681
|
|
|
600
|
-
|
|
682
|
+
Forward an email in a thread
|
|
601
683
|
|
|
602
|
-
|
|
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.
|
|
603
685
|
|
|
604
686
|
### Examples
|
|
605
687
|
|
|
@@ -615,33 +697,37 @@ Zyphr.configure do |config|
|
|
|
615
697
|
end
|
|
616
698
|
|
|
617
699
|
api_instance = Zyphr::InboundEmailApi.new
|
|
618
|
-
|
|
619
|
-
|
|
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
|
+
}
|
|
620
706
|
|
|
621
707
|
begin
|
|
622
|
-
#
|
|
623
|
-
result = api_instance.
|
|
708
|
+
# Forward an email in a thread
|
|
709
|
+
result = api_instance.forward_inbox_thread_email(thread_id, email_id, forward_email_request, opts)
|
|
624
710
|
p result
|
|
625
711
|
rescue Zyphr::ApiError => e
|
|
626
|
-
puts "Error when calling InboundEmailApi->
|
|
712
|
+
puts "Error when calling InboundEmailApi->forward_inbox_thread_email: #{e}"
|
|
627
713
|
end
|
|
628
714
|
```
|
|
629
715
|
|
|
630
|
-
#### Using the
|
|
716
|
+
#### Using the forward_inbox_thread_email_with_http_info variant
|
|
631
717
|
|
|
632
718
|
This returns an Array which contains the response data, status code and headers.
|
|
633
719
|
|
|
634
|
-
> <Array(<
|
|
720
|
+
> <Array(<SendEmailResponse>, Integer, Hash)> forward_inbox_thread_email_with_http_info(thread_id, email_id, forward_email_request, opts)
|
|
635
721
|
|
|
636
722
|
```ruby
|
|
637
723
|
begin
|
|
638
|
-
#
|
|
639
|
-
data, status_code, headers = api_instance.
|
|
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)
|
|
640
726
|
p status_code # => 2xx
|
|
641
727
|
p headers # => { ... }
|
|
642
|
-
p data # => <
|
|
728
|
+
p data # => <SendEmailResponse>
|
|
643
729
|
rescue Zyphr::ApiError => e
|
|
644
|
-
puts "Error when calling InboundEmailApi->
|
|
730
|
+
puts "Error when calling InboundEmailApi->forward_inbox_thread_email_with_http_info: #{e}"
|
|
645
731
|
end
|
|
646
732
|
```
|
|
647
733
|
|
|
@@ -649,12 +735,1629 @@ end
|
|
|
649
735
|
|
|
650
736
|
| Name | Type | Description | Notes |
|
|
651
737
|
| ---- | ---- | ----------- | ----- |
|
|
652
|
-
| **
|
|
653
|
-
| **
|
|
738
|
+
| **thread_id** | **String** | | |
|
|
739
|
+
| **email_id** | **String** | | |
|
|
740
|
+
| **forward_email_request** | [**ForwardEmailRequest**](ForwardEmailRequest.md) | | |
|
|
741
|
+
| **idempotency_key** | **String** | | [optional] |
|
|
654
742
|
|
|
655
743
|
### Return type
|
|
656
744
|
|
|
657
|
-
[**
|
|
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** | `meta.next_cursor` 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 `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. | [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)
|
|
658
2361
|
|
|
659
2362
|
### Authorization
|
|
660
2363
|
|