openapi: 3.0.3 info: title: NFT Service APIs activity Minting API description: '' license: name: '' version: '2.0' servers: - url: https://api.bitski.com tags: - name: Minting paths: /contracts/{contract_id}/metadata: get: tags: - Minting summary: Get contract metadata description: Get contract metadata operationId: contract_metadata parameters: - name: contract_id in: path description: Your Bitski Contract ID required: true schema: type: string format: uuid responses: '200': description: The contract metadata content: application/json: schema: type: object required: - fee_recipient - seller_fee_basis_points properties: description: type: string description: The description of the contract example: Best birds in web3 nullable: true external_link: type: string description: A url for the entity that owns this contract example: www.bitski.com/@stapleverse nullable: true fee_recipient: type: string description: The recipient for royalties associated with sales example: '0x8b53d6e704485ef70bd02e2a91df126935a127c9' image: type: string description: The contract image example: https://cdn.bitskistatic.com/tokens-raw/54676382-bab5-408d-afe2-fc6f160da4a8/06fd0294-a425-44c7-96e8-9d24757163b4.png nullable: true name: type: string description: The name of the contract example: My Collection Of Birds nullable: true seller_fee_basis_points: type: integer format: int64 description: Basis points for sales 2.5% = 250 example: 250 /contracts/{contract_id}/token-metadata/{token_id}: get: tags: - Minting summary: Get token metadata description: Get token metadata operationId: token_metadata parameters: - name: contract_id in: path description: Your Bitski Contract ID required: true schema: type: string format: uuid - name: token_id in: path description: The id of the token you want metdata for required: true schema: type: string responses: '200': description: The token metadata content: application/json: schema: type: object properties: attributes: type: array items: {} description: Token attributes example: null background_color: type: string description: Token background color example: null nullable: true description: type: string description: Token description example: A very special NFT nullable: true image: type: string description: The token image example: https://cdn.bitskistatic.com/tokens-raw/54676382-bab5-408d-afe2-fc6f160da4a8/06fd0294-a425-44c7-96e8-9d24757163b4.png nullable: true name: type: string description: Token name example: 'NFT Token #1' nullable: true properties: type: object description: Token properties /v1/apps/{app_id}/contracts: get: tags: - Minting summary: List all your contracts description: List all your contracts operationId: list_contracts parameters: - name: includeTokenTemplates in: query description: Whether to include token templates in the response required: false schema: type: boolean - name: isDeployed in: query description: Filter by deployment status required: false schema: type: boolean nullable: true - name: includeWatched in: query description: Filter by access type required: false schema: type: boolean nullable: true - name: app_id in: path description: Your Bitski Application ID required: true schema: type: string format: uuid responses: '200': description: List contracts content: application/json: schema: type: object required: - contracts properties: contracts: type: array items: $ref: '#/components/schemas/Contract' '401': $ref: '#/components/responses/UnauthorizedResponse' security: - oauth2: - apps post: tags: - Minting summary: Creates the draft of a contract without deploying it. description: 'Creates the draft of a contract without deploying it. For external contract types like ZORA, "create" just imports it - you never will deploy it since its already deployed.' operationId: create_contract parameters: - name: app_id in: path description: Your Bitski Application ID required: true schema: type: string format: uuid requestBody: content: application/json: schema: type: object required: - contract properties: contract: allOf: - $ref: '#/components/schemas/ContractType' - type: object required: - network properties: address: type: string description: The address for this contract, if it has already been deployed example: 0x... description: type: string description: Contract description example: A collection of bird NFTs nullable: true externalLink: type: string description: A url for the entity that owns this contract example: www.bitski.com/@stapleverse nullable: true id: type: string format: uuid description: An optional contract id nullable: true name: type: string description: The contract name example: My Contract nullable: true network: type: string description: The ethereum network for this contract example: mainnet symbol: type: string description: Contract symbol example: BIRD nullable: true required: true responses: '201': description: List contracts content: application/json: schema: type: object required: - contract properties: contract: $ref: '#/components/schemas/Contract' '401': $ref: '#/components/responses/UnauthorizedResponse' security: - oauth2: - apps /v1/apps/{app_id}/contracts/{contract_id}: get: tags: - Minting summary: Get details about a contract description: Get details about a contract operationId: get_contract parameters: - name: app_id in: path description: Your Bitski application ID required: true schema: type: string format: uuid - name: contract_id in: path description: Your contract id required: true schema: type: string format: uuid responses: '200': description: Contract details content: application/json: schema: type: object required: - contract properties: contract: $ref: '#/components/schemas/Contract' '401': $ref: '#/components/responses/UnauthorizedResponse' '404': description: Contract not found content: application/json: schema: type: object example: error: message: Not found security: - oauth2: - apps patch: tags: - Minting summary: Update a contract description: Update a contract operationId: patch_contract parameters: - name: app_id in: path description: Your Bitski application ID required: true schema: type: string format: uuid - name: contract_id in: path description: Your contract id required: true schema: type: string format: uuid requestBody: content: application/json: schema: type: object required: - contract properties: contract: oneOf: - type: object required: - deploymentState properties: deploymentState: type: string enum: - PENDING - type: object description: 'Deploys a proxy clone contract which points at a shared contract. Charges customer for the gas fee.' required: - proxyAdmin - deploymentState properties: deploymentState: type: string enum: - PENDING_PROXY proxyAdmin: type: string description: The administrative address for the contract example: '0x137d9341d2d5311d5008d1eca56ce495ebad9538' - type: object description: Use upgrade proxy if there is a new base contract you want to point the contract to. required: - logicAddress - proxyAdmin - deploymentState properties: deploymentState: type: string enum: - PENDING_UPGRADE logicAddress: type: string description: 'The new logic address #[cfg_attr(feature = "docs", schema(value_type = String, example = "0x137d9341d2d5311d5008d1eca56ce495ebad9538"))]' example: '0x4b88eab793d9715289bacbfccca26056c31cc8ad' proxyAdmin: type: string description: The new proxy admin example: '0x137d9341d2d5311d5008d1eca56ce495ebad9538' - type: object description: Mark a contract as deployed given a hash and receipt required: - deploymentTransactionHash - receipt - deploymentState properties: deploymentState: type: string enum: - DEPLOYED deploymentTransactionHash: type: string description: the transaction hash of the deployment example: '0xdaa10785392d5bbe00cbd6d81d93a7bf9db197e2a335e613d9f4e89717d93a63' receipt: type: object description: the transaction receipt of the deployment - type: object description: Mark the contract deployment as failed required: - error - deploymentState properties: deploymentState: type: string enum: - FAILED error: type: string example: contract creation code storage out of gas discriminator: propertyName: deploymentState required: true responses: '200': description: Updated contract details content: application/json: schema: type: object required: - contract properties: contract: $ref: '#/components/schemas/Contract' '401': $ref: '#/components/responses/UnauthorizedResponse' '404': description: Contract not found content: application/json: schema: type: object example: error: message: Not found security: - oauth2: - apps /v1/apps/{app_id}/token-templates: get: tags: - Minting operationId: get_token_templates parameters: - name: limit in: query description: The total number of results to display required: false schema: type: integer format: int32 nullable: true minimum: 0 - name: offset in: query description: 'The starting index of the results to display e.g. for page 2 listing 10 items offset is 10.' required: false schema: type: integer format: int32 nullable: true minimum: 0 - name: isDropLink in: query description: Filter out token templates used for drop links. required: false schema: type: boolean - name: app_id in: path description: Your Bitski Application ID required: true schema: type: string format: uuid responses: '200': description: List of token templates content: application/json: schema: type: object required: - tokenTemplates properties: tokenTemplates: type: array items: $ref: '#/components/schemas/TokenTemplate' '401': $ref: '#/components/responses/UnauthorizedResponse' security: - oauth2: - apps post: tags: - Minting operationId: create_token_template parameters: - name: app_id in: path description: Your Bitski Application ID required: true schema: type: string format: uuid requestBody: content: application/json: schema: type: object required: - tokenTemplate properties: auction: allOf: - type: object required: - info properties: auctionContractId: type: string format: uuid description: The on-chain auction contract nullable: true endsAt: type: string format: date-time description: The time the auction ends nullable: true id: type: string format: uuid description: The id of the auction info: type: object required: - automaticSettlement properties: automaticSettlement: type: boolean description: 'If the auction charges the user''s payment method on file. False if payment will be settled offline via ACH or other preferred method.' minBid: type: string description: The minimum starting bid for the auction example: '100.00' startsAt: type: string format: date-time description: The time the auction starts nullable: true tokenId: type: string format: uuid description: The token that is being auctioned nullable: true tokenTemplate: $ref: '#/components/schemas/TokenTemplate' required: true responses: '201': description: New token template content: application/json: schema: type: object required: - tokenTemplate - auctions properties: auctions: type: array items: $ref: '#/components/schemas/Auction' description: The optional auction associated with these tokens tokenTemplate: $ref: '#/components/schemas/TokenTemplate' '401': $ref: '#/components/responses/UnauthorizedResponse' security: - oauth2: - apps /v1/apps/{app_id}/token-templates/{token_template_id}: get: tags: - Minting operationId: token_template parameters: - name: app_id in: path description: Your Bitski Application ID required: true schema: type: string format: uuid - name: token_template_id in: path description: The token template id required: true schema: type: string format: uuid responses: '200': description: The token template details content: application/json: schema: type: object required: - tokenTemplate - auctions properties: auctions: type: array items: $ref: '#/components/schemas/Auction' description: The optional auction associated with these tokens tokenTemplate: $ref: '#/components/schemas/TokenTemplate' '401': $ref: '#/components/responses/UnauthorizedResponse' '404': description: Store not found content: application/json: schema: type: object example: error: message: Not found security: - oauth2: - apps put: tags: - Minting operationId: update_token_template parameters: - name: app_id in: path description: Your Bitski Application ID required: true schema: type: string format: uuid - name: token_template_id in: path description: The token template id required: true schema: type: string format: uuid requestBody: content: application/json: schema: type: object required: - tokenTemplate properties: auctions: type: array items: type: object required: - info properties: auctionContractId: type: string format: uuid description: The on-chain auction contract nullable: true endsAt: type: string format: date-time description: The time the auction ends nullable: true id: type: string format: uuid description: The id of the auction info: type: object required: - automaticSettlement properties: automaticSettlement: type: boolean description: 'If the auction charges the user''s payment method on file. False if payment will be settled offline via ACH or other preferred method.' minBid: type: string description: The minimum starting bid for the auction example: '100.00' startsAt: type: string format: date-time description: The time the auction starts nullable: true tokenId: type: string format: uuid description: The token that is being auctioned nullable: true tokenTemplate: $ref: '#/components/schemas/TokenTemplate' required: true responses: '200': description: The updated template details content: application/json: schema: type: object required: - tokenTemplate - auctions properties: auctions: type: array items: $ref: '#/components/schemas/Auction' description: The optional auction associated with these tokens tokenTemplate: $ref: '#/components/schemas/TokenTemplate' '401': $ref: '#/components/responses/UnauthorizedResponse' '404': description: Store not found content: application/json: schema: type: object example: error: message: Not found security: - oauth2: - apps /v1/apps/{app_id}/tokens: get: tags: - Minting summary: List tokens description: List tokens operationId: get_tokens parameters: - name: privateMetadata in: path required: true schema: type: string - name: contractAddress in: path required: true schema: type: string example: '0xa4ef984773fd233c4cbed9cb1b905a3fa21e9461' - name: tokenId in: path required: true schema: type: string example: '0x01' - name: networkId in: path required: true schema: type: string example: mainnet - name: app_id in: path description: Your Bitski Application ID required: true schema: type: string format: uuid responses: '200': description: The updated template details content: application/json: schema: type: object required: - contracts - tokens - redemptionCodes - auctions properties: auctions: type: array items: $ref: '#/components/schemas/Auction' description: The list auctions for this set of tokens contracts: type: array items: $ref: '#/components/schemas/Contract' description: A list of contracts for the set of tokens redemptionCodes: type: array items: $ref: '#/components/schemas/ClaimCode' description: The list redemption codes for this set of tokens tokens: type: array items: $ref: '#/components/schemas/Token' description: The list of tokens '401': $ref: '#/components/responses/UnauthorizedResponse' security: - oauth2: - apps post: tags: - Minting summary: Create a new token description: Create a new token operationId: create_token parameters: - name: app_id in: path description: Your Bitski Application ID required: true schema: type: string format: uuid requestBody: content: application/json: schema: type: object required: - token properties: initialOwner: type: string description: The initial address this token will be minted to. example: '0xa4ef984773fd233c4cbed9cb1b905a3fa21e9461' token: type: object properties: animationUrl: type: string description: Token animation url example: null nullable: true backgroundColor: type: string description: Token background color example: '#000000' nullable: true contractId: type: string format: uuid description: The id of the contract for this token description: type: string description: Token description example: A great token nullable: true externalUrl: type: string description: A url for the entity that created this token example: null nullable: true image: type: string description: The token metadata image example: https://cdn.bitskistatic.com/tokens-raw/54676382-bab5-408d-afe2-fc6f160da4a8/06fd0294-a425-44c7-96e8-9d24757163b4.png nullable: true metadata: allOf: - $ref: '#/components/schemas/TokenMetadata' nullable: true name: type: string description: Token name example: Bird NFT nullable: true state: type: string description: Token state example: AVAILABLE nullable: true tokenId: type: string description: The token id example: '0x1' nullable: true tokenTemplateId: type: string format: uuid description: The id of the token template for this token nullable: true youtubeUrl: type: string description: Token youtube url example: null nullable: true transaction: allOf: - type: object properties: from: type: string description: The address that will mint this token example: '0xa4ef984773fd233c4cbed9cb1b905a3fa21e9461' gas: type: string description: The amount of gas for this transaction example: '0xd9cb1b905' gasPrice: type: string description: The price of gas for this transaction example: '0xe8cb1b9' nullable: true required: true responses: '201': description: The updated template details content: application/json: schema: type: object required: - token - auctions properties: auctions: type: array items: $ref: '#/components/schemas/Auction' description: An optional set of associated auctions token: $ref: '#/components/schemas/Token' '401': $ref: '#/components/responses/UnauthorizedResponse' security: - oauth2: - apps /v1/apps/{app_id}/tokens/{token_id}: get: tags: - Minting summary: Get token details description: Get token details operationId: get_token parameters: - name: app_id in: path description: Your Bitski Application ID required: true schema: type: string format: uuid - name: token_id in: path description: The token id required: true schema: type: string format: uuid responses: '200': description: The updated template details content: application/json: schema: type: object required: - token - auctions properties: auctions: type: array items: $ref: '#/components/schemas/Auction' description: An optional set of associated auctions token: $ref: '#/components/schemas/Token' '401': $ref: '#/components/responses/UnauthorizedResponse' '404': description: Not found content: application/json: schema: type: object example: error: code: 404 message: Not found request: 4fa85f64-5717-4562-b3fc-2c963f66afa6 status: NotFound security: - oauth2: - apps patch: tags: - Minting summary: Update token details description: Update token details operationId: update_token parameters: - name: app_id in: path description: Your Bitski Application ID required: true schema: type: string format: uuid - name: token_id in: path description: The token id required: true schema: type: string format: uuid requestBody: content: application/json: schema: type: object required: - token properties: token: type: object description: The updated token details required: true responses: '200': description: The updated template details content: application/json: schema: type: object required: - token - auctions properties: auctions: type: array items: $ref: '#/components/schemas/Auction' description: An optional set of associated auctions token: $ref: '#/components/schemas/Token' '401': $ref: '#/components/responses/UnauthorizedResponse' '404': description: Not found content: application/json: schema: type: object example: error: code: 404 message: Not found request: 4fa85f64-5717-4562-b3fc-2c963f66afa6 status: NotFound security: - oauth2: - apps components: schemas: Contract: allOf: - $ref: '#/components/schemas/ContractType' - type: object required: - id - deploymentState - address - network - accessType properties: accessType: $ref: '#/components/schemas/AccessType' address: type: string description: The address of this contract example: '0x8b53d6e704485ef70bd02e2a91df126935a127c9' deploymentState: type: string description: The state of the contract example: DEPLOYED description: type: string description: The description of the contract example: A collection of great NFTs nullable: true id: type: string format: uuid description: The id of the contract name: type: string description: The name of the contract example: My NFT Collection nullable: true network: type: string description: The network this contract is minted on example: mainnet TokenTemplate: type: object description: A template from which tokens will be created required: - contractId properties: animationUrl: type: string description: The animation url the tokens will have nullable: true contractId: type: string format: uuid description: The contract id that tokens will be minted for defaultMetadata: type: object description: Default metadata associated with each token delayMinting: type: boolean description: If minting is delayed description: type: string description: The description the tokens will have example: A great token nullable: true gatedContent: type: array items: type: object description: Content that is only available to the user who owns the token example: [] id: type: string format: uuid description: The id of the token template image: type: string description: The image the tokens will have example: https://cdn.bitskistatic.com/tokens-raw/54676382-bab5-408d-afe2-fc6f160da4a8/06fd0294-a425-44c7-96e8-9d24757163b4.png isDropLink: type: boolean description: If this token is available as a drop link liveAt: type: string format: date-time description: The time this token is available nullable: true maxTokens: type: integer format: int64 description: The maximum amount of tokens to mint example: 100 nullable: true name: type: string description: The description the tokens will have example: Bird NFT nullable: true namingTemplate: type: string description: The naming convention for tokens minted via this template example: DEFAULT payouts: type: object description: The payout split when tokens are sold previewAt: type: string format: date-time description: The time this token can be previewed before it is available nullable: true prices: type: array items: $ref: '#/components/schemas/Price' description: The prices at which to sell this token published: type: boolean description: If this token is published or paused salesEndAt: type: string format: date-time description: The time sales of this token end nullable: true totalTokens: type: integer format: int64 description: The total amount of tokens already minted example: 57 Auction: type: object required: - tokenId - status properties: auctionContractId: type: string format: uuid nullable: true endsAt: type: string format: date-time nullable: true id: type: string format: uuid startsAt: type: string format: date-time nullable: true status: type: string example: CREATED tokenId: type: string format: uuid ContractType: oneOf: - type: object required: - contractType properties: contractType: type: string enum: - UNKNOWN - type: object required: - contractType properties: contractType: type: string enum: - NON_FUNGIBLE_AUCTION - type: object required: - tokenTemplates - contractType properties: contractType: type: string enum: - NON_FUNGIBLE tokenTemplates: type: array items: $ref: '#/components/schemas/TokenTemplate' - type: object required: - contractType properties: contractType: type: string enum: - SEMI_FUNGIBLE tokenTemplates: type: array items: $ref: '#/components/schemas/TokenTemplate' discriminator: propertyName: contractType Price: type: object required: - currency - price properties: currency: type: string description: The currency for this price example: USD id: type: string format: uuid description: The price id price: type: string description: The amount each item costs example: '200.00' ErrorResponse: type: object description: Error response body required: - code - status - request - message properties: code: type: integer format: int32 description: The status code for the error example: 401 minimum: 0 message: type: string description: The error message associated with the error example: The request could not be authorized request: type: string format: uuid description: The request identifier status: type: string description: The status code text for the error example: Unauthorized Token: type: object description: Blockchain token details required: - id - createdAt - index - metadata - privateMetadata - state properties: backgroundColor: type: string description: Token background color example: '#ff1122' nullable: true createdAt: type: string format: date-time description: The date this token was created description: type: string description: Token description example: Interesting bird NFT nullable: true id: type: string format: uuid description: The token id image: type: string description: Token image example: https://cdn.bitskistatic.com/tokens-raw/54676382-bab5-408d-afe2-fc6f160da4a8/06fd0294-a425-44c7-96e8-9d24757163b4.png nullable: true index: type: string description: The id of the token in the contract example: '0x3' metadata: $ref: '#/components/schemas/TokenMetadata' name: type: string description: Token name example: 'Bird #1' nullable: true privateMetadata: type: object description: Token off chain private metadata state: type: string description: Token deployment state example: MINTED tokenTemplateId: type: string format: uuid description: The template that this token came from nullable: true AccessType: type: string enum: - OWNED - WATCHED TokenMetadata: type: object properties: attributes: type: array items: {} description: Token attributes example: null background_color: type: string description: Token background color example: null nullable: true description: type: string description: Token description example: A very special NFT nullable: true image: type: string description: The token image example: https://cdn.bitskistatic.com/tokens-raw/54676382-bab5-408d-afe2-fc6f160da4a8/06fd0294-a425-44c7-96e8-9d24757163b4.png nullable: true name: type: string description: Token name example: 'NFT Token #1' nullable: true properties: type: object description: Token properties ClaimableType: type: string enum: - RAFFLE - DROP_LINK_GROUP ClaimCode: type: object required: - id - createdAt properties: claimableType: allOf: - $ref: '#/components/schemas/ClaimableType' nullable: true code: type: string description: The code that can be used to claim example: BIRDFAN2023 nullable: true createdAt: type: string format: date-time description: The date the claim code was created description: type: string description: The description of the claim code example: A free bird NFT nullable: true id: type: string format: uuid description: The claim code id maxClaims: type: integer format: int64 description: The max amount of claims for this code example: 1 nullable: true storeUsername: type: string description: The username of the store that made this claim code example: nft_fans nullable: true responses: UnauthorizedResponse: description: '' content: application/json: schema: type: object required: - error properties: error: $ref: '#/components/schemas/ErrorResponse' securitySchemes: oauth2: type: oauth2 flows: clientCredentials: tokenUrl: https://account.bitski.com/oauth2/token scopes: apps: manage my applications description: Client credentials