# Customer messages > The emails, Telegram and WhatsApp messages Abuna sent your customers. Source: https://abuna.app/docs/api/notices List the messages Abuna sends your customers, such as receipts and reminders, and check whether each one went out. In the API, a customer message is a `notice`. Each notice is one message on one channel: email, Telegram or WhatsApp. ## The notice object **Attributes** - `id` (string): Unique identifier for the message. - `customer_id` (string): The customer the message is for. - `subscription_id` (string, nullable): The subscription the message is about. - `kind` (string): What the message is about:`subscription_started`: a new subscription, with a link to pay its first period. Sent 30 minutes after the subscription is created, and only if the customer hasn't paid by then.`subscription_renewed`: a renewal to pay, sent as its period starts.`renewal_upcoming`: a paid period ends soon. Sent when the renewal's invoice goes out before the end, with its pay link. With `renewal_lead_days` at 0 or a downgrade scheduled, sent 3 days before the end without a pay link.`payment_overdue`: a period is still unpaid.`payment_final_notice`: the last reminder before an unpaid subscription is canceled.`payment_received`: a receipt. When the payment puts an upgrade in force, it also gives the old and new plan. For an invoice [marked paid](https://abuna.app/docs/api/invoices-and-payments.md#mark-paid), it says the payment was recorded by you.`payment_failed`: a payment failed after the customer left the pay page. At most one an hour for each invoice.`subscription_cancel_scheduled`: a cancel at the end of the paid period was scheduled. It gives the end date and how to keep the subscription.`subscription_cancel_undone`: a scheduled cancel was undone, so the subscription continues.`subscription_canceled`: the subscription ended.`plan_change_offered`: you offered the customer a plan change. It links to the page where they accept it.`plan_switch_requested`: the customer checked out another price of the product they subscribe to. It links to the page where they confirm the switch. It goes by email only.`plan_upgraded`: an upgrade took effect without a payment first: nothing was due, or the new period is to pay through the pay link it gives. It gives the new plan and the new billing date.`plan_upgrade_due`: an upgrade waits for the customer to pay. It gives the amount, the date to pay by, and the pay link.`plan_downgrade_scheduled`: a downgrade was scheduled. It gives the new plan and the date it starts.`plan_downgrade_undone`: a scheduled downgrade was undone, so the plan renews as it is.`price_change_scheduled`: a price the customer pays is changing. It gives the new amount and the date it first applies to them.`price_change_canceled`: a scheduled price change was canceled or replaced, so the customer keeps paying what they pay now.`trial_email_code`: the customer chose to start a free trial at checkout. It goes by email only, with the 6-digit code that confirms their email and starts the trial.`email_code`: the customer asked to change their email in the customer portal. It goes to the new address only, with the 6-digit code that confirms it.`contact_changed`: the customer changed their email or phone number in the customer portal. It goes to the old email and the connected Telegram chat, with the new email partly hidden.`portal_links`: the customer asked for links to their subscriptions. - `channel` (string): `email`, `telegram`, or `whatsapp`. Every message goes by email. A customer who chose Telegram or WhatsApp also gets it there. WhatsApp is off by default; you turn it on, and Live apps need Plus or higher. - `recipient` (string): The email address or WhatsApp number it goes to. Empty for Telegram, to keep the customer's chat private. - `subject` (string): The subject line. - `status` (string): `pending` while it waits to be sent, `sending` while Abuna sends it, `sent`, or `failed`. `withdrawn` when it stopped being true before it went out, like a reminder for a period that was paid, or a Telegram or WhatsApp message to a customer who disconnected the chat. - `attempts` (integer): How many times Abuna has tried to send it. - `last_error` (string, nullable): Why the last attempt failed, or why the message was withdrawn. - `next_attempt_at` (timestamp): When Abuna next tries to send it, while it is `pending`. - `created_at` (timestamp): When the message was created, in Unix seconds. - `sent_at` (timestamp, nullable): When it was sent. **The notice object** ```json { "id": "e7JpT4cN", "customer_id": "Cu5tM8rA", "subscription_id": "x9QbL2sK", "kind": "payment_received", "channel": "email", "recipient": "jane@example.com", "subject": "Receipt from My store: FCFA 5,000 paid", "status": "sent", "attempts": 1, "last_error": null, "next_attempt_at": 1727600100, "created_at": 1727600100, "sent_at": 1727600102 } ``` ## List customer messages `GET /v1/apps/{appID}/notices` Lists the app's customer messages, newest first, one page at a time. **Query parameters** - `subscription_id` (string): Returns only messages about this subscription. - `status` (string): Returns only messages with this status: `pending`, `sending`, `sent`, `failed`, or `withdrawn`. - `limit` (integer): How many messages to return, from 1 to 100. Defaults to 50. - `cursor` (string): The `next_cursor` from the previous page. Send the same filters with it. > **Note:** A Test app sends only its email codes, so in Test this list holds only `trial_email_code` and `email_code` messages. Every message, sent or not, also shows up as a [`notification.captured`](https://abuna.app/docs/api/events.md#notification-captured) event. Returns `items` and `next_cursor`, as described in [Lists and filters](https://abuna.app/docs/lists-and-filters.md#pages). A value that isn't allowed, like a `limit` above 100, returns `422` with code `invalid` and the parameter's name in `errors`. **GET /v1/apps/{appID}/notices** cURL: ```bash curl "https://api.abuna.app/v1/apps/8ddhXCDW/notices?subscription_id=x9QbL2sK" \ -H "Authorization: Bearer sk_test_..." ``` Node.js: ```javascript const response = await fetch("https://api.abuna.app/v1/apps/8ddhXCDW/notices?subscription_id=x9QbL2sK", { headers: { Authorization: "Bearer sk_test_..." }, }); const page = await response.json(); ``` Python: ```python import requests response = requests.get( "https://api.abuna.app/v1/apps/8ddhXCDW/notices?subscription_id=x9QbL2sK", headers={"Authorization": "Bearer sk_test_..."}, ) page = response.json() ``` PHP: ```php ["Authorization: Bearer sk_test_..."], CURLOPT_RETURNTRANSFER => true, ]); $page = json_decode(curl_exec($ch), true); ``` Go: ```go req, _ := http.NewRequest("GET", "https://api.abuna.app/v1/apps/8ddhXCDW/notices?subscription_id=x9QbL2sK", nil) req.Header.Set("Authorization", "Bearer sk_test_...") res, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer res.Body.Close() var page map[string]any json.NewDecoder(res.Body).Decode(&page) ``` **Response** ```json { "items": [ { "id": "e7JpT4cN", "customer_id": "Cu5tM8rA", "subscription_id": "x9QbL2sK", "kind": "payment_received", "channel": "email", "recipient": "jane@example.com", "subject": "Receipt from My store: FCFA 5,000 paid", "status": "sent", "attempts": 1, "last_error": null, "next_attempt_at": 1727600100, "created_at": 1727600100, "sent_at": 1727600102 } ], "next_cursor": null } ```