curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.edi.stateset.com/v1/connections/mail' \
--header "Authorization: Bearer $EDI_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"api_key": "YOUR_API_KEY",
"environment": "string",
"sender": "string",
"service_url": "string"
}'
{
"data": {
"active": true,
"environment": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"mail_tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"mailbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"mode": "string",
"paused": true,
"pending_deliveries": 1,
"sender": "string",
"service_url": "string",
"tested_at": "2026-08-31T14:22:05Z"
},
"success": true
}
Save (/v1/connections/mail)
Verified sender and immutable connection saved; no email sent
POST
/
v1
/
connections
/
mail
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.edi.stateset.com/v1/connections/mail' \
--header "Authorization: Bearer $EDI_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"api_key": "YOUR_API_KEY",
"environment": "string",
"sender": "string",
"service_url": "string"
}'
{
"data": {
"active": true,
"environment": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"mail_tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"mailbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"mode": "string",
"paused": true,
"pending_deliveries": 1,
"sender": "string",
"service_url": "string",
"tested_at": "2026-08-31T14:22:05Z"
},
"success": true
}
Request body
MailConnectionInput
string
required
A Mail tenant key. Platform-wide keys are rejected.
string
required
string
required
An active mailbox owned by the credential’s Mail tenant.
string
required
HTTPS origin of a StateSet Mail-compatible service.
Response
MailConnectionResponse
MailConnectionView
required
boolean
required
Status codes
| Code | Meaning |
|---|---|
200 | Verified sender and immutable connection saved; no email sent |
403 | Organization administrator or explicit mail:configure scope required |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.edi.stateset.com/v1/connections/mail' \
--header "Authorization: Bearer $EDI_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
"api_key": "YOUR_API_KEY",
"environment": "string",
"sender": "string",
"service_url": "string"
}'
{
"data": {
"active": true,
"environment": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"mail_tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"mailbox_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"mode": "string",
"paused": true,
"pending_deliveries": 1,
"sender": "string",
"service_url": "string",
"tested_at": "2026-08-31T14:22:05Z"
},
"success": true
}
Last modified on October 20, 2026