> ## 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.

# Create Template with ID

> Create a token template with preconfigured metadata

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




## OpenAPI

````yaml put /2022-06-09/collections/{collectionId}/templates/{templateId}
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}/templates/{templateId}:
    put:
      tags:
        - NFT Templates
      summary: Create Template with ID
      description: |
        Create a token template with preconfigured metadata

        **API scope required**: `nfts.create`
      operationId: create-template-idempotent
      parameters:
        - $ref: '#/components/parameters/collectionId'
        - $ref: '#/components/parameters/templateId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTemplateBody'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateResponse'
        '400':
          description: >-
            Invalid arguments, please make sure you're following the api
            specification.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400Response'
        '404':
          description: Not found error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404Response'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/409Response'
        '424':
          description: Failed Dependency
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/424Response'
        '503':
          description: Service unavailable
          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
    templateId:
      name: templateId
      in: path
      description: The template ID
      required: true
      schema:
        type: string
  schemas:
    CreateTemplateBody:
      type: object
      additionalProperties: false
      properties:
        metadata:
          description: See https://docs.crossmint.com/docs/metadata for more info
          type: object
          additionalProperties: false
          properties:
            name:
              type: string
              description: Template name
              default: My template
            image:
              type: string
              default: https://www.crossmint.com/assets/crossmint/logo.png
            description:
              type: string
              default: A new collection with its own dedicated smart contract
              maxLength: 64
            symbol:
              type: string
              description: >-
                A shorthand identifier for the token (e.g., "MTK"). This is only
                applicable for SFT Templates on Solana.
              maxLength: 32
        onChain:
          type: object
          additionalProperties: false
          description: Onchain details
          properties:
            tokenId:
              type: string
              description: >-
                The token ID. Only relevant for SFT (ERC-1155) collections on an
                EVM chain. Leave empty for NFT/ERC-721 or Solana collections.
              example: '1'
        supply:
          type: object
          additionalProperties: false
          description: Supply details
          properties:
            limit:
              type: integer
              description: Supply limit, Set to 1 for ERC721.
              example: 10
        reuploadLinkedFiles:
          $ref: '#/components/schemas/ReuploadLinkedFiles'
    TemplateResponse:
      type: object
      properties:
        templateId:
          type: string
          format: uuid
          example: 20ed0963-0185-49af-b4a0-2de3169bb367
        metadata:
          type: object
          properties:
            name:
              type: string
              example: My Token
            image:
              type: string
              example: ipfs://QmaToZn4VEjF7q4CAudPaNka6AD484xuuEZSXmTLJPDLVE
            description:
              type: string
              example: Sample Token Template
            symbol:
              type: string
              example: A shorthand identifier for the token (Solana only)
        onChain:
          oneOf:
            - title: EVM
              type: object
              properties:
                tokenId:
                  type: integer
                  description: TokenId for the token
                  example: 1
            - title: Solana
              type: object
              properties:
                mintHash:
                  type: string
                  description: (SFTs Only) Mint hash for SFT if one has been minted already
        supply:
          type: object
          properties:
            limit:
              type: integer
              example: 1
            minted:
              type: integer
              example: 0
    400Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Invalid arguments or empty parameter <missing parameter>.
    404Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Not found
    409Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Already exists
    424Response:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: >-
            Couldn't fetch metadata from the URI defined on the template:
            <metadata url>. Ensure this URI is available and publicly
            accessible.
    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.
    ReuploadLinkedFiles:
      type: boolean
      description: >-
        Any URLs in the metadata object will be resolved and reuploaded to IPFS
        [Default: true]
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Obtained in the Crossmint developer console

````