zyphr 0.1.54 → 0.1.55
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 +7 -25
- data/docs/AuthApplicationApi.md +66 -0
- data/docs/EmailsApi.md +1 -1
- data/docs/SMSApi.md +69 -1
- data/docs/WebhookDelivery.md +0 -2
- data/docs/WebhookDeliveryDetail.md +0 -2
- data/docs/WebhooksApi.md +0 -69
- data/lib/zyphr/api/auth_application_api.rb +67 -0
- data/lib/zyphr/api/emails_api.rb +2 -2
- data/lib/zyphr/api/sms_api.rb +57 -2
- data/lib/zyphr/api/webhooks_api.rb +0 -57
- data/lib/zyphr/models/webhook_delivery.rb +1 -11
- data/lib/zyphr/models/webhook_delivery_detail.rb +1 -11
- data/lib/zyphr.rb +0 -3
- data/spec/api/auth_application_api_spec.rb +13 -0
- data/spec/api/emails_api_spec.rb +1 -1
- data/spec/api/sms_api_spec.rb +12 -1
- data/spec/api/webhooks_api_spec.rb +0 -11
- data/spec/models/webhook_delivery_detail_spec.rb +0 -6
- data/spec/models/webhook_delivery_spec.rb +0 -6
- data/zyphr.gemspec +1 -1
- metadata +491 -503
- data/docs/WebhookRegion.md +0 -22
- data/docs/WebhookRegionsResponse.md +0 -20
- data/docs/WebhookRegionsResponseData.md +0 -20
- data/lib/zyphr/models/webhook_region.rb +0 -240
- data/lib/zyphr/models/webhook_regions_response.rb +0 -229
- data/lib/zyphr/models/webhook_regions_response_data.rb +0 -232
- data/spec/models/webhook_region_spec.rb +0 -48
- data/spec/models/webhook_regions_response_data_spec.rb +0 -42
- data/spec/models/webhook_regions_response_spec.rb +0 -42
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78bb305af68d19bf367f4a1dfd0947fe5a83e2b339f3477abb2d123608ccf627
|
|
4
|
+
data.tar.gz: 3ca4b809dfae512150cf30224c490a55499f51c91071af4f4fdbb324e11657e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 497270029ef52c3c6a9b183c22a623b86292d4da19ecb85325173ebaa54f5b655795ca0c119011269e0048bbd7784ceedb7cd711740133ee37db1feec0451f8e
|
|
7
|
+
data.tar.gz: 7941e5eaaabb87dda7c572ac928b451484d7756a269fc48795decec7f8888a92f518a9c10222adb559b5da05ff91c23cc5866772c69de44b3341576919fd55bb
|
data/README.md
CHANGED
|
@@ -102,31 +102,15 @@ Please follow the [installation](#installation) procedure and then run the follo
|
|
|
102
102
|
# Load the gem
|
|
103
103
|
require 'zyphr'
|
|
104
104
|
|
|
105
|
-
# Setup authorization
|
|
106
|
-
Zyphr.configure do |config|
|
|
107
|
-
# Configure API key authorization: ApplicationSecret
|
|
108
|
-
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
109
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
110
|
-
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
111
|
-
# Configure faraday connection
|
|
112
|
-
config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
|
|
113
|
-
|
|
114
|
-
# Configure API key authorization: ApplicationPublicKey
|
|
115
|
-
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
116
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
117
|
-
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
118
|
-
# Configure faraday connection
|
|
119
|
-
config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
|
|
120
|
-
end
|
|
121
|
-
|
|
122
105
|
api_instance = Zyphr::AuthApplicationApi.new
|
|
106
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Application ID
|
|
107
|
+
user_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | End user ID
|
|
123
108
|
|
|
124
109
|
begin
|
|
125
|
-
#
|
|
126
|
-
|
|
127
|
-
p result
|
|
110
|
+
#Export all data held about an end user
|
|
111
|
+
api_instance.export_end_user_data(id, user_id)
|
|
128
112
|
rescue Zyphr::ApiError => e
|
|
129
|
-
puts "Exception when calling AuthApplicationApi->
|
|
113
|
+
puts "Exception when calling AuthApplicationApi->export_end_user_data: #{e}"
|
|
130
114
|
end
|
|
131
115
|
|
|
132
116
|
```
|
|
@@ -137,6 +121,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
|
|
|
137
121
|
|
|
138
122
|
Class | Method | HTTP request | Description
|
|
139
123
|
------------ | ------------- | ------------- | -------------
|
|
124
|
+
*Zyphr::AuthApplicationApi* | [**export_end_user_data**](docs/AuthApplicationApi.md#export_end_user_data) | **GET** /v1/applications/{id}/users/{userId}/export | Export all data held about an end user
|
|
140
125
|
*Zyphr::AuthApplicationApi* | [**get_self_application**](docs/AuthApplicationApi.md#get_self_application) | **GET** /auth/application | Get the authenticating application
|
|
141
126
|
*Zyphr::AuthApplicationApi* | [**set_self_application_test_recipients**](docs/AuthApplicationApi.md#set_self_application_test_recipients) | **PATCH** /auth/application | Set the authenticating application's auth-email test allowlist
|
|
142
127
|
*Zyphr::AuthEmailOTPApi* | [**check_email_otp_availability**](docs/AuthEmailOTPApi.md#check_email_otp_availability) | **GET** /auth/email-otp/available | Check email OTP availability
|
|
@@ -283,6 +268,7 @@ Class | Method | HTTP request | Description
|
|
|
283
268
|
*Zyphr::SMSApi* | [**delete_sms_config**](docs/SMSApi.md#delete_sms_config) | **DELETE** /sms/config | Delete SMS configuration
|
|
284
269
|
*Zyphr::SMSApi* | [**get_sms**](docs/SMSApi.md#get_sms) | **GET** /sms/{id} | Get SMS message details
|
|
285
270
|
*Zyphr::SMSApi* | [**get_sms_config**](docs/SMSApi.md#get_sms_config) | **GET** /sms/config | Get SMS configuration
|
|
271
|
+
*Zyphr::SMSApi* | [**get_sms_inbound_webhook**](docs/SMSApi.md#get_sms_inbound_webhook) | **GET** /sms/inbound-webhook | Get the inbound SMS webhook URL
|
|
286
272
|
*Zyphr::SMSApi* | [**list_sms**](docs/SMSApi.md#list_sms) | **GET** /sms | List SMS messages
|
|
287
273
|
*Zyphr::SMSApi* | [**send_batch_sms**](docs/SMSApi.md#send_batch_sms) | **POST** /sms/batch | Send batch SMS messages
|
|
288
274
|
*Zyphr::SMSApi* | [**send_sms**](docs/SMSApi.md#send_sms) | **POST** /sms | Send an SMS message
|
|
@@ -369,7 +355,6 @@ Class | Method | HTTP request | Description
|
|
|
369
355
|
*Zyphr::WebhooksApi* | [**get_webhook_ips**](docs/WebhooksApi.md#get_webhook_ips) | **GET** /v1/webhooks/ips | Get static webhook IPs
|
|
370
356
|
*Zyphr::WebhooksApi* | [**get_webhook_job**](docs/WebhooksApi.md#get_webhook_job) | **GET** /v1/webhooks/jobs/{jobId} | Get replay/retry job status
|
|
371
357
|
*Zyphr::WebhooksApi* | [**get_webhook_metrics**](docs/WebhooksApi.md#get_webhook_metrics) | **GET** /v1/webhooks/{id}/metrics | Get webhook health metrics
|
|
372
|
-
*Zyphr::WebhooksApi* | [**get_webhook_regions**](docs/WebhooksApi.md#get_webhook_regions) | **GET** /v1/webhooks/regions | Get available webhook regions
|
|
373
358
|
*Zyphr::WebhooksApi* | [**get_webhook_usage**](docs/WebhooksApi.md#get_webhook_usage) | **GET** /v1/webhooks/usage | Get webhook usage metrics
|
|
374
359
|
*Zyphr::WebhooksApi* | [**list_webhook_deliveries**](docs/WebhooksApi.md#list_webhook_deliveries) | **GET** /v1/webhooks/{id}/deliveries | List webhook deliveries
|
|
375
360
|
*Zyphr::WebhooksApi* | [**list_webhook_event_types**](docs/WebhooksApi.md#list_webhook_event_types) | **GET** /v1/webhooks/events | List webhook event types
|
|
@@ -879,9 +864,6 @@ Class | Method | HTTP request | Description
|
|
|
879
864
|
- [Zyphr::WebhookJobResponse](docs/WebhookJobResponse.md)
|
|
880
865
|
- [Zyphr::WebhookListResponse](docs/WebhookListResponse.md)
|
|
881
866
|
- [Zyphr::WebhookMetricsResponse](docs/WebhookMetricsResponse.md)
|
|
882
|
-
- [Zyphr::WebhookRegion](docs/WebhookRegion.md)
|
|
883
|
-
- [Zyphr::WebhookRegionsResponse](docs/WebhookRegionsResponse.md)
|
|
884
|
-
- [Zyphr::WebhookRegionsResponseData](docs/WebhookRegionsResponseData.md)
|
|
885
867
|
- [Zyphr::WebhookReplayResponse](docs/WebhookReplayResponse.md)
|
|
886
868
|
- [Zyphr::WebhookResponse](docs/WebhookResponse.md)
|
|
887
869
|
- [Zyphr::WebhookSecretRotateResponse](docs/WebhookSecretRotateResponse.md)
|
data/docs/AuthApplicationApi.md
CHANGED
|
@@ -4,10 +4,76 @@ All URIs are relative to *https://api.zyphr.dev/v1*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**export_end_user_data**](AuthApplicationApi.md#export_end_user_data) | **GET** /v1/applications/{id}/users/{userId}/export | Export all data held about an end user |
|
|
7
8
|
| [**get_self_application**](AuthApplicationApi.md#get_self_application) | **GET** /auth/application | Get the authenticating application |
|
|
8
9
|
| [**set_self_application_test_recipients**](AuthApplicationApi.md#set_self_application_test_recipients) | **PATCH** /auth/application | Set the authenticating application's auth-email test allowlist |
|
|
9
10
|
|
|
10
11
|
|
|
12
|
+
## export_end_user_data
|
|
13
|
+
|
|
14
|
+
> export_end_user_data(id, user_id)
|
|
15
|
+
|
|
16
|
+
Export all data held about an end user
|
|
17
|
+
|
|
18
|
+
Returns a machine-readable JSON bundle of everything stored about one end user, for answering a GDPR Art. 15 (access) or Art. 20 (portability) request. Zyphr is a **processor**: we do not answer data subjects directly. This endpoint gives you, the controller, the data needed to respond to your own end user. **Credentials are deliberately excluded** and are listed in `export_metadata.excluded`: password hashes, session refresh-token hashes, MFA secrets, OAuth access/refresh tokens and WebAuthn public keys. These are authentication artifacts rather than personal data about the subject, and including them would turn this endpoint into a credential-exfiltration path. Message history is capped at the 1,000 most recent messages; `export_metadata.message_history_truncated` reports whether the cap was hit.
|
|
19
|
+
|
|
20
|
+
### Examples
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'time'
|
|
24
|
+
require 'zyphr'
|
|
25
|
+
|
|
26
|
+
api_instance = Zyphr::AuthApplicationApi.new
|
|
27
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Application ID
|
|
28
|
+
user_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | End user ID
|
|
29
|
+
|
|
30
|
+
begin
|
|
31
|
+
# Export all data held about an end user
|
|
32
|
+
api_instance.export_end_user_data(id, user_id)
|
|
33
|
+
rescue Zyphr::ApiError => e
|
|
34
|
+
puts "Error when calling AuthApplicationApi->export_end_user_data: #{e}"
|
|
35
|
+
end
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Using the export_end_user_data_with_http_info variant
|
|
39
|
+
|
|
40
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
41
|
+
|
|
42
|
+
> <Array(nil, Integer, Hash)> export_end_user_data_with_http_info(id, user_id)
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
begin
|
|
46
|
+
# Export all data held about an end user
|
|
47
|
+
data, status_code, headers = api_instance.export_end_user_data_with_http_info(id, user_id)
|
|
48
|
+
p status_code # => 2xx
|
|
49
|
+
p headers # => { ... }
|
|
50
|
+
p data # => nil
|
|
51
|
+
rescue Zyphr::ApiError => e
|
|
52
|
+
puts "Error when calling AuthApplicationApi->export_end_user_data_with_http_info: #{e}"
|
|
53
|
+
end
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Parameters
|
|
57
|
+
|
|
58
|
+
| Name | Type | Description | Notes |
|
|
59
|
+
| ---- | ---- | ----------- | ----- |
|
|
60
|
+
| **id** | **String** | Application ID | |
|
|
61
|
+
| **user_id** | **String** | End user ID | |
|
|
62
|
+
|
|
63
|
+
### Return type
|
|
64
|
+
|
|
65
|
+
nil (empty response body)
|
|
66
|
+
|
|
67
|
+
### Authorization
|
|
68
|
+
|
|
69
|
+
No authorization required
|
|
70
|
+
|
|
71
|
+
### HTTP request headers
|
|
72
|
+
|
|
73
|
+
- **Content-Type**: Not defined
|
|
74
|
+
- **Accept**: Not defined
|
|
75
|
+
|
|
76
|
+
|
|
11
77
|
## get_self_application
|
|
12
78
|
|
|
13
79
|
> <ApplicationSelfResponse> get_self_application
|
data/docs/EmailsApi.md
CHANGED
|
@@ -381,7 +381,7 @@ end
|
|
|
381
381
|
|
|
382
382
|
Send an email
|
|
383
383
|
|
|
384
|
-
Queue an email for delivery. The email is processed asynchronously and you'll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`.
|
|
384
|
+
Queue an email for delivery. The email is processed asynchronously and you'll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`. **CAN-SPAM compliance — actions required from you:** - **Set `classification`** to `transactional` or `marketing`. Unclassified is treated as marketing, the stricter reading. Transactional mail (password resets, receipts) is exempt from the opt-out and postal-address requirements. - **Set your postal address** in project settings. Commercial email must carry a valid physical postal address — the most commonly missed CAN-SPAM element. Marketing sends without one are flagged. - **Include an unsubscribe mechanism** on commercial email. Zyphr enforces suppression automatically once someone opts out, but the link itself is yours to include. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
|
|
385
385
|
|
|
386
386
|
### Examples
|
|
387
387
|
|
data/docs/SMSApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
|
|
|
7
7
|
| [**delete_sms_config**](SMSApi.md#delete_sms_config) | **DELETE** /sms/config | Delete SMS configuration |
|
|
8
8
|
| [**get_sms**](SMSApi.md#get_sms) | **GET** /sms/{id} | Get SMS message details |
|
|
9
9
|
| [**get_sms_config**](SMSApi.md#get_sms_config) | **GET** /sms/config | Get SMS configuration |
|
|
10
|
+
| [**get_sms_inbound_webhook**](SMSApi.md#get_sms_inbound_webhook) | **GET** /sms/inbound-webhook | Get the inbound SMS webhook URL |
|
|
10
11
|
| [**list_sms**](SMSApi.md#list_sms) | **GET** /sms | List SMS messages |
|
|
11
12
|
| [**send_batch_sms**](SMSApi.md#send_batch_sms) | **POST** /sms/batch | Send batch SMS messages |
|
|
12
13
|
| [**send_sms**](SMSApi.md#send_sms) | **POST** /sms | Send an SMS message |
|
|
@@ -222,6 +223,73 @@ This endpoint does not need any parameter.
|
|
|
222
223
|
- **Accept**: application/json
|
|
223
224
|
|
|
224
225
|
|
|
226
|
+
## get_sms_inbound_webhook
|
|
227
|
+
|
|
228
|
+
> get_sms_inbound_webhook
|
|
229
|
+
|
|
230
|
+
Get the inbound SMS webhook URL
|
|
231
|
+
|
|
232
|
+
Returns the URL to configure in your SMS provider so STOP/opt-out replies reach Zyphr. The token is generated on first request and is stable thereafter. **This is required for TCPA compliance.** Until your provider is pointed at this URL, opt-out replies stop at the provider and never reach us — from Zyphr's side the recipient never opted out, and sends continue. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
|
|
233
|
+
|
|
234
|
+
### Examples
|
|
235
|
+
|
|
236
|
+
```ruby
|
|
237
|
+
require 'time'
|
|
238
|
+
require 'zyphr'
|
|
239
|
+
# setup authorization
|
|
240
|
+
Zyphr.configure do |config|
|
|
241
|
+
# Configure API key authorization: ApiKeyAuth
|
|
242
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
243
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
244
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
api_instance = Zyphr::SMSApi.new
|
|
248
|
+
|
|
249
|
+
begin
|
|
250
|
+
# Get the inbound SMS webhook URL
|
|
251
|
+
api_instance.get_sms_inbound_webhook
|
|
252
|
+
rescue Zyphr::ApiError => e
|
|
253
|
+
puts "Error when calling SMSApi->get_sms_inbound_webhook: #{e}"
|
|
254
|
+
end
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### Using the get_sms_inbound_webhook_with_http_info variant
|
|
258
|
+
|
|
259
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
260
|
+
|
|
261
|
+
> <Array(nil, Integer, Hash)> get_sms_inbound_webhook_with_http_info
|
|
262
|
+
|
|
263
|
+
```ruby
|
|
264
|
+
begin
|
|
265
|
+
# Get the inbound SMS webhook URL
|
|
266
|
+
data, status_code, headers = api_instance.get_sms_inbound_webhook_with_http_info
|
|
267
|
+
p status_code # => 2xx
|
|
268
|
+
p headers # => { ... }
|
|
269
|
+
p data # => nil
|
|
270
|
+
rescue Zyphr::ApiError => e
|
|
271
|
+
puts "Error when calling SMSApi->get_sms_inbound_webhook_with_http_info: #{e}"
|
|
272
|
+
end
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Parameters
|
|
276
|
+
|
|
277
|
+
This endpoint does not need any parameter.
|
|
278
|
+
|
|
279
|
+
### Return type
|
|
280
|
+
|
|
281
|
+
nil (empty response body)
|
|
282
|
+
|
|
283
|
+
### Authorization
|
|
284
|
+
|
|
285
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
286
|
+
|
|
287
|
+
### HTTP request headers
|
|
288
|
+
|
|
289
|
+
- **Content-Type**: Not defined
|
|
290
|
+
- **Accept**: Not defined
|
|
291
|
+
|
|
292
|
+
|
|
225
293
|
## list_sms
|
|
226
294
|
|
|
227
295
|
> <SmsListResponse> list_sms(opts)
|
|
@@ -378,7 +446,7 @@ end
|
|
|
378
446
|
|
|
379
447
|
Send an SMS message
|
|
380
448
|
|
|
381
|
-
Send a single SMS text message. Supports subscriber preference checks and scheduling.
|
|
449
|
+
Send a single SMS text message. Supports subscriber preference checks and scheduling. **TCPA compliance — actions required from you:** - **Configure the inbound webhook.** Zyphr only processes STOP/opt-out replies if your SMS provider is pointed at our inbound endpoint. Until you do this, opt-outs never reach us and we will keep delivering. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements). - **Pass `recipient_timezone`** (IANA, e.g. `America/New_York`) so quiet hours (8am-9pm recipient-local) can be enforced. Without it we send and record that quiet hours could not be evaluated. We deliberately do not infer a timezone from the area code — people keep numbers when they move. - **Record consent** for marketing sends. Marketing requires prior express *written* consent; `express` consent covers transactional only. With no record on file we deliver and flag it, which is a gap in your evidence, not permission. - **Set `classification`.** Unclassified messages are treated as marketing, the stricter reading.
|
|
382
450
|
|
|
383
451
|
### Examples
|
|
384
452
|
|
data/docs/WebhookDelivery.md
CHANGED
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
| **first_attempted_at** | **Time** | | [optional] |
|
|
19
19
|
| **last_attempted_at** | **Time** | | [optional] |
|
|
20
20
|
| **completed_at** | **Time** | | [optional] |
|
|
21
|
-
| **delivery_region** | **String** | | [optional] |
|
|
22
21
|
| **created_at** | **Time** | | [optional] |
|
|
23
22
|
|
|
24
23
|
## Example
|
|
@@ -41,7 +40,6 @@ instance = Zyphr::WebhookDelivery.new(
|
|
|
41
40
|
first_attempted_at: null,
|
|
42
41
|
last_attempted_at: null,
|
|
43
42
|
completed_at: null,
|
|
44
|
-
delivery_region: null,
|
|
45
43
|
created_at: null
|
|
46
44
|
)
|
|
47
45
|
```
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
| **first_attempted_at** | **Time** | | [optional] |
|
|
19
19
|
| **last_attempted_at** | **Time** | | [optional] |
|
|
20
20
|
| **completed_at** | **Time** | | [optional] |
|
|
21
|
-
| **delivery_region** | **String** | | [optional] |
|
|
22
21
|
| **created_at** | **Time** | | [optional] |
|
|
23
22
|
| **payload** | **Object** | | [optional] |
|
|
24
23
|
| **last_response_body** | **String** | | [optional] |
|
|
@@ -45,7 +44,6 @@ instance = Zyphr::WebhookDeliveryDetail.new(
|
|
|
45
44
|
first_attempted_at: null,
|
|
46
45
|
last_attempted_at: null,
|
|
47
46
|
completed_at: null,
|
|
48
|
-
delivery_region: null,
|
|
49
47
|
created_at: null,
|
|
50
48
|
payload: null,
|
|
51
49
|
last_response_body: null,
|
data/docs/WebhooksApi.md
CHANGED
|
@@ -15,7 +15,6 @@ All URIs are relative to *https://api.zyphr.dev/v1*
|
|
|
15
15
|
| [**get_webhook_ips**](WebhooksApi.md#get_webhook_ips) | **GET** /v1/webhooks/ips | Get static webhook IPs |
|
|
16
16
|
| [**get_webhook_job**](WebhooksApi.md#get_webhook_job) | **GET** /v1/webhooks/jobs/{jobId} | Get replay/retry job status |
|
|
17
17
|
| [**get_webhook_metrics**](WebhooksApi.md#get_webhook_metrics) | **GET** /v1/webhooks/{id}/metrics | Get webhook health metrics |
|
|
18
|
-
| [**get_webhook_regions**](WebhooksApi.md#get_webhook_regions) | **GET** /v1/webhooks/regions | Get available webhook regions |
|
|
19
18
|
| [**get_webhook_usage**](WebhooksApi.md#get_webhook_usage) | **GET** /v1/webhooks/usage | Get webhook usage metrics |
|
|
20
19
|
| [**list_webhook_deliveries**](WebhooksApi.md#list_webhook_deliveries) | **GET** /v1/webhooks/{id}/deliveries | List webhook deliveries |
|
|
21
20
|
| [**list_webhook_event_types**](WebhooksApi.md#list_webhook_event_types) | **GET** /v1/webhooks/events | List webhook event types |
|
|
@@ -810,74 +809,6 @@ end
|
|
|
810
809
|
- **Accept**: application/json
|
|
811
810
|
|
|
812
811
|
|
|
813
|
-
## get_webhook_regions
|
|
814
|
-
|
|
815
|
-
> <WebhookRegionsResponse> get_webhook_regions
|
|
816
|
-
|
|
817
|
-
Get available webhook regions
|
|
818
|
-
|
|
819
|
-
Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
|
|
820
|
-
|
|
821
|
-
### Examples
|
|
822
|
-
|
|
823
|
-
```ruby
|
|
824
|
-
require 'time'
|
|
825
|
-
require 'zyphr'
|
|
826
|
-
# setup authorization
|
|
827
|
-
Zyphr.configure do |config|
|
|
828
|
-
# Configure API key authorization: ApiKeyAuth
|
|
829
|
-
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
830
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
831
|
-
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
832
|
-
end
|
|
833
|
-
|
|
834
|
-
api_instance = Zyphr::WebhooksApi.new
|
|
835
|
-
|
|
836
|
-
begin
|
|
837
|
-
# Get available webhook regions
|
|
838
|
-
result = api_instance.get_webhook_regions
|
|
839
|
-
p result
|
|
840
|
-
rescue Zyphr::ApiError => e
|
|
841
|
-
puts "Error when calling WebhooksApi->get_webhook_regions: #{e}"
|
|
842
|
-
end
|
|
843
|
-
```
|
|
844
|
-
|
|
845
|
-
#### Using the get_webhook_regions_with_http_info variant
|
|
846
|
-
|
|
847
|
-
This returns an Array which contains the response data, status code and headers.
|
|
848
|
-
|
|
849
|
-
> <Array(<WebhookRegionsResponse>, Integer, Hash)> get_webhook_regions_with_http_info
|
|
850
|
-
|
|
851
|
-
```ruby
|
|
852
|
-
begin
|
|
853
|
-
# Get available webhook regions
|
|
854
|
-
data, status_code, headers = api_instance.get_webhook_regions_with_http_info
|
|
855
|
-
p status_code # => 2xx
|
|
856
|
-
p headers # => { ... }
|
|
857
|
-
p data # => <WebhookRegionsResponse>
|
|
858
|
-
rescue Zyphr::ApiError => e
|
|
859
|
-
puts "Error when calling WebhooksApi->get_webhook_regions_with_http_info: #{e}"
|
|
860
|
-
end
|
|
861
|
-
```
|
|
862
|
-
|
|
863
|
-
### Parameters
|
|
864
|
-
|
|
865
|
-
This endpoint does not need any parameter.
|
|
866
|
-
|
|
867
|
-
### Return type
|
|
868
|
-
|
|
869
|
-
[**WebhookRegionsResponse**](WebhookRegionsResponse.md)
|
|
870
|
-
|
|
871
|
-
### Authorization
|
|
872
|
-
|
|
873
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
874
|
-
|
|
875
|
-
### HTTP request headers
|
|
876
|
-
|
|
877
|
-
- **Content-Type**: Not defined
|
|
878
|
-
- **Accept**: application/json
|
|
879
|
-
|
|
880
|
-
|
|
881
812
|
## get_webhook_usage
|
|
882
813
|
|
|
883
814
|
> <WebhookUsageResponse> get_webhook_usage
|
|
@@ -19,6 +19,73 @@ module Zyphr
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Export all data held about an end user
|
|
23
|
+
# Returns a machine-readable JSON bundle of everything stored about one end user, for answering a GDPR Art. 15 (access) or Art. 20 (portability) request. Zyphr is a **processor**: we do not answer data subjects directly. This endpoint gives you, the controller, the data needed to respond to your own end user. **Credentials are deliberately excluded** and are listed in `export_metadata.excluded`: password hashes, session refresh-token hashes, MFA secrets, OAuth access/refresh tokens and WebAuthn public keys. These are authentication artifacts rather than personal data about the subject, and including them would turn this endpoint into a credential-exfiltration path. Message history is capped at the 1,000 most recent messages; `export_metadata.message_history_truncated` reports whether the cap was hit.
|
|
24
|
+
# @param id [String] Application ID
|
|
25
|
+
# @param user_id [String] End user ID
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [nil]
|
|
28
|
+
def export_end_user_data(id, user_id, opts = {})
|
|
29
|
+
export_end_user_data_with_http_info(id, user_id, opts)
|
|
30
|
+
nil
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Export all data held about an end user
|
|
34
|
+
# Returns a machine-readable JSON bundle of everything stored about one end user, for answering a GDPR Art. 15 (access) or Art. 20 (portability) request. Zyphr is a **processor**: we do not answer data subjects directly. This endpoint gives you, the controller, the data needed to respond to your own end user. **Credentials are deliberately excluded** and are listed in `export_metadata.excluded`: password hashes, session refresh-token hashes, MFA secrets, OAuth access/refresh tokens and WebAuthn public keys. These are authentication artifacts rather than personal data about the subject, and including them would turn this endpoint into a credential-exfiltration path. Message history is capped at the 1,000 most recent messages; `export_metadata.message_history_truncated` reports whether the cap was hit.
|
|
35
|
+
# @param id [String] Application ID
|
|
36
|
+
# @param user_id [String] End user ID
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
39
|
+
def export_end_user_data_with_http_info(id, user_id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: AuthApplicationApi.export_end_user_data ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AuthApplicationApi.export_end_user_data"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'user_id' is set
|
|
48
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling AuthApplicationApi.export_end_user_data"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/v1/applications/{id}/users/{userId}/export'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
|
|
60
|
+
# form parameters
|
|
61
|
+
form_params = opts[:form_params] || {}
|
|
62
|
+
|
|
63
|
+
# http body (model)
|
|
64
|
+
post_body = opts[:debug_body]
|
|
65
|
+
|
|
66
|
+
# return_type
|
|
67
|
+
return_type = opts[:debug_return_type]
|
|
68
|
+
|
|
69
|
+
# auth_names
|
|
70
|
+
auth_names = opts[:debug_auth_names] || []
|
|
71
|
+
|
|
72
|
+
new_options = opts.merge(
|
|
73
|
+
:operation => :"AuthApplicationApi.export_end_user_data",
|
|
74
|
+
:header_params => header_params,
|
|
75
|
+
:query_params => query_params,
|
|
76
|
+
:form_params => form_params,
|
|
77
|
+
:body => post_body,
|
|
78
|
+
:auth_names => auth_names,
|
|
79
|
+
:return_type => return_type
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
83
|
+
if @api_client.config.debugging
|
|
84
|
+
@api_client.config.logger.debug "API called: AuthApplicationApi#export_end_user_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
85
|
+
end
|
|
86
|
+
return data, status_code, headers
|
|
87
|
+
end
|
|
88
|
+
|
|
22
89
|
# Get the authenticating application
|
|
23
90
|
# Return non-sensitive metadata about the application whose credentials authenticated this request. Lets an integrator read their own application_id (the sole tenant discriminator embedded in every end-user token) directly from the API, rather than only from the dashboard UI or by decoding a token. Returns only id, name, the calling environment's mode, and the JWT signing algorithm — never secrets, signing keys, or account-internal fields.
|
|
24
91
|
# @param [Hash] opts the optional parameters
|
data/lib/zyphr/api/emails_api.rb
CHANGED
|
@@ -362,7 +362,7 @@ module Zyphr
|
|
|
362
362
|
end
|
|
363
363
|
|
|
364
364
|
# Send an email
|
|
365
|
-
# Queue an email for delivery. The email is processed asynchronously and you'll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`.
|
|
365
|
+
# Queue an email for delivery. The email is processed asynchronously and you'll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`. **CAN-SPAM compliance — actions required from you:** - **Set `classification`** to `transactional` or `marketing`. Unclassified is treated as marketing, the stricter reading. Transactional mail (password resets, receipts) is exempt from the opt-out and postal-address requirements. - **Set your postal address** in project settings. Commercial email must carry a valid physical postal address — the most commonly missed CAN-SPAM element. Marketing sends without one are flagged. - **Include an unsubscribe mechanism** on commercial email. Zyphr enforces suppression automatically once someone opts out, but the link itself is yours to include. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
|
|
366
366
|
# @param send_email_request [SendEmailRequest]
|
|
367
367
|
# @param [Hash] opts the optional parameters
|
|
368
368
|
# @return [SendEmailResponse]
|
|
@@ -372,7 +372,7 @@ module Zyphr
|
|
|
372
372
|
end
|
|
373
373
|
|
|
374
374
|
# Send an email
|
|
375
|
-
# Queue an email for delivery. The email is processed asynchronously and you'll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`.
|
|
375
|
+
# Queue an email for delivery. The email is processed asynchronously and you'll receive a message ID to track its status. You can provide content directly via `html`/`text` fields, or use a template by specifying `template_id` and `template_data`. **CAN-SPAM compliance — actions required from you:** - **Set `classification`** to `transactional` or `marketing`. Unclassified is treated as marketing, the stricter reading. Transactional mail (password resets, receipts) is exempt from the opt-out and postal-address requirements. - **Set your postal address** in project settings. Commercial email must carry a valid physical postal address — the most commonly missed CAN-SPAM element. Marketing sends without one are flagged. - **Include an unsubscribe mechanism** on commercial email. Zyphr enforces suppression automatically once someone opts out, but the link itself is yours to include. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
|
|
376
376
|
# @param send_email_request [SendEmailRequest]
|
|
377
377
|
# @param [Hash] opts the optional parameters
|
|
378
378
|
# @return [Array<(SendEmailResponse, Integer, Hash)>] SendEmailResponse data, response status code and response headers
|
data/lib/zyphr/api/sms_api.rb
CHANGED
|
@@ -196,6 +196,61 @@ module Zyphr
|
|
|
196
196
|
return data, status_code, headers
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
+
# Get the inbound SMS webhook URL
|
|
200
|
+
# Returns the URL to configure in your SMS provider so STOP/opt-out replies reach Zyphr. The token is generated on first request and is stable thereafter. **This is required for TCPA compliance.** Until your provider is pointed at this URL, opt-out replies stop at the provider and never reach us — from Zyphr's side the recipient never opted out, and sends continue. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
|
|
201
|
+
# @param [Hash] opts the optional parameters
|
|
202
|
+
# @return [nil]
|
|
203
|
+
def get_sms_inbound_webhook(opts = {})
|
|
204
|
+
get_sms_inbound_webhook_with_http_info(opts)
|
|
205
|
+
nil
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Get the inbound SMS webhook URL
|
|
209
|
+
# Returns the URL to configure in your SMS provider so STOP/opt-out replies reach Zyphr. The token is generated on first request and is stable thereafter. **This is required for TCPA compliance.** Until your provider is pointed at this URL, opt-out replies stop at the provider and never reach us — from Zyphr's side the recipient never opted out, and sends continue. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements).
|
|
210
|
+
# @param [Hash] opts the optional parameters
|
|
211
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
212
|
+
def get_sms_inbound_webhook_with_http_info(opts = {})
|
|
213
|
+
if @api_client.config.debugging
|
|
214
|
+
@api_client.config.logger.debug 'Calling API: SMSApi.get_sms_inbound_webhook ...'
|
|
215
|
+
end
|
|
216
|
+
# resource path
|
|
217
|
+
local_var_path = '/sms/inbound-webhook'
|
|
218
|
+
|
|
219
|
+
# query parameters
|
|
220
|
+
query_params = opts[:query_params] || {}
|
|
221
|
+
|
|
222
|
+
# header parameters
|
|
223
|
+
header_params = opts[:header_params] || {}
|
|
224
|
+
|
|
225
|
+
# form parameters
|
|
226
|
+
form_params = opts[:form_params] || {}
|
|
227
|
+
|
|
228
|
+
# http body (model)
|
|
229
|
+
post_body = opts[:debug_body]
|
|
230
|
+
|
|
231
|
+
# return_type
|
|
232
|
+
return_type = opts[:debug_return_type]
|
|
233
|
+
|
|
234
|
+
# auth_names
|
|
235
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
236
|
+
|
|
237
|
+
new_options = opts.merge(
|
|
238
|
+
:operation => :"SMSApi.get_sms_inbound_webhook",
|
|
239
|
+
:header_params => header_params,
|
|
240
|
+
:query_params => query_params,
|
|
241
|
+
:form_params => form_params,
|
|
242
|
+
:body => post_body,
|
|
243
|
+
:auth_names => auth_names,
|
|
244
|
+
:return_type => return_type
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
248
|
+
if @api_client.config.debugging
|
|
249
|
+
@api_client.config.logger.debug "API called: SMSApi#get_sms_inbound_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
250
|
+
end
|
|
251
|
+
return data, status_code, headers
|
|
252
|
+
end
|
|
253
|
+
|
|
199
254
|
# List SMS messages
|
|
200
255
|
# List SMS messages for the account with optional filtering and pagination.
|
|
201
256
|
# @param [Hash] opts the optional parameters
|
|
@@ -342,7 +397,7 @@ module Zyphr
|
|
|
342
397
|
end
|
|
343
398
|
|
|
344
399
|
# Send an SMS message
|
|
345
|
-
# Send a single SMS text message. Supports subscriber preference checks and scheduling.
|
|
400
|
+
# Send a single SMS text message. Supports subscriber preference checks and scheduling. **TCPA compliance — actions required from you:** - **Configure the inbound webhook.** Zyphr only processes STOP/opt-out replies if your SMS provider is pointed at our inbound endpoint. Until you do this, opt-outs never reach us and we will keep delivering. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements). - **Pass `recipient_timezone`** (IANA, e.g. `America/New_York`) so quiet hours (8am-9pm recipient-local) can be enforced. Without it we send and record that quiet hours could not be evaluated. We deliberately do not infer a timezone from the area code — people keep numbers when they move. - **Record consent** for marketing sends. Marketing requires prior express *written* consent; `express` consent covers transactional only. With no record on file we deliver and flag it, which is a gap in your evidence, not permission. - **Set `classification`.** Unclassified messages are treated as marketing, the stricter reading.
|
|
346
401
|
# @param send_sms_request [SendSmsRequest]
|
|
347
402
|
# @param [Hash] opts the optional parameters
|
|
348
403
|
# @return [SendSmsResponse]
|
|
@@ -352,7 +407,7 @@ module Zyphr
|
|
|
352
407
|
end
|
|
353
408
|
|
|
354
409
|
# Send an SMS message
|
|
355
|
-
# Send a single SMS text message. Supports subscriber preference checks and scheduling.
|
|
410
|
+
# Send a single SMS text message. Supports subscriber preference checks and scheduling. **TCPA compliance — actions required from you:** - **Configure the inbound webhook.** Zyphr only processes STOP/opt-out replies if your SMS provider is pointed at our inbound endpoint. Until you do this, opt-outs never reach us and we will keep delivering. See [Compliance Requirements](https://zyphr.dev/guides/compliance-requirements). - **Pass `recipient_timezone`** (IANA, e.g. `America/New_York`) so quiet hours (8am-9pm recipient-local) can be enforced. Without it we send and record that quiet hours could not be evaluated. We deliberately do not infer a timezone from the area code — people keep numbers when they move. - **Record consent** for marketing sends. Marketing requires prior express *written* consent; `express` consent covers transactional only. With no record on file we deliver and flag it, which is a gap in your evidence, not permission. - **Set `classification`.** Unclassified messages are treated as marketing, the stricter reading.
|
|
356
411
|
# @param send_sms_request [SendSmsRequest]
|
|
357
412
|
# @param [Hash] opts the optional parameters
|
|
358
413
|
# @return [Array<(SendSmsResponse, Integer, Hash)>] SendSmsResponse data, response status code and response headers
|
|
@@ -718,63 +718,6 @@ module Zyphr
|
|
|
718
718
|
return data, status_code, headers
|
|
719
719
|
end
|
|
720
720
|
|
|
721
|
-
# Get available webhook regions
|
|
722
|
-
# Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
|
|
723
|
-
# @param [Hash] opts the optional parameters
|
|
724
|
-
# @return [WebhookRegionsResponse]
|
|
725
|
-
def get_webhook_regions(opts = {})
|
|
726
|
-
data, _status_code, _headers = get_webhook_regions_with_http_info(opts)
|
|
727
|
-
data
|
|
728
|
-
end
|
|
729
|
-
|
|
730
|
-
# Get available webhook regions
|
|
731
|
-
# Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
|
|
732
|
-
# @param [Hash] opts the optional parameters
|
|
733
|
-
# @return [Array<(WebhookRegionsResponse, Integer, Hash)>] WebhookRegionsResponse data, response status code and response headers
|
|
734
|
-
def get_webhook_regions_with_http_info(opts = {})
|
|
735
|
-
if @api_client.config.debugging
|
|
736
|
-
@api_client.config.logger.debug 'Calling API: WebhooksApi.get_webhook_regions ...'
|
|
737
|
-
end
|
|
738
|
-
# resource path
|
|
739
|
-
local_var_path = '/v1/webhooks/regions'
|
|
740
|
-
|
|
741
|
-
# query parameters
|
|
742
|
-
query_params = opts[:query_params] || {}
|
|
743
|
-
|
|
744
|
-
# header parameters
|
|
745
|
-
header_params = opts[:header_params] || {}
|
|
746
|
-
# HTTP header 'Accept' (if needed)
|
|
747
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
748
|
-
|
|
749
|
-
# form parameters
|
|
750
|
-
form_params = opts[:form_params] || {}
|
|
751
|
-
|
|
752
|
-
# http body (model)
|
|
753
|
-
post_body = opts[:debug_body]
|
|
754
|
-
|
|
755
|
-
# return_type
|
|
756
|
-
return_type = opts[:debug_return_type] || 'WebhookRegionsResponse'
|
|
757
|
-
|
|
758
|
-
# auth_names
|
|
759
|
-
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
760
|
-
|
|
761
|
-
new_options = opts.merge(
|
|
762
|
-
:operation => :"WebhooksApi.get_webhook_regions",
|
|
763
|
-
:header_params => header_params,
|
|
764
|
-
:query_params => query_params,
|
|
765
|
-
:form_params => form_params,
|
|
766
|
-
:body => post_body,
|
|
767
|
-
:auth_names => auth_names,
|
|
768
|
-
:return_type => return_type
|
|
769
|
-
)
|
|
770
|
-
|
|
771
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
772
|
-
if @api_client.config.debugging
|
|
773
|
-
@api_client.config.logger.debug "API called: WebhooksApi#get_webhook_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
774
|
-
end
|
|
775
|
-
return data, status_code, headers
|
|
776
|
-
end
|
|
777
|
-
|
|
778
721
|
# Get webhook usage metrics
|
|
779
722
|
# Get webhook delivery usage statistics for the current billing period.
|
|
780
723
|
# @param [Hash] opts the optional parameters
|