# Send a test push to the signed in person's devices (console server)

> send test notification: reference page for this CustomDomain™ API operation in the members group. Covers parameters, request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/members/sendTestNotification

## `POST https://api.customdomain.ai/v1/notifications:test`

Pushes one test notification to every browser in which `user_id` turned push notifications on. The console's server calls this behind its "Send a test notification" button, guarded by the provision secret exactly like `POST /members:email-changed`: the console has already checked the session and passes the signed in person's id, and the route takes no account, so a secret for one workspace cannot name another. The control plane holds the VAPID keys; without them it answers 503 `push_not_configured`. More than five tests a minute for one person answer 429 `rate_limited` with `Retry-After: 60`.

### Authentication

`provisionSecret`

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `user_id` | string | yes | The signed in person's id in the console. |

### Responses

| Status | Description |
| --- | --- |
| `200` | What the test did |
| `400` | Error envelope: {code, title, details, request_id}. |
| `401` | Error envelope: {code, title, details, request_id}. |
| `429` | Error envelope: {code, title, details, request_id}. |
| `503` | Error envelope: {code, title, details, request_id}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `devices` | integer | yes | Browsers the person has turned push on in. |
| `sent` | integer | yes | Push services that accepted the message. |
| `removed` | integer | yes | Devices found gone and removed. |
| `failed` | integer | yes | Pushes that did not go through. |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
