API Reference
Book a demoLogin
DocumentationGuidesAPI Reference

Made withby Cloudsmith © 2026

DocsGuidesAPI ReferenceTerms&PrivacyContact
  • General
    • Introduction
    • Rate Limits
    • Error Handling
  • API
    • Audit Log
      • Namespace List
        get
      • Repo List
        get
    • Broadcasts
      • Create Broadcast Token
        post
    • Deny Policy
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Update
        put
    • Distros
      • List
        get
      • Read
        get
    • Entitlements
      • Create
        post
      • Delete
        delete
      • Disable
        post
      • Enable
        post
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Refresh
        post
      • Reset
        post
      • Sync
        post
      • Toggle Private Broadcasts
        post
    • Files
      • Abort
        post
      • Complete
        post
      • Create
        post
      • Info
        get
      • Validate
        post
    • Formats
      • List
        get
      • Read
        get
    • Invites
      • Create
        post
      • Delete
        delete
      • Extend
        post
      • List
        get
      • Partial Update
        patch
      • Resend
        post
    • License Policy
      • Evaluation
        • Create
          post
        • List
          get
        • Read
          get
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Update
        put
    • Members
      • Update
        • Role
          patch
        • Visibility
          patch
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Refresh
        post
      • Remove
        get
    • Metadata
      • Packages
        • Create
          post
        • Destroy
          delete
        • List
          get
        • Partial Update
          patch
        • Retrieve
          get
      • Validate Create
        post
    • Metrics
      • Entitlements
        • Account List
          get
        • Repo List
          get
      • Packages List
        get
    • Namespaces
      • List
        get
      • Read
        get
    • Openid Connect
      • Dynamic Mappings
        • List
          get
        • Read
          get
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Update
        put
    • Orgs
      • Delete
        delete
      • List
        get
      • Read
        get
    • Packages
      • Metadata
        • Create
          post
        • Destroy
          delete
        • List
          get
        • Partial Update
          patch
        • Retrieve
          get
      • Upload
        • Alpine
          post
        • Cargo
          post
        • Cocoapods
          post
        • Composer
          post
        • Conan
          post
        • Conda
          post
        • Cran
          post
        • Dart
          post
        • Deb
          post
        • Docker
          post
        • Generic
          post
        • Go
          post
        • Helm
          post
        • Hex
          post
        • Huggingface
          post
        • Luarocks
          post
        • Maven
          post
        • Mcp
          post
        • Npm
          post
        • Nuget
          post
        • P2
          post
        • Python
          post
        • Raw
          post
        • Rpm
          post
        • Ruby
          post
        • Swift
          post
        • Terraform
          post
        • Vagrant
          post
        • Vsx
          post
      • Validate Upload
        • Alpine
          post
        • Cargo
          post
        • Cocoapods
          post
        • Composer
          post
        • Conan
          post
        • Conda
          post
        • Cran
          post
        • Dart
          post
        • Deb
          post
        • Docker
          post
        • Generic
          post
        • Go
          post
        • Helm
          post
        • Hex
          post
        • Huggingface
          post
        • Luarocks
          post
        • Maven
          post
        • Mcp
          post
        • Npm
          post
        • Nuget
          post
        • P2
          post
        • Python
          post
        • Raw
          post
        • Rpm
          post
        • Ruby
          post
        • Swift
          post
        • Terraform
          post
        • Vagrant
          post
        • Vsx
          post
      • Copy
        post
      • Delete
        delete
      • Dependencies
        get
      • Groups List
        get
      • List
        get
      • Move
        post
      • Quarantine
        post
      • Read
        get
      • Resync
        post
      • Scan
        post
      • Status
        get
      • Tag
        post
      • Update License
        patch
    • Quota
      • Oss
        • History Read
          get
        • Read
          get
      • History Read
        get
      • Read
        get
    • Recycle Bin
      • Action
        post
      • List
        get
    • Repo Retention
      • Partial Update
        patch
      • Read
        get
    • Repos
      • Connected
        • Create
          post
        • Delete
          delete
        • List
          get
        • Partial Update
          patch
        • Read
          get
        • Update
          put
      • Ecdsa
        • Create
          post
        • List
          get
        • Regenerate
          post
      • Geoip
        • Disable
          post
        • Enable
          post
        • Partial Update
          patch
        • Read
          get
        • Test
          post
        • Update
          put
      • Gpg
        • Create
          post
        • List
          get
        • Regenerate
          post
      • Privileges
        • List
          get
        • Partial Update
          patch
        • Update
          put
      • Rsa
        • Create
          post
        • List
          get
        • Regenerate
          post
      • Upstream
        • Alpine
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Cargo
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Composer
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Conda
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Cran
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Dart
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Deb
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Docker
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Generic
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Go
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Helm
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Hex
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Huggingface
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Maven
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Npm
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Nuget
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Python
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Rpm
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Ruby
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Swift
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
      • X509
        • Ecdsa List
          get
        • Rsa List
          get
      • Create
        post
      • Delete
        delete
      • Namespace List
        get
      • Partial Update
        patch
      • Read
        get
      • Transfer Region
        post
      • User List
        get
    • Saml Authentication
      • Partial Update
        patch
      • Read
        get
    • Saml Group Sync
      • Create
        post
      • Delete
        delete
      • Disable
        post
      • Enable
        post
      • List
        get
      • Status
        get
    • Services
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Refresh
        post
    • Storage Regions
      • List
        get
      • Read
        get
    • Teams
      • Members
        • Create
          post
        • List
          get
        • Update
          put
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
    • User
      • Tokens
        • Create
          post
        • List
          get
        • Refresh
          put
      • Self
        get
      • Token Create
        post
    • Vulnerabilities
      • Namespace List
        get
      • Package List
        get
      • Read
        get
      • Repo List
        get
    • Vulnerability Policy
      • Evaluation
        • Create
          post
        • List
          get
        • Read
          get
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Update
        put
    • Webhooks
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
    • Workspaces Policies
      • Actions
        • Create
          post
        • Destroy
          delete
        • List
          get
        • Partial Update
          patch
        • Retrieve
          get
        • Update
          put
      • Decision Logs V1
        • List
          get
        • Retrieve
          get
      • Create
        post
      • Destroy
        delete
      • List
        get
      • Partial Update
        patch
      • Retrieve
        get
      • Simulate List
        get
      • Update
        put
    • Api Repos Geoip Status
      get
    • Badges Version List
      get
    • Bulk Action
      post
    • License Policy Violation List
      get
    • Rates Limits List
      get
    • Status Check Basic
      get
    • Users Profile Read
      get
    • Vulnerability Policy Violation List
      get

The Cloudsmith REST (REpresentational State Transfer) API (Application Programming Interface) provides everything you love about Cloudsmith but in a programmatic machine-accessible RESTful format. We believe in providing a rich API to enable exciting and powerful integrations, hopefully in ways that we couldn't imagine - just like your favourite brick-like toys.

Versioning

The API is versioned to help reduce future compatibility issues if we need to change the API.

Authentication

Most resources provided by the API require some form of authentication, which identifies the client to the API in the context of a particular user. Other resources are accessible anonymously, so they don't need authentication (although they may provide expanded detail for authenticated users). You can use the following methods to authenticate:

API Key Authentication

The most straightforward way to authenticate against the API is by using your personal API key. You can find your API Key within your User Settings or you can request (or reset) it via the Users Token API Endpoint. Cloudsmith Entitlement Tokens cannot be used to authenticate to the Cloudsmith API. Entitlement Tokens are used to authenticate for package downloads only.

You can specify your API Key via the Authorization header when making requests (replacing key with your actual API Key):

bash
curl -H "Authorization: token $key" https://api.cloudsmith.io/user/self/

Specifying an invalid API Key will result in an 401 Unauthorized status code, and the body will specify that an invalid token was received. Let's see it in action:

bash
curl -i -H "Authorization: token foobar" -X OPTIONS https://api.cloudsmith.io/user/self/

HTTP/2 401
date: Thu, 09 Mar 2023 16:55:35 GMT
server: Cloudsmith MCP

{"detail": "Invalid token."}

Using Service Accounts

If your API key is given to someone else they will be able to access the API in its entirety as you. This should be viewed as a security risk and every effort should be taken to protect your API Key from disclosure. If you need to add read-only access, we suggest creating a lesser privileged service account and using that instead for scripts/automation.

Pagination

API requests that return more than one item may be paginated, which simply means the total number of items is split into logical pages, in the same way that a book is split into pages. Each page will have a certain number of items in it from one up to the page limit - empty datasets are never paginated.

When pagination is enabled, the following query string parameters are supported:

ParameterDescription
pageThe current page of the pagination dataset to view. The page number is 1-based, so omitting or specifying a non-positive number will return the first page.
page_sizeThe page size to divide the dataset into. The default amount (if not specified) is 30 items per page and the maximum configurable is 500 items per page.

When pagination occurs, the following headers will be represent in API responses:

HeaderDescription
Link (based on H+C6988)Hypermedia links for the previous page (if any) and for the next page (if any). Some of which may require expansion as URI templates.
X-Pagination-CountThe total number of items in the dataset.
X-Pagination-PageThe number of the current page.
X-Pagination-PageTotalThe total number of pages in the dataset.
X-Pagination-PageSizeThe size of each page in the dataset.

The Link header can contain the following rel values:

NameDescription
firstThe link relation to the first page of results. This will only be present if there is more than one page.
prevThe link relation to the previous page of results. This will only be present if the client has requested a page greater than 1.
nextThe link relation to the next page of results. This will only be present if the client has requested a page less than the last/final page.
lastThe link relation to the last/final page of results. This will only be present if there is more than one page.

Let's see it in action

bash
curl -i -H "Authorization: token $key" 'https://api.cloudsmith.io/package/example/repo/packages/?page=2&page_size=1'
HTTP/1.0 200 OK
Allow: GET, OPTIONS
Content-Type: application/json
Link: <https://api.cloudsmith.io/package/example/repo/packages/?page=1>; rel="first", <https://api.cloudsmith.io/package/example/repo/packages/?page=1>; rel="prev", <https://api.cloudsmith.io/package/example/repo/packages/?page=3>; rel="next", <https://api.cloudsmith.io/package/example/repo/packages/?page=3>; rel="last"
X-Pagination-Count: 3
X-Pagination-Page: 2
X-Pagination-PageTotal: 3
X-Pagination-PageSize: 1
Server: Cloudsmith MCP
Date: Sun, 29 Jan 2017 18:40:55 GMT

[snip]

Page Sizes / Remainders

If the page size is 100 and the dataset size is 400, then there will be four pages available for retrieval. If the dataset isn't cleanly divided by the page size, the remainder will be on the final page. For example, if the page size is 100 and the dataset size is 350 then the last (4th) page will have 50 items on it.

Updated 6 days ago