API Reference
Log in to see full request history
timestatususer agent
Retrieving recent requests…
LoadingLoading…

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 NFT collections across different chains. This endpoint includes all benefits gathered from sources coming from Official, Third Party, and Community Sources.

Important Notes

  • validFrom and validTo:
    • 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 validTo in cases like events where tickets need to be claimed by a certain date (actionDate), but the event occurs later (validTo).

Enhancing Your Product with Benefits

By leveraging the Benefits endpoint, you can enhance your web3 applications in various ways:

  • New Benefits Feed: Display the latest benefits added.
  • Last Chance: Highlight benefits that are expiring soon, creating urgency.
  • Collection Highlights: Showcase benefits associated with specific NFT collections.
  • Personalized Experiences: Present benefits available to individual users based on their wallet holdings.

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://www.themiracle.io/api/v1/benefits?sortBy=validFrom&sortDirection=DESC&limit=20"

New Benefits Feed

Display the most recently added benefits:

Request

curl GET "https://www.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://www.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.
Query Params
string

Filter by Token or NFT contract address

string

The comma delimited list of Fungible IDs and NFT Contracts to include chain.contract for EVM chains, chain.mint_addresses for Solana.

string

Order of the items are returned in the response. Options are: validFrom, validTo, name

string

Allowed values: ASC or DESC

int32
Defaults to 20

Amount of items returned in response. Default and max limit is 20

string

Search for benefits that match a string in their longtitle. Example: airdrop

string

The category identifier. Supported category filters can be found under the "Supported Category Filters" tab.

string

Filter by valid from date

string

Filter by valid to date

int32
Defaults to 0

Use continuation token to request next offset of items.

int32

0 excludes expired benefits, 1 includes expired benefits

Responses

Language
Credentials