Emblem Vault
  • 👋Introduction
  • Information
    • 💡Explainer
    • 📜History
    • 📈COVAL
    • 🦄Collections
    • 📲Apply
  • How it Works
    • ⏩Vault Creation
    • 🔄Vault Minting
    • ⏪Unvaulting
  • Features & Products
    • 📈Emblem Markets
    • 🔒Emblem Vision
    • 🛒Bulk Features
    • ⬆️Jump
    • 🐃Migration
    • 🥷Stealth Vaults
    • ⏰Time-locked Vaults
    • 🚀Vaultpad
  • Tools
    • 💿Emblem SDK
    • 📓API Documentation (Legacy)
      • 🤝Get Vaults by owner
      • 📬By Deposit Address
      • 📃Get Metadata
      • 💵Get Vault Balance
      • 📜Get Projects
      • 📜Get Chains
      • ✅Get Verified Vaults
      • ✅Get Vaults by type
      • 🛠️Create un-minted vault
      • 📜Get ERC1155 Data
      • Demonstrations
        • Demo: Token gate
        • Demo: ERC1155 holdings
        • Demo: Fraud Vaults
        • Deep Link Vaulting
    • 🖋️Inscription Tool
      • demo
    • 🗳️Wallet Partnerships
  • Use Cases
    • 🎨DeFi
    • 👾Gaming
    • 🖥️NFTs
  • Blockchains
    • 🟡Binance Smart Chain
    • 🔵Ethereum
    • 🟣Polygon
  • Supported Networks
    • 🎒Bellscoin
    • 🎒Bitcoin
    • 🎒Bitcoin Cash/SLP
    • 🎒Bitcoin Ordinals
    • 🎒Bitcoin Stamps
    • 🎒BRC20
    • 🎒Counterparty
    • 🎒Digibyte
    • 🎒Dogecoin
    • 🎒Dogeparty
    • 🎒Ethereum
    • 🎒Ethscriptions
    • 🎒Litecoin
    • 🎒Litecoin Ordinals
    • 🎒Namecoin
    • 🎒Monacoin
    • 🎒Monaparty
    • 🎒Solana
    • 🎒Stacks
    • 🎒Tezos
  • Tutorials
    • 🧠Bitcoin Ordinals
    • 🧠Bitcoin Stamps
    • 🧠Bellscoin
    • 🧠BRC20
    • 🧠Counterparty
    • 🧠Curated Collections
    • 🧠Cursed Ordinals
    • 🧠Dogeparty
    • 🧠Emblem Markets
    • 🧠Emblem Vision
    • 🧠Ethscriptions
    • 🧠Emblem Legacy [Migration]
    • 🧠Litecoin Ordinals
    • 🧠Monaparty
    • 🧠Namecoin
    • 🧠Polygon
    • 🧠Stacks
  • FAQs
    • 🎨Artists, Creators, and Collectors
    • ❓Common Questions
    • 🔷Namecoin Help
    • 😡Troubleshooting
    • 🔐Vaulting & Unvaulting
    • 🔦Verifying Assets (Emblem Open )
  • Deep Dive
    • Smart Contracts: Github
    • How its done
  • Terms of Service
Powered by GitBook
On this page
  1. Tools
  2. API Documentation (Legacy)

Create un-minted vault

Note, this will create a legacy vault, this is an UN MINTED vault and users will need to visit https://emblem.finance/nft/{tokenId} in order to mint

Base URL

All API requests should be made to the following base URL:

https://metadata.emblemvault.io

API Endpoints

Create Vault

Creates a new vault record for the address provided

Endpoint:

POST /createVault

Headers:

  • x-api-key (required): Your API key. It should be sent in the request header.

Request Body:

The request body should be a JSON object with the following properties:

  • chainId (number): The chain ID for the network (e.g., 137 for Matic, 1 for ETH Mainnet).

  • private (boolean): Whether the vault should be private or not.

  • password (string): The password for the vault.

  • values (array): An array of values for the vault.

  • toAddress (string): The recipient address for the vault.

  • description (string): A description for the vault.

  • name (string): A name for the vault.

  • image (string): An image URL for the vault.

  • ownedImage (string, optional): An owned image URL for the vault.

Responses:

  • 200 OK - The request was successful, and the metadata is returned.

  • 401 Unauthorized - The request was made with an incorrect or missing API key.

    Example response when no API key is provided:

    {
        "error": "No API key detected"
    }

    Example response when the API key is incorrect:

    {
        "error": "Unauthorized"
    }

  • 400 Bad Request - The request was unsuccessful due to incorrect input or an error in processing. Check the response body for more information.

    Example response for a missing image:

    {
        "success": false,
        "error": "Missing image"
    }

Examples

Here's an example using the request library in Node.js to make a request to the API with the provided tokenId:

var request = require('request');
 var options = {
   'method': 'POST',
   'url': 'https://metadata.emblemvault.io/createVault',
   'headers': {
     'content-type': 'application/json',
     'accept': '*/*',
      'x-api-key': '123'
   },
   body: JSON.stringify({
     "fromAddress": "0x2272ECf43A7481088FA2d4Ba9109804ED5A31901",
     "toAddress": "0x2272ECf43A7481088FA2d4Ba9109804ED5A31901",
     "description": "testing",
     "experimental": true,
     "name": "test vault",
     "ownedImage": "",
     "image": "http://foo.bar/image.png",
     "chainId": 1,
     "private": false,
     "password": "",
     "values": []
   })

 };
 request(options, function (error, response) {
   if (error) throw new Error(error);
   console.log(response.body);
 });

CURL

curl --location 'https://metadata.emblemvault.io/createVault' \
--header 'content-type: application/json' \
--header 'accept: */*' \
--header 'x-api-key: 123' \
--data '{
   "fromAddress": "0x2272ECf43A7481088FA2d4Ba9109804ED5A31901",
   "toAddress": "0x2272ECf43A7481088FA2d4Ba9109804ED5A31901",
   "description": "testing",
   "experimental": true,
   "name": "test vault",
   "ownedImage": "",
   "image": "http://foo.bar/image.png",
   "chainId": 1,
   "private": false,
   "password": "",
   "values": [
   ]
}'
PreviousGet Vaults by typeNextGet ERC1155 Data

Last updated 1 year ago

📓
🛠️