Notifications are delivered through the Base App only. Users who interact with your app on other platforms will not receive notifications through this API.
Prerequisites
- A project on Base Dashboard with your app URL registered
- An API key generated from Settings > API Key in your Base Dashboard project
Quick start
Both endpoints require your API key in thex-api-key header.
The notification endpoints share a rate limit of 10 requests per minute per IP. Requests to either endpoint count toward the same limit. Exceeding it returns a
429 Too Many Requests response.Get users with notifications enabled
Response
target_path sets the route within your app that opens when the user taps the notification:
Send a notification
Response
API reference
GET /v1/notifications/app/users
Returns users who have pinned your app, with optional filtering by notification opt-in status. Results are paginated.Query parameters
Your app URL as registered on the Base Dashboard.
Set to
true to return only users who have enabled notifications for your app.Pagination cursor returned from a previous response. Omit for the first page.
Maximum users per page. Capped at 100.
Response
Whether the request succeeded.
Users who have pinned your app.
The user’s wallet address.
Whether the user has enabled notifications for your app.
Cursor for the next page. Absent when no more results exist.
POST /v1/notifications/send
Sends an in-app notification to one or more wallet addresses.Request body
Your app URL as registered on the Base Dashboard.
Wallet addresses to notify. Minimum 1, maximum 1,000 per request.
Notification title. Maximum 30 characters.
Notification body text. Maximum 200 characters.
Path to open when the user taps the notification, such as
/rewards. Must start with / if provided. Maximum 500 characters. Omit to open your app at its root URL.Response
true only when every address in the request delivered successfully.Per-address delivery status.
The targeted wallet address.
Whether delivery succeeded for this address.
Present when
sent is false. Possible values: user has not saved this app, user has notifications disabled.Total notifications delivered successfully.
Total notifications that failed to deliver.
Errors
Both endpoints return the following errors:| Status | Code | Cause |
|---|---|---|
| 400 | Bad Request | Possible causes:
|
| 401 | Unauthorized | Missing or invalid API key. |
| 403 | Forbidden | The app_url does not belong to your project, or your project is not whitelisted for notifications. |
| 404 | Not Found | The project associated with your API key does not exist. |
| 503 | Service Unavailable | The notification service is temporarily unavailable. Retry the request. Send endpoint only. |