{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"c90dbf02-0f90-49fa-b30a-db97631b6da2","name":"Mirror World Smart Platform API","description":"![Mirror World](https://raw.githubusercontent.com/mirrorworld-universe/docs.mirrorworld.fun/main/public/images/banner.png)\n\nWelcome to the Mirror World Smart Platform API Documentation!\n\nMirror World Smart Platform was built to simplify the process of building Web3 web and mobile applications at scale. Mirror World's offering makes it possible to *build powerful multi-chain Web3 experiences* for mobile and the web by providing top-class and easy-to-use APIs and cross-platform [SDKs](https://mirrorworld.fun/docs/integration) around 3 main features:\n\n1. [Smart Authentication] - User-friendly Authentication\n2. [Smart Marketplace] - Asset Management (NFTs and Marketplaces)\n3. [Smart Wallet] - Wallets Service\n\nThe API allows you to access these functionality via a set of standardized endpoints.\n\n# Getting Started\nTo use the Mirror World API, you'll need to create a project on the [Developer Dashboard] and copy it's API credentials.\n\nIf you haven't created a developer account yet, please go to the [Developer Dashboard] to create a developer account.\n\n# API Credentials & Authentication\nThe API Credentials used in this API consist of your **API Key** and/or your **Authorization** token. You'll use these credentials to authenticate all requests you send to this API.\n\n- **API Key** - This is used to authenticate all incoming requests to the API cluster. All requests require an `x-api-key` header to be provided in the request header.\n- **Authorization Token** - This is a `Bearer` type token provided inside the `Authorization` header in this pattern: `Authorization: Bearer <TOKEN>`  Developers can generate a _**Secret Access Key**_ that functions as an Authorization token on the [Developer Dashboard] under the [Account Settings] menu. Users on the other hand will acquire this when they login to your project normally.\n\n> Learn more about [Secret Access Key Management][Account Settings]\n\nEach API documented herein will highlight the required API credentials. If you send a request that doesn't contain the correct API credentials, the said request will not be honored.\n\n# API Responses\n\nAPI responses are in JSON format. All API responses share the same envelope structure featuring the following 4 top level JSON attributes: `status`, `data`, `message`, `code`.\n\n\n## API Response Schema\n\n**status** | `string`\n\nThis value will either be `success` or `fail`. You will use the value of this attribute to determine what attributes you parse next. If `success`, you will always have an accompanying data attribute. If the value is `fail`, you will always have an accompanying error code in the `code` property and the error title and message in the `error` and `message` fields respectively.\n\n**`data`** | `object | array | null`\nThis attribute represents the primary content of a successful API response. For a successful response, it will always be an Object or an Array depending on the expected cardinality of the requested data set. If you request a single item, for example, it will be an object. If you request multiple items, it will be an array. For a failed request, it will return `null`\n\n**`code`** | `string | number`\nA successful response will return a `code` of `0`. If the response fails, or returns an error, it will contain an error code that can be used to lookup the error definition in [Error Reference Documentation][API Error Reference]\n\n**`message`** | `string`\nFor a successful response, the `message` field will be used to return some arbitrary data about the successful response. In a failed/error response, the `message` field will contain an error message that will describe what went wrong with the request.\n\n**`error`** | `string`\nThis field is only provided for failed API requests. It contains a short uppercase error title describing the cause of the error. For example, for a request with no API Key, the `error: \"INVALID_API_KEY\"` is provided in the response. The `error` field will also be accomanied by a descriptive message in the `message` field. All API errors are documented in the [API Error Reference Document][API Error Reference]\n\n### Example (Successful Response)\n```json\n{\n  \"status\": \"success\",\n  \"code\": 0,\n  \"message\": \"successfully listed nft\",\n  \"data\": {\n    \"nft\": {\n      \"token_id\": \"0\",\n      \"contract_address\": \"0x0a37026DBFf6164319Dd54b25c357BAeC53040d2\",\n      \"url\": \"\",\n      \"metadata\": \"\",\n      \"contract_type\": \"erc1155\"\n    },\n    \"receipt_type\": \"buy\",\n    \"order_status\": \"filled\",\n    \"seller\": \"0x9646986b72099C9bEB620572FdbFda8286511172\",\n    \"buyer\": \"0x9646986b72099C9bEB620572FdbFda8286511172\",\n    \"price\": \"0.1\",\n    \"amount\": \"1\",\n    \"marketplace_address\": \"0xAeAd331622371228A0388E8D4909aC77681AF1b8\",\n    \"order_hash\": \"0x25dee35543fee304545e2b5ad42f6ab1d0c1cd3fc69f762fe99a6ca020d399d1\"\n  }\n}\n```\n\n### Example (Failed Response)\n```json\n{\n  \"data\": null,\n  \"code\": \"120104\",\n  \"error\": \"LISTING_DOES_NOT_EXIST\",\n  \"message\": \"Listing does not exist.\"\n}\n```\n\n# Making your first API Request\nTo make your first call,\n- Create a Project on the Developer Dashboard and Copy the API Key if you haven't already.\n- Send a `GET` request to [`/v2/auth/echo`]() API with:\n  - The `x-api-key` header set to your project API Key.\n\nYou can use Postman to make this request, or directly `curl` it in the terminal like this: \n\n```bash\ncurl --location -g 'https://api.mirrorworld.fun/v2/auth/echo' \\\n--header 'x-api-key; <YOUR_API_KEY>' \\\n```\n\nA successful response will look like this:\n```json\n{\n  \"code\": 0,\n  \"data\": {\n      \"status\" : \"Mirrorworld Auth V2 Service is Up!\"\n  },\n  \"message\": \"\",\n  \"status\": \"success\"\n}\n```\n\n# API Service Infrastructure\nThe Mirror World API Cluster is grouped into four main services namely:\n1. **Authentication Service** - The Authentication service handles user authentication, social login, as well as developers' projects and user settings management. It also processes 2FA for approving actions for state mutation of on-chain accounts for users.\n2. **Asset Services** - Handles multi-chain collection and NFT asset minting as well as well tracking ownership of assets.  It handles NFT marketplace procedures and auction processes. For advanced use cases, it can produce raw headless marketplace and asset transactions that can be can used with external wallets.\n3. **Wallet (MPC) Service** - Handles multi-chain MPC wallet account generation for new users. It will also hanle wallet token balance querying (supports FIAT amounts) & token transfers/withdrawals\n4. **Metadata Service** - Handles multi-chain storefront APIs for building marketplaces. It also processes collection metadata and adds filters, sorting and listing queries on top of your collections to significantly improve the UX for building Marketplaces on Solana.\n\nHere's a simple diagram of Mirror World's API Infrastructure\n\n![API Infrustructure](https://raw.githubusercontent.com/mirrorworld-universe/docs.mirrorworld.fun/main/public/images/infrastrucure-advanced.png)\n\n# Multichain Support Matrix\nSome Mirror World's API Services interact with the blockchain. For requests that interact with the blockchain, the URL Schema for such requests will require a `/:chain/:network` path parameters in the URL.\n\n✅ - Supported (Live, can be used)\n🚧 - In development (Not yet publicly available)\n\n| Chain | Network (mainnet) | Network (testnet) | Example |\n| :--- | :--- | :--- | :--- |\n| **Solana** | `mainnet-beta` ( ✅ ) | `devnet` ( ✅ ) | `/v2/solana/mainnet-beta/xxx/yyy` |\n| **Polygon** | `mumbai-mainnet` ( ✅ ) | `mumbai-testnet` ( ✅ ) | `/v2/polygon/mumbai-mainnet/xxx/yyy` |\n| **BNB Chain**  | `bnb-mainnet` ( ✅ ) | `bnb-testnet` ( ✅ ) | `/v2/bnb/bnb-testnet/xxx/yyy` |\n| **Ethereum** | `mainnet` ( 🚧 ) | `goerli` ( ✅ ) | `/v2/ethereum/goerli/xxx/yyy` |\n| **Sui** | `mainnet` ( 🚧 ) | `testnet` ( 🚧 ) | `/v2/sui/mainnet/xxx/yyy` |\n\n**See the full [Multichain Support Matri here.][Multichain Support]**\n\n# Community and Support\nIf you're building with the Mirror World SDK, join the Mirror World [Developer Discord Community][Developer Discord] and engage other builders. You can also contact us through these [Support channels].\n\nYou may also follow our [GitHub Organization](https://github.com/mirrorworld-universe) for open-source updates!\n\n\n\n[Smart Authentication]: https://mirrorworld.fun/docs/solutions/smart-auth\n[Smart Marketplace]: https://mirrorworld.fun/docs/solutions/smart-marketplace\n[Smart Wallet]: https://mirrorworld.fun/docs/solutions/smart-wallet\n[Developer Dashboard]: https://app.mirrorworld.fun\n[Account Settings]: https://mirrorworld.fun/docs/overview/development-guide/developer-dashboard#secret-access-key-management\n[API Error Reference]: https://mirrorworld.fun/docs/further-reading/api-error-reference\n[Multichain Support]: https://mirrorworld.fun/docs/overview/introduction/multi-chain-solutions\n[Developer Discord]: https://mirrorworld.fun/discord\n[Support channels]: https://mirrorworld.fun/docs/resources/support\n","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"22264663","team":3792657,"collectionId":"c90dbf02-0f90-49fa-b30a-db97631b6da2","publishedId":"2s93JtS4aQ","public":true,"publicUrl":"https://developer.mirrorworld.fun","privateUrl":"https://go.postman.co/documentation/22264663-c90dbf02-0f90-49fa-b30a-db97631b6da2","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2023-03-13T08:03:54.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/e78bfc5aa47b20e0f33d73abd81a20de7c2d00b9750cc39e38fc92744bf7788f","favicon":"https://res.cloudinary.com/postman/image/upload/v1658492893/team/ttjfl56kjozncq1vtdp4.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://developer.mirrorworld.fun/view/metadata/2s93JtS4aQ"}