---
title: "Add item"
method: POST
path: "/api/collections/{namespace}/{slug}/items"
tags: ["collections"]
---

# Add item

`POST /api/collections/{namespace}/{slug}/items`

Add an item to a collection

## Path parameters

- `namespace` string, required
- `slug` string, required

## Request body

- object
  - `item` object, required
    - `type` 'paper' | 'collection' | 'space' | 'model' | 'dataset' | 'bucket', required
    - `id` string, required
  - `note` string

## Response `200`

The updated collection

- object
  - `slug` string, required
  - `title` string, required
  - `description` string
  - `lastUpdated` string, date-time, required
  - `gating` union, required
    - unknown
    - unknown
    - object
      - `mode` 'auto', required
    - object
      - `mode` 'manual', required
      - `notifications` object, required
        - `mode` 'bulk' | 'real-time', required
        - `email` string
  - `owner` union, required
    - object
      - `_id` string, required
      - `avatarUrl` string, required
      - `fullname` string, required
      - `name` string, required
      - `isHf` boolean, required
      - `isHfAdmin` boolean, required
      - `isMod` boolean, required
      - `followerCount` number
      - `type` 'org', required
      - `plan` 'team' | 'enterprise' | 'plus' | 'academia'
      - `isUserFollowing` boolean
    - object
      - `_id` string, required
      - `avatarUrl` string, required
      - `fullname` string, required
      - `name` string, required
      - `isHf` boolean, required
      - `isHfAdmin` boolean, required
      - `isMod` boolean, required
      - `followerCount` number
      - `type` 'user', required
      - `isPro` boolean, required
      - `isUserFollowing` boolean
      - `primaryOrg` object
        - `avatarUrl` string, required
        - `fullname` string, required
        - `name` string, required
        - `type` 'org', required
        - `isHf` boolean, required
        - `isFollowing` boolean
        - `plan` 'team' | 'enterprise' | 'plus' | 'academia'
        - `details` string
        - `hasPrivateMembersList` boolean
        - `userRole` union
          - 'admin' | 'write' | 'contributor' | 'read' | 'no_access'
          - string — Custom role name
        - `numUsers` number
  - `position` number, required
  - `theme` 'orange' | 'blue' | 'green' | 'purple' | 'pink' | 'indigo', required
  - `private` boolean, required
  - `upvotes` number, required
  - `shareUrl` string, required
  - `isUpvotedByUser` boolean, required
  - `resourceGroup` object
    - `id` string, required
    - `name` string, required
    - `numUsers` number
  - `items` union[], required
    - union
      - object
        - `_id` string, required
        - `note` object
          - `html` string, required
          - `text` string, required
        - `gallery` string[]
        - `position` number, required
        - `author` string, required
        - `id` string, required
        - `isLikedByUser` boolean, required
        - `likes` number, required
        - `datasetsServerInfo` object
          - `viewer` 'preview' | 'viewer-partial' | 'viewer', required
          - `numRows` number, nullable, required
          - `libraries` string[], required
          - `formats` string[], required
          - `modalities` string[], required
        - `private` boolean, required
        - `repoType` 'dataset', required
        - `downloads` number, required
        - `gated` union, required
          - unknown
          - 'auto' | 'manual'
        - `lastModified` string, date-time, required
        - `resourceGroup` object
          - `id` string, required
          - `name` string, required
          - `numUsers` number
        - `isBenchmark` boolean
        - `isTraces` boolean
        - `type` 'dataset', required
      - object
        - `_id` string, required
        - `note` object
          - `html` string, required
          - `text` string, required
        - `gallery` string[]
        - `position` number, required
        - `author` string, required
        - `downloads` number, required
        - `id` string, required
        - `availableInferenceProviders` object[], required
          - `provider` 'baseten' | 'cerebras' | 'cohere' | 'deepinfra' | 'fal-ai' | 'featherless-ai' | 'fireworks-ai' | 'groq' | 'hf-inference' | 'novita' | 'nscale' | 'openai' | 'ovhcloud' | 'publicai' | 'replicate' | 'scaleway' | 'together' | 'wavespeed' | 'zai-org', required
          - `providerStatus` 'live' | 'staging' | 'error', required
          - `modelStatus` 'live' | 'staging' | 'error', required
          - `providerId` string, required
          - `task` 'text-classification' | 'token-classification' | 'table-question-answering' | 'question-answering' | 'zero-shot-classification' | 'translation' | 'summarization' | 'feature-extraction' | 'text-generation' | 'fill-mask' | 'sentence-similarity' | 'text-to-speech' | 'text-to-audio' | 'automatic-speech-recognition' | 'audio-to-audio' | 'audio-classification' | 'audio-text-to-text' | 'voice-activity-detection' | 'depth-estimation' | 'image-classification' | 'object-detection' | 'image-segmentation' | 'text-to-image' | 'image-to-text' | 'image-to-image' | 'image-to-video' | 'unconditional-image-generation' | 'video-classification' | 'reinforcement-learning' | 'robotics' | 'tabular-classification' | 'tabular-regression' | 'tabular-to-text' | 'table-to-text' | 'multiple-choice' | 'text-ranking' | 'text-retrieval' | 'time-series-forecasting' | 'text-to-video' | 'image-text-to-text' | 'image-text-to-image' | 'image-text-to-video' | 'visual-question-answering' | 'document-question-answering' | 'zero-shot-image-classification' | 'graph-ml' | 'mask-generation' | 'zero-shot-object-detection' | 'text-to-3d' | 'image-to-3d' | 'image-feature-extraction' | 'video-text-to-text' | 'keypoint-detection' | 'visual-document-retrieval' | 'any-to-any' | 'video-to-video' | 'other' | 'conversational', required
          - `adapterType` 'lora'
          - `adapterWeightsPath` string
          - `features` object
            - `toolCalling` boolean
          - `isCheapestPricingOutput` boolean, required
          - `isFastestThroughput` boolean, required
          - `isModelAuthor` boolean, required
          - `tokensPerSecond` number
          - `pricingOutput` number
          - `freeUntil` string, date-time
        - `isLikedByUser` boolean, required
        - `lastModified` string, date-time, required
        - `likes` number, required
        - `pipeline_tag` string
        - `private` boolean, required
        - `repoType` 'model', required
        - `gated` union, required
          - unknown
          - 'auto' | 'manual'
        - `resourceGroup` object
          - `id` string, required
          - `name` string, required
          - `numUsers` number
        - `numParameters` number
        - `authorData` union
          - object
            - `_id` string, required
            - `avatarUrl` string, required
            - `fullname` string, required
            - `name` string, required
            - `isHf` boolean, required
            - `isHfAdmin` boolean, required
            - `isMod` boolean, required
            - `followerCount` number
            - `type` 'org', required
            - `plan` 'team' | 'enterprise' | 'plus' | 'academia'
            - `isUserFollowing` boolean
          - object
            - `_id` string, required
            - `avatarUrl` string, required
            - `fullname` string, required
            - `name` string, required
            - `isHf` boolean, required
            - `isHfAdmin` boolean, required
            - `isMod` boolean, required
            - `followerCount` number
            - `type` 'user', required
            - `isPro` boolean, required
            - `isUserFollowing` boolean
            - `primaryOrg` object
              - …
        - `widgetOutputUrls` string[]
        - `isPreRelease` unknown
        - `type` 'model', required
      - object
        - `_id` string, required
        - `note` object
          - `html` string, required
          - `text` string, required
        - `gallery` string[]
        - `position` number, required
        - `author` string, required
        - `colorFrom` string, required
        - `colorTo` string, required
        - `createdAt` string, date-time, required
        - `emoji` string, required
        - `id` string, required
        - `isLikedByUser` boolean, required
        - `lastModified` string, date-time, required
        - `likes` number, required
        - `pinned` boolean, required
        - `private` boolean, required
        - `repoType` 'space', required
        - `title` string, required
        - `sdk` 'gradio' | 'docker' | 'static' | 'streamlit'
        - `runtime` object, required
          - `stage` 'NO_APP_FILE' | 'CONFIG_ERROR' | 'BUILDING' | 'BUILD_ERROR' | 'APP_STARTING' | 'RUNNING' | 'RUNNING_BUILDING' | 'RUNNING_APP_STARTING' | 'RUNTIME_ERROR' | 'DELETING' | 'STOPPED' | 'PAUSED' | 'SLEEPING', required
          - `hardware` object, required
            - `current` 'cpu-basic' | 'cpu-upgrade' | 'cpu-performance' | 'cpu-xl' | 'sprx8' | 'zero-a10g' | 't4-small' | 't4-medium' | 'l4x1' | 'l4x4' | 'l40sx1' | 'l40sx4' | 'l40sx8' | 'a10g-small' | 'a10g-large' | 'a10g-largex2' | 'a10g-largex4' | 'a100-large' | 'a100x4' | 'a100x8' | 'h200' | 'h200x2' | 'h200x4' | 'h200x8' | 'rtx-pro-6000' | 'rtx-pro-6000x2' | 'rtx-pro-6000x4' | 'rtx-pro-6000x8' | 'inf2x6', nullable, required
            - `requested` 'cpu-basic' | 'cpu-upgrade' | 'cpu-performance' | 'cpu-xl' | 'sprx8' | 'zero-a10g' | 't4-small' | 't4-medium' | 'l4x1' | 'l4x4' | 'l40sx1' | 'l40sx4' | 'l40sx8' | 'a10g-small' | 'a10g-large' | 'a10g-largex2' | 'a10g-largex4' | 'a100-large' | 'a100x4' | 'a100x8' | 'h200' | 'h200x2' | 'h200x4' | 'h200x8' | 'rtx-pro-6000' | 'rtx-pro-6000x2' | 'rtx-pro-6000x4' | 'rtx-pro-6000x8' | 'inf2x6', nullable, required
          - `errorMessage` string
          - `gcTimeout` number, nullable
          - `replicas` object, required
            - `current` number, nullable
            - `requested` union, required
              - …
          - `devMode` boolean
          - `domains` object[]
            - `domain` string, required
            - `isCustom` boolean, nullable
            - `stage` 'READY' | 'PENDING' | 'PENDING_CHALLENGE' | 'EXPIRED_CHALLENGE' | 'MISCONFIGURED', required
          - `sha` string
          - `hotReloading` object
            - `status` string, required
            - `replicaStatuses` array[], required
              - …
        - `disabled` boolean, required
        - `originRepo` object
          - `author` union, required
            - object
              - …
            - object
              - …
          - `name` string, required
        - `ai_short_description` string
        - `ai_category` string
        - `trendingScore` number
        - `resourceGroup` object
          - `id` string, required
          - `name` string, required
          - `numUsers` number
        - `tags` string[], required
        - `authorData` union
          - object
            - `_id` string, required
            - `avatarUrl` string, required
            - `fullname` string, required
            - `name` string, required
            - `isHf` boolean, required
            - `isHfAdmin` boolean, required
            - `isMod` boolean, required
            - `followerCount` number
            - `type` 'org', required
            - `plan` 'team' | 'enterprise' | 'plus' | 'academia'
            - `isUserFollowing` boolean
          - object
            - `_id` string, required
            - `avatarUrl` string, required
            - `fullname` string, required
            - `name` string, required
            - `isHf` boolean, required
            - `isHfAdmin` boolean, required
            - `isMod` boolean, required
            - `followerCount` number
            - `type` 'user', required
            - `isPro` boolean, required
            - `isUserFollowing` boolean
            - `primaryOrg` object
              - …
        - `shortDescription` string
        - `semanticRelevancyScore` number
        - `featured` boolean, required
        - `visibility` 'public' | 'private' | 'protected', required
        - `type` 'space', required
      - object
        - `_id` string, required
        - `note` object
          - `html` string, required
          - `text` string, required
        - `gallery` string[]
        - `position` number, required
        - `id` string, required
        - `title` string, required
        - `upvotes` number, required
        - `publishedAt` string, date-time, required
        - `thumbnailUrl` string
        - `isUpvotedByUser` boolean
        - `type` 'paper', required
      - object
        - `_id` string, required
        - `note` object
          - `html` string, required
          - `text` string, required
        - `gallery` string[]
        - `position` number, required
        - `slug` string, required
        - `lastUpdated` string, date-time, required
        - `description` string
        - `owner` union, required
          - object
            - `_id` string, required
            - `avatarUrl` string, required
            - `fullname` string, required
            - `name` string, required
            - `isHf` boolean, required
            - `isHfAdmin` boolean, required
            - `isMod` boolean, required
            - `followerCount` number
            - `type` 'org', required
            - `plan` 'team' | 'enterprise' | 'plus' | 'academia'
            - `isUserFollowing` boolean
          - object
            - `_id` string, required
            - `avatarUrl` string, required
            - `fullname` string, required
            - `name` string, required
            - `isHf` boolean, required
            - `isHfAdmin` boolean, required
            - `isMod` boolean, required
            - `followerCount` number
            - `type` 'user', required
            - `isPro` boolean, required
            - `isUserFollowing` boolean
            - `primaryOrg` object
              - …
        - `title` string, required
        - `theme` 'orange' | 'blue' | 'green' | 'purple' | 'pink' | 'indigo', required
        - `upvotes` number, required
        - `isUpvotedByUser` boolean, required
        - `shareUrl` string, required
        - `id` string, required
        - `numberItems` number, required
        - `type` 'collection', required
      - object
        - `_id` string, required
        - `note` object
          - `html` string, required
          - `text` string, required
        - `gallery` string[]
        - `position` number, required
        - `author` string, required
        - `id` string, required
        - `private` boolean, nullable
        - `createdAt` string, date-time, required
        - `updatedAt` string, date-time, required
        - `size` number, required — The amount of storage used by the bucket in bytes
        - `totalFiles` number, required — The total number of files in the bucket
        - `repoType` 'bucket', required
        - `adminTags` string[]
        - `disabled` object
          - `reason` string, required
          - `hideReadme` boolean
        - `cdnRegions` object[], required
          - `provider` 'gcp' | 'aws', required
          - `region` 'us' | 'eu', required
        - `resourceGroup` object
          - `id` string, required
          - `name` string, required
          - `numUsers` number
        - `type` 'bucket', required

---

[API](https://skmtc.net/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.net/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/versions/6ab9f7d9cfb5/schema)
