zyphr 0.1.53 → 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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -25
  3. data/docs/AuthApplicationApi.md +66 -0
  4. data/docs/AuthEmailVerificationApi.md +4 -4
  5. data/docs/ConfirmEmailVerificationResponseData.md +3 -1
  6. data/docs/EmailsApi.md +1 -1
  7. data/docs/ResendEmailVerificationRequest.md +18 -0
  8. data/docs/SMSApi.md +69 -1
  9. data/docs/SendEmailVerificationRequest.md +1 -1
  10. data/docs/WebhookDelivery.md +0 -2
  11. data/docs/WebhookDeliveryDetail.md +0 -2
  12. data/docs/WebhooksApi.md +0 -69
  13. data/lib/zyphr/api/auth_application_api.rb +67 -0
  14. data/lib/zyphr/api/auth_email_verification_api.rb +7 -7
  15. data/lib/zyphr/api/emails_api.rb +2 -2
  16. data/lib/zyphr/api/sms_api.rb +57 -2
  17. data/lib/zyphr/api/webhooks_api.rb +0 -57
  18. data/lib/zyphr/models/confirm_email_verification_response_data.rb +14 -4
  19. data/lib/zyphr/models/{webhook_regions_response.rb → resend_email_verification_request.rb} +11 -19
  20. data/lib/zyphr/models/send_email_verification_request.rb +1 -1
  21. data/lib/zyphr/models/webhook_delivery.rb +1 -11
  22. data/lib/zyphr/models/webhook_delivery_detail.rb +1 -11
  23. data/lib/zyphr.rb +1 -3
  24. data/spec/api/auth_application_api_spec.rb +13 -0
  25. data/spec/api/auth_email_verification_api_spec.rb +3 -3
  26. data/spec/api/emails_api_spec.rb +1 -1
  27. data/spec/api/sms_api_spec.rb +12 -1
  28. data/spec/api/webhooks_api_spec.rb +0 -11
  29. data/spec/models/confirm_email_verification_response_data_spec.rb +6 -0
  30. data/spec/models/{webhook_regions_response_spec.rb → resend_email_verification_request_spec.rb} +7 -13
  31. data/spec/models/webhook_delivery_detail_spec.rb +0 -6
  32. data/spec/models/webhook_delivery_spec.rb +0 -6
  33. data/zyphr.gemspec +1 -1
  34. metadata +494 -502
  35. data/docs/WebhookRegion.md +0 -22
  36. data/docs/WebhookRegionsResponse.md +0 -20
  37. data/docs/WebhookRegionsResponseData.md +0 -20
  38. data/lib/zyphr/models/webhook_region.rb +0 -240
  39. data/lib/zyphr/models/webhook_regions_response_data.rb +0 -232
  40. data/spec/models/webhook_region_spec.rb +0 -48
  41. data/spec/models/webhook_regions_response_data_spec.rb +0 -42
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c48e48e0a4e1c2a2ea9d58e507adcee64e9cbac7a31c336da15d0ca3b0df3d51
4
- data.tar.gz: c8accc89829202be56cdcae385e1ffd1df20da4bd89bbb2c46d70944eebe9ad8
3
+ metadata.gz: 78bb305af68d19bf367f4a1dfd0947fe5a83e2b339f3477abb2d123608ccf627
4
+ data.tar.gz: 3ca4b809dfae512150cf30224c490a55499f51c91071af4f4fdbb324e11657e1
5
5
  SHA512:
6
- metadata.gz: f3281a542c1412e8722f4a45a9363b956b8aa78133d77d0bd8dc56a9a40e827e88f8f05f8b80d75436786eb50e0772714dcc20c7fa0db00ff61bd86d2162eda3
7
- data.tar.gz: bb9cd301b7568d3b9ff54f04555f1f1006c8a29a847c0c2f79986e45ac1368aa4d74daae347df7c3ba73f51fed00ac27e83f6d889faf29c2fbb8fe5125878b0a
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
- #Get the authenticating application
126
- result = api_instance.get_self_application
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->get_self_application: #{e}"
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
@@ -674,6 +659,7 @@ Class | Method | HTTP request | Description
674
659
  - [Zyphr::ReorderWorkflowStepsRequest](docs/ReorderWorkflowStepsRequest.md)
675
660
  - [Zyphr::ReplayWebhookEventsRequest](docs/ReplayWebhookEventsRequest.md)
676
661
  - [Zyphr::RequestMeta](docs/RequestMeta.md)
662
+ - [Zyphr::ResendEmailVerificationRequest](docs/ResendEmailVerificationRequest.md)
677
663
  - [Zyphr::ResetPasswordRequest](docs/ResetPasswordRequest.md)
678
664
  - [Zyphr::ResetPasswordResponse](docs/ResetPasswordResponse.md)
679
665
  - [Zyphr::ResubscribeRequest](docs/ResubscribeRequest.md)
@@ -878,9 +864,6 @@ Class | Method | HTTP request | Description
878
864
  - [Zyphr::WebhookJobResponse](docs/WebhookJobResponse.md)
879
865
  - [Zyphr::WebhookListResponse](docs/WebhookListResponse.md)
880
866
  - [Zyphr::WebhookMetricsResponse](docs/WebhookMetricsResponse.md)
881
- - [Zyphr::WebhookRegion](docs/WebhookRegion.md)
882
- - [Zyphr::WebhookRegionsResponse](docs/WebhookRegionsResponse.md)
883
- - [Zyphr::WebhookRegionsResponseData](docs/WebhookRegionsResponseData.md)
884
867
  - [Zyphr::WebhookReplayResponse](docs/WebhookReplayResponse.md)
885
868
  - [Zyphr::WebhookResponse](docs/WebhookResponse.md)
886
869
  - [Zyphr::WebhookSecretRotateResponse](docs/WebhookSecretRotateResponse.md)
@@ -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
@@ -15,7 +15,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
15
15
 
16
16
  Confirm email verification
17
17
 
18
- Verify the user's email using the token from the verification email.
18
+ Verify the user's email using a token you collected yourself. IMPORTANT: the emailed verification LINK verifies the address server-side **on click** and then redirects to `redirect_url`. So if you take the token off that redirect and post it here, it is already redeemed — and this endpoint treats that as an idempotent **success** (`200` with `already_verified: true`), not an error. Only a genuinely invalid / expired / unknown token returns `400`. `send` / `confirm` / `resend` are NOT a mandatory matched set — `confirm` is for flows where you collect the token directly rather than landing the hosted redirect. Recommended pattern for the redirect landing: call `confirm`, ignore its result, then read the user's verified state back and report that — correct whether or not the link already consumed the token.
19
19
 
20
20
  ### Examples
21
21
 
@@ -116,7 +116,7 @@ end
116
116
 
117
117
  api_instance = Zyphr::AuthEmailVerificationApi.new
118
118
  opts = {
119
- send_email_verification_request: Zyphr::SendEmailVerificationRequest.new # SendEmailVerificationRequest |
119
+ resend_email_verification_request: Zyphr::ResendEmailVerificationRequest.new # ResendEmailVerificationRequest |
120
120
  }
121
121
 
122
122
  begin
@@ -150,7 +150,7 @@ end
150
150
 
151
151
  | Name | Type | Description | Notes |
152
152
  | ---- | ---- | ----------- | ----- |
153
- | **send_email_verification_request** | [**SendEmailVerificationRequest**](SendEmailVerificationRequest.md) | | [optional] |
153
+ | **resend_email_verification_request** | [**ResendEmailVerificationRequest**](ResendEmailVerificationRequest.md) | | [optional] |
154
154
 
155
155
  ### Return type
156
156
 
@@ -172,7 +172,7 @@ end
172
172
 
173
173
  Send email verification
174
174
 
175
- Send an email verification link to the authenticated user.
175
+ Send an email verification link to the authenticated user. Requires all three credentials simultaneously: the application key (`X-Application-Key`), the application secret (`X-Application-Secret`), and the end user's `Authorization: Bearer` token. If the recipient is blocked by the application's `auth_email_mode=allowlist` gate, the request is still **accepted with 200** (mirroring `POST /auth/forgot-password`): no email is sent, and the suppression is recorded as a `messages` row (`status=suppressed`, `status_reason=recipient_not_allowlisted`) and an `email.suppressed` webhook. It is NOT a 500.
176
176
 
177
177
  ### Examples
178
178
 
@@ -6,6 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **success** | **Boolean** | | [optional] |
8
8
  | **email** | **String** | | [optional] |
9
+ | **already_verified** | **Boolean** | True when the address was already verified (the emailed link consumed the token on click). Still a 200 — an idempotent success, not an error (sc-7721). | [optional] |
9
10
 
10
11
  ## Example
11
12
 
@@ -14,7 +15,8 @@ require 'zyphr'
14
15
 
15
16
  instance = Zyphr::ConfirmEmailVerificationResponseData.new(
16
17
  success: null,
17
- email: null
18
+ email: null,
19
+ already_verified: null
18
20
  )
19
21
  ```
20
22
 
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
 
@@ -0,0 +1,18 @@
1
+ # Zyphr::ResendEmailVerificationRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **redirect_url** | **String** | URL to redirect to after verification | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zyphr'
13
+
14
+ instance = Zyphr::ResendEmailVerificationRequest.new(
15
+ redirect_url: null
16
+ )
17
+ ```
18
+
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
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **redirect_url** | **String** | URL to redirect to after verification | [optional] |
7
+ | **redirect_url** | **String** | URL to redirect to after verification (snake_case &#x60;redirect_url&#x60; — a camelCase &#x60;redirectUrl&#x60; is ignored and the hosted verification page is used instead). Must match one of the application&#39;s configured redirect URIs. | [optional] |
8
8
 
9
9
  ## Example
10
10
 
@@ -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 &#x60;export_metadata.excluded&#x60;: 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; &#x60;export_metadata.message_history_truncated&#x60; 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
@@ -20,7 +20,7 @@ module Zyphr
20
20
  @api_client = api_client
21
21
  end
22
22
  # Confirm email verification
23
- # Verify the user's email using the token from the verification email.
23
+ # Verify the user's email using a token you collected yourself. IMPORTANT: the emailed verification LINK verifies the address server-side **on click** and then redirects to `redirect_url`. So if you take the token off that redirect and post it here, it is already redeemed — and this endpoint treats that as an idempotent **success** (`200` with `already_verified: true`), not an error. Only a genuinely invalid / expired / unknown token returns `400`. `send` / `confirm` / `resend` are NOT a mandatory matched set — `confirm` is for flows where you collect the token directly rather than landing the hosted redirect. Recommended pattern for the redirect landing: call `confirm`, ignore its result, then read the user's verified state back and report that — correct whether or not the link already consumed the token.
24
24
  # @param confirm_email_verification_request [ConfirmEmailVerificationRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [ConfirmEmailVerificationResponse]
@@ -30,7 +30,7 @@ module Zyphr
30
30
  end
31
31
 
32
32
  # Confirm email verification
33
- # Verify the user&#39;s email using the token from the verification email.
33
+ # Verify the user&#39;s email using a token you collected yourself. IMPORTANT: the emailed verification LINK verifies the address server-side **on click** and then redirects to &#x60;redirect_url&#x60;. So if you take the token off that redirect and post it here, it is already redeemed — and this endpoint treats that as an idempotent **success** (&#x60;200&#x60; with &#x60;already_verified: true&#x60;), not an error. Only a genuinely invalid / expired / unknown token returns &#x60;400&#x60;. &#x60;send&#x60; / &#x60;confirm&#x60; / &#x60;resend&#x60; are NOT a mandatory matched set — &#x60;confirm&#x60; is for flows where you collect the token directly rather than landing the hosted redirect. Recommended pattern for the redirect landing: call &#x60;confirm&#x60;, ignore its result, then read the user&#39;s verified state back and report that — correct whether or not the link already consumed the token.
34
34
  # @param confirm_email_verification_request [ConfirmEmailVerificationRequest]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(ConfirmEmailVerificationResponse, Integer, Hash)>] ConfirmEmailVerificationResponse data, response status code and response headers
@@ -90,7 +90,7 @@ module Zyphr
90
90
  # Resend email verification
91
91
  # Resend the verification email to the authenticated user. Rate limited to once per 60 seconds.
92
92
  # @param [Hash] opts the optional parameters
93
- # @option opts [SendEmailVerificationRequest] :send_email_verification_request
93
+ # @option opts [ResendEmailVerificationRequest] :resend_email_verification_request
94
94
  # @return [SuccessResult]
95
95
  def resend_email_verification(opts = {})
96
96
  data, _status_code, _headers = resend_email_verification_with_http_info(opts)
@@ -100,7 +100,7 @@ module Zyphr
100
100
  # Resend email verification
101
101
  # Resend the verification email to the authenticated user. Rate limited to once per 60 seconds.
102
102
  # @param [Hash] opts the optional parameters
103
- # @option opts [SendEmailVerificationRequest] :send_email_verification_request
103
+ # @option opts [ResendEmailVerificationRequest] :resend_email_verification_request
104
104
  # @return [Array<(SuccessResult, Integer, Hash)>] SuccessResult data, response status code and response headers
105
105
  def resend_email_verification_with_http_info(opts = {})
106
106
  if @api_client.config.debugging
@@ -126,7 +126,7 @@ module Zyphr
126
126
  form_params = opts[:form_params] || {}
127
127
 
128
128
  # http body (model)
129
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'send_email_verification_request'])
129
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'resend_email_verification_request'])
130
130
 
131
131
  # return_type
132
132
  return_type = opts[:debug_return_type] || 'SuccessResult'
@@ -152,7 +152,7 @@ module Zyphr
152
152
  end
153
153
 
154
154
  # Send email verification
155
- # Send an email verification link to the authenticated user.
155
+ # Send an email verification link to the authenticated user. Requires all three credentials simultaneously: the application key (`X-Application-Key`), the application secret (`X-Application-Secret`), and the end user's `Authorization: Bearer` token. If the recipient is blocked by the application's `auth_email_mode=allowlist` gate, the request is still **accepted with 200** (mirroring `POST /auth/forgot-password`): no email is sent, and the suppression is recorded as a `messages` row (`status=suppressed`, `status_reason=recipient_not_allowlisted`) and an `email.suppressed` webhook. It is NOT a 500.
156
156
  # @param [Hash] opts the optional parameters
157
157
  # @option opts [SendEmailVerificationRequest] :send_email_verification_request
158
158
  # @return [SuccessResult]
@@ -162,7 +162,7 @@ module Zyphr
162
162
  end
163
163
 
164
164
  # Send email verification
165
- # Send an email verification link to the authenticated user.
165
+ # Send an email verification link to the authenticated user. Requires all three credentials simultaneously: the application key (&#x60;X-Application-Key&#x60;), the application secret (&#x60;X-Application-Secret&#x60;), and the end user&#39;s &#x60;Authorization: Bearer&#x60; token. If the recipient is blocked by the application&#39;s &#x60;auth_email_mode&#x3D;allowlist&#x60; gate, the request is still **accepted with 200** (mirroring &#x60;POST /auth/forgot-password&#x60;): no email is sent, and the suppression is recorded as a &#x60;messages&#x60; row (&#x60;status&#x3D;suppressed&#x60;, &#x60;status_reason&#x3D;recipient_not_allowlisted&#x60;) and an &#x60;email.suppressed&#x60; webhook. It is NOT a 500.
166
166
  # @param [Hash] opts the optional parameters
167
167
  # @option opts [SendEmailVerificationRequest] :send_email_verification_request
168
168
  # @return [Array<(SuccessResult, Integer, Hash)>] SuccessResult data, response status code and response headers
@@ -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&#39;ll receive a message ID to track its status. You can provide content directly via &#x60;html&#x60;/&#x60;text&#x60; fields, or use a template by specifying &#x60;template_id&#x60; and &#x60;template_data&#x60;.
375
+ # Queue an email for delivery. The email is processed asynchronously and you&#39;ll receive a message ID to track its status. You can provide content directly via &#x60;html&#x60;/&#x60;text&#x60; fields, or use a template by specifying &#x60;template_id&#x60; and &#x60;template_data&#x60;. **CAN-SPAM compliance — actions required from you:** - **Set &#x60;classification&#x60;** to &#x60;transactional&#x60; or &#x60;marketing&#x60;. 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