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

# Edit NFT

> Edit a minted NFT's metadata on IPFS. 

If you are using a custom baseURI, invoking this will overwrite the specific tokenURI for the edited token.

**API scope required**: `nfts.update`




## OpenAPI

````yaml patch /2022-06-09/collections/{collectionId}/nfts/{id}
openapi: 3.0.1
info:
  description: N/A
  version: 1.0.0
  title: NFT Minting
  contact:
    name: Crossmint NFT Minting APIs
    url: https://www.crossmint.com
    email: support@crossmint.com
servers:
  - url: https://staging.crossmint.com/api
    description: Staging environment (testnets)
  - url: https://www.crossmint.com/api
    description: Production environment (mainnets)
security:
  - apiKey: []
paths:
  /2022-06-09/collections/{collectionId}/nfts/{id}:
    patch:
      tags:
        - NFTs
      summary: Edit NFT
      description: >
        Edit a minted NFT's metadata on IPFS. 


        If you are using a custom baseURI, invoking this will overwrite the
        specific tokenURI for the edited token.


        **API scope required**: `nfts.update`
      operationId: edit-nft
      parameters:
        - $ref: '#/components/parameters/collectionId'
        - $ref: '#/components/parameters/nftId'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - recipient
                - metadata
              properties:
                metadata:
                  $ref: '#/components/schemas/NFTMetadataOptions'
                reuploadLinkedFiles:
                  $ref: '#/components/schemas/ReuploadLinkedFiles'
      responses:
        '200':
          description: The NFT metadata update action has been successfully been created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditNFTResponse'
        '400':
          description: >-
            Invalid arguments, please make sure you're following the api
            specification.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400Response'
        '403':
          description: Forbidden error, please ensure the credentials are correct.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403Response'
        '404':
          description: Not found error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404Response'
        '503':
          description: >-
            Please try again in a few minutes. If the issue still persists,
            contact Crossmint support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/503Response'
components:
  parameters:
    collectionId:
      name: collectionId
      in: path
      description: >
        This is the identifier for the collection related to the request. Every
        project has default collections: `default-solana` and
        `default-polygon`. 


        The
        [create-collection](/api-reference/minting/collection/create-collection)
        API will result in collections with UUID formatted `collectionId`. 

        **Example:** `9c82ef99-617f-497d-9abb-fd355291681b`


        The
        [create-collection-idempotent](/api-reference/minting/collection/create-collection-idempotent)
        API allows you to specify an arbitrary identifier during the initial
        request.

        **Example:** `your-custom-identifier`
      required: true
      example: default-solana
      schema:
        type: string
    nftId:
      name: id
      in: path
      description: Unique ID of the minted NFT returned in the mint response
      required: true
      schema:
        type: string
  schemas:
    NFTMetadataOptions:
      description: >-
        Optional if [baseURI](/api-reference/minting/collection/set-base-uri) is
        set.
      oneOf:
        - $ref: '#/components/schemas/NFTMetadata'
          title: '[EVM] Metadata Object'
        - title: '[EVM] Metadata URL'
          description: Enter a URL to a JSON file containing the metadata contents
          type: string
          example: >-
            https://bafkreici2rl4k4kvnag6gjykuzaaqznveg7bip4y6qx4ekwzukqul23xba.ipfs.nftstorage.link/
        - $ref: '#/components/schemas/NFTMetadataSolana'
          title: '[Solana] Metadata Object'
        - title: '[Solana] Metadata URL'
          description: Enter a URL to a JSON file containing the metadata contents
          type: object
          additionalProperties: false
          properties:
            uri:
              description: Enter a URL to a JSON file containing the metadata contents
              type: string
              example: >-
                https://bafkreiccjhsemz4jhunfnrw4icx2vqr5ms4ycx5v3ecqvb2uckkgqf5ep4.ipfs.nftstorage.link/
            name:
              type: string
              description: 'The name of your NFT (Max length: 32)'
              example: Solana Test NFT
              maxLength: 32
          required:
            - uri
            - name
    ReuploadLinkedFiles:
      type: boolean
      description: >-
        Any URLs in the metadata object will be resolved and reuploaded to IPFS
        [Default: true]
    EditNFTResponse:
      type: object
      properties:
        actionId:
          type: string
          example: d5e24c69-530d-4efd-9201-e6f9d6f647e2
        action:
          type: string
          example: nfts.update
        status:
          type: string
          example: pending OR succeeded
        data:
          type: object
          properties:
            txId:
              type: string
              description: |
                The onchain transaction ID related to the request. 

                This is only present when `status` is `succeeded`
              example: >-
                succeeded status ONLY -
                0x69cf6d971e6745f25f683db9c87663839be02bdaa4a70f0724f490d7335b0081
            chain:
              type: string
              example: polygon
            collection:
              type: object
              properties:
                id:
                  type: string
                  example: c242dcdb-57a7-4944-af9f-2c1472fa70fb
                contractAddress:
                  type: string
                  example: '0xc0DeE392CBe1af5f8211A17EAffAA5c358C0fE6d'
            token:
              type: object
              properties:
                id:
                  type: string
                  example: 27db27cf-1596-4ab0-9826-a6740ffce61a
                owner:
                  type: object
                  properties:
                    walletAddress:
                      type: string
                      example: '0x0794f3aa4521d19273D775a08289110523D34DD4'
                tokenId:
                  type: string
                  example: '1'
            changes:
              type: array
              items:
                type: string
              example:
                - metadata
        startedAt:
          type: string
          format: date-time
          example: '2024-03-08T00:10:59.000Z'
        completedAt:
          type: string
          format: date-time
          description: |
            The time this operation completed in UTC.

            This is only present when `status` is `succeeded`
          example: succeeded status ONLY - 2024-03-08T00:11:01.000Z
        resource:
          type: string
          example: >-
            https://staging.crossmint.com/api/2022-06-09/collections/c242dcdb-57a7-4944-af9f-2c1472fa70fb/nfts/d5e24c69-530d-4efd-9201-e6f9d6f647e2
    400Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Invalid arguments or empty parameter <missing parameter>.
    403Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Malformed API key. / API key provided doesn't have required scopes.
    404Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Not found
    503Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: >-
            Please try again in a few minutes. If the issue still persists,
            contact Crossmint support.
    NFTMetadata:
      type: object
      additionalProperties: false
      required:
        - name
        - image
        - description
      properties:
        name:
          type: string
          description: 'The name of your NFT (Max length: 32)'
          example: Crossmint Example NFT
          maxLength: 32
        image:
          type: string
          description: Direct link to your NFT image
          example: https://www.crossmint.com/assets/crossmint/logo.png
        description:
          type: string
          description: 'A brief description of the NFT (Max length: 64)'
          example: My NFT created via the mint API!
          maxLength: 64
        animation_url:
          type: string
          example: ''
          description: |
            **EVM only**

            [See more info here](/minting/nfts/integrate/define-metadata)
        attributes:
          type: array
          description: Add attributes to your NFT
          items:
            type: object
            additionalProperties: false
            required:
              - trait_type
              - value
            properties:
              display_type:
                type: string
                description: Display name of your attribute
                enum:
                  - boost_number
                  - boost_percentage
                  - number
              trait_type:
                type: string
                description: The name of the trait
              value:
                type: string
                description: The value of the trait
    NFTMetadataSolana:
      type: object
      additionalProperties: false
      required:
        - name
        - image
        - description
      properties:
        name:
          type: string
          description: 'The name of your NFT (Max length: 32)'
          example: Crossmint Example NFT
          maxLength: 32
        image:
          type: string
          description: Direct link to your NFT image
          example: https://www.crossmint.com/assets/crossmint/logo.png
        description:
          type: string
          description: 'A brief description of the NFT (Max length: 64)'
          example: My NFT created via the mint API!
          maxLength: 64
        symbol:
          type: string
          example: MTK
          maxLength: 10
          description: |
            **Solana only**

            A shorthand identifier for the token (Max length: 10)
        attributes:
          type: array
          description: Add attributes to your NFT
          items:
            type: object
            additionalProperties: false
            required:
              - trait_type
              - value
            properties:
              display_type:
                type: string
                description: Display name of your attribute
                enum:
                  - boost_number
                  - boost_percentage
                  - number
              trait_type:
                type: string
                description: The name of the trait
              value:
                type: string
                description: The value of the trait
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Obtained in the Crossmint developer console

````