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.
- checksums.yaml +4 -4
- data/README.md +8 -25
- data/docs/AuthApplicationApi.md +66 -0
- data/docs/AuthEmailVerificationApi.md +4 -4
- data/docs/ConfirmEmailVerificationResponseData.md +3 -1
- data/docs/EmailsApi.md +1 -1
- data/docs/ResendEmailVerificationRequest.md +18 -0
- data/docs/SMSApi.md +69 -1
- data/docs/SendEmailVerificationRequest.md +1 -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/auth_email_verification_api.rb +7 -7
- 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/confirm_email_verification_response_data.rb +14 -4
- data/lib/zyphr/models/{webhook_regions_response.rb → resend_email_verification_request.rb} +11 -19
- data/lib/zyphr/models/send_email_verification_request.rb +1 -1
- data/lib/zyphr/models/webhook_delivery.rb +1 -11
- data/lib/zyphr/models/webhook_delivery_detail.rb +1 -11
- data/lib/zyphr.rb +1 -3
- data/spec/api/auth_application_api_spec.rb +13 -0
- data/spec/api/auth_email_verification_api_spec.rb +3 -3
- 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/confirm_email_verification_response_data_spec.rb +6 -0
- data/spec/models/{webhook_regions_response_spec.rb → resend_email_verification_request_spec.rb} +7 -13
- 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 +494 -502
- 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_data.rb +0 -232
- data/spec/models/webhook_region_spec.rb +0 -48
- 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:
|
|
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
|
|
@@ -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)
|
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
|
|
@@ -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
|
|
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
|
-
|
|
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
|
-
| **
|
|
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 `redirect_url` — a camelCase `redirectUrl` is ignored and the hosted verification page is used instead). Must match one of the application's configured redirect URIs. | [optional] |
|
|
8
8
|
|
|
9
9
|
## Example
|
|
10
10
|
|
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
|
|
@@ -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
|
|
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's email using
|
|
33
|
+
# 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.
|
|
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 [
|
|
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 [
|
|
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[:'
|
|
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 (`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.
|
|
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
|
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
|