This section now uses an OpenAPI spec to power endpoint pages and the
playground. Prefer the endpoint pages in the sidebar for the latest
parameters, responses, and live requests. Spec:
/openapi/world-miniapps.json.Endpoints
- POST /api/v2/create-action/
- POST /api/v2/minikit/send-notification
- POST /api/v2/verify/
- GET /api/v2/minikit/transaction/
- GET /api/v2/minikit/transaction/debug
- GET /api/v2/minikit/user-grant-cycle
- GET /public/v1/miniapps/prices
Send Notification
This endpoint lets you send localized notifications to users of your mini app and requires anapi_key.
How do localizations work?
The user’s language is available to you when they access your mini app (via Navigator). All you need to do is provide localizations. Our backend will automatically infer which language is preferred by the user. Currently we support only a subset of languages, with plans to expand. Find the entire list here. You can only specify languages that we support.- If a user prefers a language that we don’t currently support, we will deliver the notification in English.
- If you don’t specify a localization for the user’s preferred language, the notification will not be delivered.
The response will include a specific
reasonto inform you of this.
Body Params
You are required to either specify bothtitle and message OR localisations.
The
wallet_addresses is an array of wallet addresses to send the
notification to. Users must have opted in to notifications for your app. Max
1000 users per call.localisations is an array of objects with properties:language(string, required): The language of the notification.title(string, required): The localized title of the notification.message(string, required): The localized message of the notification.
en language.Note: This will not localize your notifications. The
title is the title of
the notification. It should be 30 characters or less. May contain emojis.Note: This will not localize your notifications. The
message is the message
of the notification. It should be 200 characters or less. You can include the
special variable ${username} in your message, which will be replaced with
the actual username of the recipient when the notification is delivered.The
mini_app_path is the url encoded path of the mini app where your
notification should link to when the user clicks on it. Should be of the
format worldapp://mini-app?app_id=[app_id]&path=[path] (path is optional).The
app_id is the identifier of the app initiating the transaction.Request Headers
The
Authorization header should be the api_key for your app from the
Developer Portal. Make sure to prefix it with Bearer {api_key}.Response
Indicates if the API request was successful.
The HTTP status code of the response.
An array of notification delivery results for each wallet address, where each
item contains: -
walletAddress (string): The wallet address that the
notification was attempted to be sent to - sent (boolean): Whether the
notification was successfully sent to this wallet address - reason (string,
optional): If the notification failed to send, this field contains the reasonSupported Languages
| Language | Code |
|---|---|
| English | en |
| Catalan | ca |
| Chinese Simplified | zh_CN |
| French | fr |
| German | de |
| Hindi | hi |
| Indonesian | id |
| Japanese | ja |
| Korean | ko |
| Malay | ms |
| Polish | pl |
| Portuguese | pt |
| Spanish | es |
| Spanish (Latin America) | es_419 |
| Thai | th |
| Traditional Chinese (Taiwan) | zh_TW |
Get Transaction
api_key.
Query Params
The
app_id corresponding to the transaction that is being queried.The
type is either payment or transaction depending on the command you
used.Response
The
reference is your specified unique identifier for the transaction.The
transaction_hash is the hash of the transaction on the blockchain.The current
transaction_status, can be either ‘pending’, ‘mined’, or
‘failed’.The
from is the address of the sender.The
chain is the name of the blockchain network.The
timestamp is the time when the transaction was created, in ISO 8601
format.The
token_amount is the amount of tokens transferred, in BigInt with 6
decimals.The
token is the type of token transferred.The
to is the address of the receiver.The
app_id is the identifier of the app initiating the transaction.Get Transaction Debug URL
This endpoint lets you debug transactions that failed during the prepare stage. It provides Tenderly URLs for permit2 operations with expired permits. You will only be able to query for transactions of apps where you possess theapi_key.
The debug URL is only available once the permit2 expires. So for development it will be better to set a shorter expiry time so you can get the debug URL quicker.
Query Params
The
app_id corresponding to the transaction that is being queried.Request Headers
The
Authorization header should be the api_key for your app from the
Developer Portal. Make sure to prefix it with Bearer {api_key}.Response
An array of transaction debug information, where each item contains: -
debugUrl (string): The Tenderly URL for debugging the transaction -
createdAt (string): The timestamp when the transaction was created, in ISO
8601 format - block (number): The block number where the transaction was
attempted - simulationRequestId (string): The ID of the simulation request -
simulationError (string): The error message from the simulation, if any -
walletAddress (string): The wallet address associated with the transactionGet Prices
Query Params
The
fiatCurrencies is a comma-separated list of fiat currencies following
ISO4217 currency code. eg. USD,EUR,JPY,ARSThe
cryptoCurrencies is a comma-separated list of currencies we support. eg.
USDC,WLDResponse (abridged)
Detailed are a just a few values in the return that could be confusing. See the response object in the bottom right column for the full list of fieldsThe
prices is an object where each key is the respective currency codeThe
amount represents the non converted value for the price of 1 WLD for a
given currencyThe current
decimals, should be used to calculate the converted price. ie an
amount of 1000000 with 6 decimals would mean a price of $1.00 via, 1000000 *
10^-6