> ## 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 by Locator

> Edit a minted NFT's metadata using a Crossmint NFT locator.

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


<Snippet file="alpha-api-note.mdx" />

Currently, this route is restricted to EVM NFTs only.

Locator format: `{chain}:{contractAddress}:{tokenId}`

Example: `polygon:0x5af0d9827e0c53e4799bb226655a1de152a425a5:23`


## OpenAPI

````yaml patch /v1-alpha1/nfts/{locator}
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:
  /v1-alpha1/nfts/{locator}:
    patch:
      tags:
        - NFTs
      summary: Edit NFT by Locator
      description: |
        Edit a minted NFT's metadata using a Crossmint NFT locator.

        **API scope required**: `nfts.update`
      operationId: edit-nft-by-locator
      parameters:
        - name: locator
          in: path
          description: >-
            The locator of the NFT, which includes the blockchain, contract
            address, and token ID.
          required: true
          schema:
            type: string
            example: polygon:0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045:52
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - metadata
                - reuploadLinkedFiles
              properties:
                metadata:
                  $ref: '#/components/schemas/NFTMetadata'
                reuploadLinkedFiles:
                  $ref: '#/components/schemas/ReuploadLinkedFiles'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EditNFTResponse'
        '400':
          description: Invalid Locator or Collection Type
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: >-
                      The specified NFT locator is invalid. See the valid format
                      on https://docs.crossmint.com/api-reference/.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403Response'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Couldn't find Crossmint managed NFT {locator}
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Currently, only EVM Locators are supported for this route.
        '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:
  schemas:
    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
    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
    403Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Malformed API key. / API key provided doesn't have required scopes.
    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.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Obtained in the Crossmint developer console

````