Set up email forwarding, where emails sent to an address on your domain are automatically forwarded to another specified address. The endpoint returns a unique rule ID that you can then use to delete or manage the forwarding later via DELETE /api/email-forwarding.
ruleId → data.rule.id Accept Example Content-Type Example domain string required
· Example: example.com data object required data.destinationVerified boolean required
· Example: false data.message string required
· Example: Email forwarding rule created. Verification email sent to destination address. Human-readable message.
data.rule object required data.rule.enabled boolean required
· Example: true data.rule.id string required
· Example: a11bd9c750744434b30d1c7ed940fa72 data.rule.priority integer required
· Example: 0 data.rule.tag string required
· Example: a11bd9c750744434b30d1c7ed940fa72 data.verificationSent boolean required
· Example: true requestId string required
· Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba Unique request identifier (UUID).
success boolean required
· Example: true True for successful responses.
timestamp string required
· Example: 2026-02-10T00:00:00.000Z ISO 8601 timestamp (UTC).
code string required
· Example: BAD_REQUEST Machine-readable error code.
error string required
· Example: Bad Request HTTP status title (e.g. 'Bad Request').
Human-readable message.
requestId string required
· Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba Unique request identifier (UUID).
timestamp string required
· Example: 2026-02-10T00:00:00.000Z ISO 8601 timestamp (UTC).
code string required
· Example: ERROR Machine-readable error code.
error string required
· Example: Conflict HTTP status title (e.g. 'Bad Request').
message string required
· Example: Cloudflare API error (409): Duplicated Zone rule Human-readable message.
requestId string required
· Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba Unique request identifier (UUID).
timestamp string required
· Example: 2026-02-10T00:00:00.000Z ISO 8601 timestamp (UTC).
https://cloud.hostup.se/api/email-forwarding curl -X POST "https://cloud.hostup.se/api/email-forwarding" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.com",
"email": "[email protected]",
"destination": "[email protected]"
}' {
"success": true,
"timestamp": "2026-02-10T00:00:00.000Z",
"requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
"data": {
"rule": {
"id": "a11bd9c750744434b30d1c7ed940fa72",
"email": "[email protected]",
"destination": "[email protected]",
"enabled": true,
"tag": "a11bd9c750744434b30d1c7ed940fa72",
"name": "Forward [email protected]",
"priority": 0
},
"verificationSent": true,
"destinationVerified": false,
"message": "Email forwarding rule created. Verification email sent to destination address."
}
} {
"domain": "example.com",
"email": "[email protected]",
"destination": "[email protected]"
}