# Send a test progress alert for a department goal | Copenhagen Truck Wash API

### Copenhagen Truck Wash API Help

# Send a test progress alert for a department goal

This endpoint documentation is generated directly from `openapi.yaml`.

## Endpoint

POST /goals/department/progress-alert/test

## Operation

Operation ID: `sendDepartmentGoalProgressAlertTest`

Sends a progress alert for a department goal to the destination defined in the goal&#x27;s criteria. Permission required: `goals_department_progress_alert_test`. Access control: - The caller must be a superuser or belong to all departments targeted by the goal. Behavior: - Looks up the goal by `id`. - Rebuilds the criteria from stored JSON and attaches the goal&#x27;s departments. - Renders the alert using the server-side renderer (respecting progress type/style/format and destination limits). - Sends the alert to Slack, Email, or SMS depending on `progress_alert_destination`, unless overridden.

## Authentication

Security requirements:

Scheme | Scopes
--- | ---
BearerAuth | -

## Request Body

Required: yes.

Content type: `application/json`

{ "properties": { "department_id": { "description": "Department id to use that department's Slack webhook when destination is SLACK", "example": 3, "type": "integer" }, "email_to": { "description": "Email recipient when destination is EMAIL", "example": "tester@example.com", "format": "email", "type": "string" }, "id": { "description": "The department goal id", "example": 42, "type": "integer" }, "overrideDestination": { "description": "Override the destination for this test", "enum": [ "SLACK", "EMAIL", "SMS", "NONE" ], "example": "SLACK", "type": "string" }, "slack_webhook": { "description": "Slack webhook URL when destination is SLACK", "example": "https://hooks.slack.com/services/T000/B000/XXX", "type": "string" }, "sms_to": { "description": "One or more MSISDN recipients when destination is SMS", "oneOf": [ { "description": "Comma or semicolon separated list", "example": "+4512345678, +4598765432", "type": "string" }, { "example": [ "+4512345678", "+4598765432" ], "items": { "type": "string" }, "type": "array" } ] }, "subject": { "description": "Optional email subject when destination is EMAIL", "example": "Dept Goal Progress Test", "type": "string" } }, "required": [ "id" ], "type": "object" }

## Responses

Status | Description | Content Types
--- | --- | ---
200 | Alert sent successfully | application/json
400 |  |
401 |  |
403 |  |
404 |  |
500 |  |

Schema for response `200` (`application/json`):

{ "properties": { "destination": { "description": "Final destination used", "enum": [ "SLACK", "EMAIL", "SMS", "NONE" ], "type": "string" }, "id": { "description": "Goal id", "type": "integer" }, "message_preview": { "description": "Rendered message preview", "type": "string" }, "provider_response": { "description": "Provider-specific response or status message" }, "target": { "description": "The target used for delivery (email address, phone numbers, department id, or webhook)" } }, "type": "object" }
17 March 2026