# Email a subscription payment summary `POST /api/v1/subscriptions/{id}/send` Emails a rendered payment summary to one or more recipients. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Subscriptions → Write and Messages → Write**. ## Headers - `X-Sport-Id` (integer, required) — The sport ID from [List sports](/api/sports/list.md). Use the sport the record belongs to. ## Path parameters - `id` (integer, required) — ID of the subscription. ## Body parameters - `template_id` (integer, required) — ID of an email template. - `subject` (string, required) — Subject, up to 255 characters. - `body_html` (string, required) — HTML email content. Alias body. - `emails` (array of strings, required) — Between 1 and 20 unique valid email addresses. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request POST \ --url "https://api.asdincloud.com/api/v1/subscriptions/${ID:?Set ID}/send" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"template_id":27,"subject":"Your payment summary","body_html":"
Here is your current balance.
{subscription_payments_table}","emails":["alex@example.com"]}' ``` ## Response **200 OK** Returns delivery counts and a per-address failure list. An HTTP 200 response can report outcome partial. Example with fictional data and selected fields. ```json { "status": "success", "message": "Situazione pagamenti inviata", "data": { "dispatch_uid": "dispatch_example", "outcome": "sent", "requested_count": 1, "sent_count": 1, "failed_count": 0, "failed": [] } } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `400` — The payload or template is invalid. - `404` — The requested record was not found. - `422` — The summary could not be prepared. - `500` — The request failed during delivery. - `502` — All deliveries failed.