get
https://api.themiracle.io/api/v1/benefits
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Benefits Endpoint Examples
The Benefits endpoint allows you to retrieve a list of benefits supported by the Miracle API Protocol. These benefits can include airdrops, event tickets, exclusive content, and more, associated with specific users across different chains.
Important Notes
validFromandvalidTo:validFrom: The date when the benefit becomes active and trackable on the Miracle.validTo: The date when the benefit expires and is no longer available.
- Action Date:
- Represents the deadline for the user to take a specific action, such as claiming or minting a benefit.
- May differ from
validToin cases like events where tickets need to be claimed by a certain date (actionDate), but the event occurs later (validTo).
Thumbnail Guidelines
For optimal visual presentation across various devices and interfaces, we advise using a 16:9 thumbnail ratio for all benefit visuals. This recommended ratio ensures:
- Optimal Fit: Thumbnails render properly on different screen sizes including desktop, tablet, and mobile devices.
- Consistent Appearance: Maintaining a standard 16:9 aspect ratio across your application helps preserve a unified and professional look.
- Enhanced User Experience: A predictable and balanced thumbnail size boosts visual clarity and focus, especially when displaying multiple benefits.
Examples
New Benefits Feed
Display the most recently added benefits:
Request:
curl GET "https://api.themiracle.io/api/v1/benefits?sortBy=validFrom&sortDirection=DESC&limit=20"
New Benefits Feed
Display the most recently added benefits:
Request
curl GET "https://api.themiracle.io/api/v1/benefits?sortBy=validFrom&sortDirection=DESC&limit=20"
Explanation
- sortBy=validFrom: Sorts benefits by the date they became active.
- sortDirection=DESC: Displays the newest benefits first.
- limit=20: Returns up to 20 benefits.
Last Chance
Show benefits that are expiring soon:
Request
curl GET "https://api.themiracle.io/api/v1/benefits?sortBy=validTo&sortDirection=ASC&limit=20"
Explanation
- sortBy=validTo: Sorts benefits by their expiration date.
- sortDirection=ASC: Displays benefits that will expire soonest.
- limit=20: Returns up to 20 benefits.
