> ## Documentation Index
> Fetch the complete documentation index at: https://trustos.telefonicatech.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Mint NFT

> Mints an NFT in the specified collection and assigns it to a user.



## OpenAPI

````yaml post /erc721/{id}/mint
openapi: 3.0.1
info:
  title: TrustOS EVM Token API
  description: >-
    TrustOS EVM Token API is used to interact with TrustOS database. In case you
    have some questions or need more about the use of this API, don't hesitate
    to contact B-Team:
  contact:
    name: Blockchain Team
    email: soporte-bteam@telefonica.com
  version: 0.2.0-rc.32
servers:
  - url: https://lab.trustos.telefonicatech.com/track/v2
    description: Lab
security: []
tags:
  - name: ERC-20
    description: ERC-20 Token Endpoints.
  - name: ERC-721
    description: Non-Fungible Token Endpoints.
  - name: Utils
    description: Methods for specific use cases.
paths:
  /erc721/{id}/mint:
    post:
      tags:
        - ERC-721
      summary: Mint NFT
      parameters:
        - name: networkId
          in: query
          description: Network identifier where the NFT collection contract was deployed.
          required: true
          schema:
            type: number
            example: 10004
        - name: id
          in: path
          description: Token address or symbol.
          required: true
          schema:
            type: string
            example: '0xabcdef'
        - name: to
          in: query
          description: Address which will receive the NFT.
          required: true
          schema:
            type: string
            example: '0xabcdef'
      requestBody:
        description: Data needed for minting the NFT
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: >-
                    Image file which will be displayed on websites like OpenSea.
                    The file must be in JPEG, PNG, SVG or GIF formats.
                body:
                  type: object
                  description: NFT metadata.
                  properties:
                    name:
                      type: string
                      description: Name of the NFT.
                      example: NFT Token
                    description:
                      type: string
                      description: Description of the NFT.
                      example: A token for testing purposes
                  required:
                    - name
                    - description
              required:
                - file
                - body
        required: true
      responses:
        '200':
          $ref: '#/components/responses/200-Minted'
        '400':
          $ref: '#/components/responses/400-ValidationError'
        '401':
          $ref: '#/components/responses/401-AuthenticationError'
        '403':
          $ref: '#/components/responses/403-ForbiddenError'
        '404':
          $ref: '#/components/responses/404-NotFoundError'
        '429':
          $ref: '#/components/responses/429-OutOfCreditsError'
        '500':
          $ref: '#/components/responses/500-InternalServerError'
        '503':
          $ref: '#/components/responses/503-ServiceUnavailable'
        '504':
          $ref: '#/components/responses/504-GatewayTimeout'
      security:
        - bearerAuth: []
components:
  responses:
    200-Minted:
      description: Successful minting.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 200
              message:
                type: string
                description: Message returned by the request.
                example: Tokens minted successfully
              data:
                type: object
                description: Data returned by the request.
                example: {}
    400-ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 400
              type:
                type: string
                description: Error type.
                example: Validation Error
              message:
                type: string
                description: Message returned by the request.
                example: Request parameters are wrong, check requirements
              errors:
                type: array
                description: All the validation errors encountered in the request.
                items:
                  type: object
                  properties:
                    field:
                      type: string
                      description: Name of the field.
                      example: ''
                    error:
                      type: string
                      description: Description of the error encountered.
                      example: ''
    401-AuthenticationError:
      description: Authentication error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 401
              type:
                type: string
                description: Error type.
                example: Authentication Error
              message:
                type: string
                description: Message returned by the request.
                enum:
                  - Token is invalid
                  - Token is expired
                  - Token is not provided
    403-ForbiddenError:
      description: Forbidden error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 403
              type:
                type: string
                description: Error type.
                example: Forbidden Error
              message:
                type: string
                description: Message returned by the request.
                example: >-
                  Provider not available in your plan. Please, contact B-Team to
                  include it
    404-NotFoundError:
      description: Not found error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 404
              type:
                type: string
                description: Error type.
                example: Not Found Error
              message:
                type: string
                description: Message returned by the request.
                example: Token with the requested id not found
    429-OutOfCreditsError:
      description: Out of credits error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 429
              type:
                type: string
                description: Type of the error.
                example: Out of Credits Error
              message:
                type: string
                description: Message returned by the request.
                example: >-
                  User has run out of credits. Please, contact BTeam to increase
                  the limit
    500-InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 500
              type:
                type: string
                description: Error type.
                example: Internal Server Error
              message:
                type: string
                description: Message returned by the request.
                example: Opps! Something went wrong!
    503-ServiceUnavailable:
      description: Service unavailable error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 503
              type:
                type: string
                description: Error type.
                example: Service Unavailable Error
              message:
                type: string
                description: Message returned by the request.
                example: Service temporarily unavailable, please try again later
    504-GatewayTimeout:
      description: Gateway timeout error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 504
              type:
                type: string
                description: Error type.
                example: Gateway Timeout Error
              message:
                type: string
                description: Message returned by the request.
                example: >-
                  Impossible to mine transaction. This could be due to a rise in
                  gas prices. Please try again
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````