Client API: Mail: Smtp relay
The 8 Client API operations for smtp relay.
Part of Mail.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/client/smtp-relay/services |
List services |
| GET | /api/v1/client/smtp-relay/{service_id} |
Get summary |
| PATCH | /api/v1/client/smtp-relay/{service_id}/category |
Set category |
| GET | /api/v1/client/smtp-relay/{service_id}/events |
List events |
| POST | /api/v1/client/smtp-relay/{service_id}/limits/increase-request |
Request limit increase |
| POST | /api/v1/client/smtp-relay/{service_id}/messages |
Send message |
| GET | /api/v1/client/smtp-relay/{service_id}/reputation |
Reputation report |
| GET | /api/v1/client/smtp-relay/{service_id}/usage |
Usage report |
List services
Section titled List servicesGET /api/v1/client/smtp-relay/services
Authentication: an access token, sent as Authorization: Bearer <token>.
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
Get summary
Section titled Get summaryGET /api/v1/client/smtp-relay/{service_id}
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
service_id |
path | integer | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Set category
Section titled Set categoryPATCH /api/v1/client/smtp-relay/{service_id}/category
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
service_id |
path | integer | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
default_category |
string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
List events
Section titled List eventsGET /api/v1/client/smtp-relay/{service_id}/events
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
service_id |
path | integer | yes | |
category |
query | string or null | no | |
recipient |
query | string or null | no | |
hours |
query | integer | no | Default: 24. |
limit |
query | integer | no | Default: 100. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Request limit increase
Section titled Request limit increasePOST /api/v1/client/smtp-relay/{service_id}/limits/increase-request
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
service_id |
path | integer | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
requested_per_hour |
integer | yes | |
reason |
string | no | What the relay sends and why the volume is going up |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Send message
Section titled Send messagePOST /api/v1/client/smtp-relay/{service_id}/messages
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
service_id |
path | integer | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
from |
string | yes |
from_name |
string or null | no |
to |
array of string | yes |
cc |
array of string | no |
subject |
string | no |
text |
string or null | no |
html |
string or null | no |
reply_to |
string or null | no |
headers |
Headers | no |
category |
string or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
202 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Reputation report
Section titled Reputation reportGET /api/v1/client/smtp-relay/{service_id}/reputation
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
service_id |
path | integer | yes | |
limit |
query | integer | no | Default: 50. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Usage report
Section titled Usage reportGET /api/v1/client/smtp-relay/{service_id}/usage
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
service_id |
path | integer | yes | |
days |
query | integer | no | Default: 30. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |