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

# Create metadata

> Add metadata to selected scope



## OpenAPI

````yaml post /v1/metadata/{scope}/{id}
openapi: 3.1.0
info:
  title: Quickbutik API
  version: 1.0.0
  description: >-
    Use the Quickbutik API to access and manage stores, products, orders, and
    more.
  contact:
    name: Quickbutik API Support
    url: https://quickbutik.com/support
  license:
    name: Proprietary
  x-fiddle-import-file: true
servers:
  - url: https://api.quickbutik.com
    description: Production server
security:
  - BasicAuth: []
tags:
  - name: Orders
    description: Order management operations
  - name: Products
    description: Product catalog management
  - name: Categories
    description: Product category management
  - name: Payment Methods
    description: Available payment methods
  - name: Shipping Methods
    description: Available shipping methods
  - name: Metadata
    description: Custom metadata management
  - name: Settings
    description: Store settings and configuration
  - name: Scripts
    description: Storefront script management
paths:
  /v1/metadata/{scope}/{id}:
    post:
      tags:
        - Metadata
      summary: Create metadata
      description: Add metadata to selected scope
      operationId: create-metadata
      parameters:
        - $ref: '#/components/parameters/MetadataScope'
        - $ref: '#/components/parameters/MetadataId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataCreate'
      responses:
        '200':
          description: Metadata created successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    MetadataScope:
      name: scope
      in: path
      required: true
      schema:
        type: string
        enum:
          - order
          - product
          - customer
      description: order|product|customer
    MetadataId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: >-
        Id of the selected scope. E.g when scope is product and id is 1,
        metadata for product with id 1 will be returned
  schemas:
    MetadataCreate:
      type: object
      properties:
        key:
          type: string
          example: topseller
        value:
          type: string
          example: 'yes'
    Error:
      type: object
      properties:
        code:
          type: integer
          example: 404
        error:
          type: string
          example: Resource not found
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized - Invalid or missing authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: >
        **Basic Authentication with API Keys**


        The Quickbutik API uses Basic Authentication where you use your API key
        as both the username and password.


        **How it works:**

        1. Format your credentials as `api_key:api_key` (using the SAME API key
        for both username and password)

        2. Base64 encode the formatted string

        3. Include in the Authorization header as: `Authorization: Basic
        ENCODED_STRING`


        **Example:**

        - API Key: `sk_live_abc123`

        - Formatted: `sk_live_abc123:sk_live_abc123`

        - Base64 Encoded: `c2tfbGl2ZV9hYmMxMjM6c2tfbGl2ZV9hYmMxMjM=`

        - Header: `Authorization: Basic
        c2tfbGl2ZV9hYmMxMjM6c2tfbGl2ZV9hYmMxMjM=`


        **cURL Example:**

        ```bash

        curl https://api.quickbutik.com/v1/orders -u your_api_key:your_api_key

        ```


        All API requests must be made over HTTPS. Requests made over HTTP will
        be rejected.


        API keys can be generated in the Quickbutik Control Panel under Settings
        → API.

````