API Reference
Book a demoLogin
DocumentationGuidesAPI Reference

Made withby Cloudsmith © 2026

DocsGuidesAPI ReferenceTerms&PrivacyContact
  • General
    • Introduction
    • Rate Limits
    • Error Handling
  • API
    • Audit Log
      • Namespace Listget
      • Repo Listget
    • Broadcasts
      • Create Broadcast Tokenpost
    • Deny Policy
      • Createpost
      • Deletedelete
      • Listget
      • Partial Updatepatch
      • Readget
      • Updateput
    • Distros
      • Listget
      • Readget
    • Entitlements
      • Createpost
      • Deletedelete
      • Disablepost
      • Enablepost
      • Listget
      • Partial Updatepatch
      • Readget
      • Refreshpost
      • Resetpost
      • Syncpost
      • Toggle Private Broadcastspost
    • Files
      • Abortpost
      • Completepost
      • Createpost
      • Infoget
      • Validatepost
    • Formats
      • Listget
      • Readget
    • Invites
      • Createpost
      • Deletedelete
      • Extendpost
      • Listget
      • Partial Updatepatch
      • Resendpost
    • License Policy
      • Evaluation
        • Createpost
        • Listget
        • Readget
      • Createpost
      • Deletedelete
      • Listget
      • Partial Updatepatch
      • Readget
      • Updateput
    • Members
      • Update
        • Rolepatch
        • Visibilitypatch
      • Deletedelete
      • Listget
      • Partial Updatepatch
      • Readget
      • Refreshpost
      • Removeget
    • Metadata
      • Packages
        • Createpost
        • Destroydelete
        • Listget
        • Partial Updatepatch
        • Retrieveget
      • Validate Createpost
    • Metrics
      • Entitlements
        • Account Listget
        • Repo Listget
      • Packages Listget
    • Namespaces
      • Listget
      • Readget
    • Openid Connect
      • Dynamic Mappings
        • Listget
        • Readget
      • Createpost
      • Deletedelete
      • Listget
      • Partial Updatepatch
      • Readget
      • Updateput
    • Orgs
      • Deletedelete
      • Listget
      • Readget
    • Packages
      • Upload
        • Alpinepost
        • Cargopost
        • Cocoapodspost
        • Composerpost
        • Conanpost
        • Condapost
        • Cranpost
        • Dartpost
        • Debpost
        • Dockerpost
        • Genericpost
        • Gopost
        • Helmpost
        • Hexpost
        • Huggingfacepost
        • Luarockspost
        • Mavenpost
        • Mcppost
        • Npmpost
        • Nugetpost
        • P2post
        • Pythonpost
        • Rawpost
        • Rpmpost
        • Rubypost
        • Swiftpost
        • Terraformpost
        • Vagrantpost
        • Vsxpost
      • Validate Upload
        • Alpinepost
        • Cargopost
        • Cocoapodspost
        • Composerpost
        • Conanpost
        • Condapost
        • Cranpost
        • Dartpost
        • Debpost
        • Dockerpost
        • Genericpost
        • Gopost
        • Helmpost
        • Hexpost
        • Huggingfacepost
        • Luarockspost
        • Mavenpost
        • Mcppost
        • Npmpost
        • Nugetpost
        • P2post
        • Pythonpost
        • Rawpost
        • Rpmpost
        • Rubypost
        • Swiftpost
        • Terraformpost
        • Vagrantpost
        • Vsxpost
      • Copypost
      • Deletedelete
      • Dependenciesget
      • Groups Listget
      • Listget
      • Movepost
      • Quarantinepost
      • Readget
      • Resyncpost
      • Scanpost
      • Statusget
      • Tagpost
      • Update Licensepatch
    • Quota
      • Oss
        • History Readget
        • Readget
      • History Readget
      • Readget
    • Recycle Bin
      • Actionpost
      • Listget
    • Repo Retention
      • Partial Updatepatch
      • Readget
    • Repos
      • Connected
        • Createpost
        • Deletedelete
        • Listget
        • Partial Updatepatch
        • Readget
        • Updateput
      • Ecdsa
        • Createpost
        • Listget
        • Regeneratepost
      • Ed25519
        • Createpost
        • Listget
        • Regeneratepost
      • Geoip
        • Disablepost
        • Enablepost
        • Partial Updatepatch
        • Readget
        • Testpost
        • Updateput
      • Gpg
        • Createpost
        • Listget
        • Regeneratepost
      • Privileges
        • Listget
        • Partial Updatepatch
        • Updateput
      • Rsa
        • Createpost
        • Listget
        • Regeneratepost
      • Upstream
        • Alpine
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Cargo
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Composer
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Conda
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Cran
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Dart
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Deb
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Docker
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Generic
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Go
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Helm
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Hex
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Huggingface
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Maven
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Npm
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Nuget
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Python
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Rpm
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Ruby
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
        • Swift
          • Createpost
          • Deletedelete
          • Listget
          • Partial Updatepatch
          • Readget
          • Updateput
      • X509
        • Ecdsa Listget
        • Rsa Listget
      • Createpost
      • Deletedelete
      • Namespace Listget
      • Partial Updatepatch
      • Readget
      • Transfer Regionpost
      • User Listget
    • Saml Authentication
      • Partial Updatepatch
      • Readget
    • Saml Group Sync
      • Createpost
      • Deletedelete
      • Disablepost
      • Enablepost
      • Listget
      • Statusget
    • Services
      • Createpost
      • Deletedelete
      • Listget
      • Partial Updatepatch
      • Readget
      • Refreshpost
    • Storage Regions
      • Listget
      • Readget
    • Teams
      • Members
        • Createpost
        • Listget
        • Updateput
      • Createpost
      • Deletedelete
      • Listget
      • Partial Updatepatch
      • Readget
    • User
      • Tokens
        • Createpost
        • Listget
        • Refreshput
      • Selfget
      • Token Createpost
    • Vulnerabilities
      • Namespace Listget
      • Package Listget
      • Readget
      • Repo Listget
    • Vulnerability Policy
      • Evaluation
        • Createpost
        • Listget
        • Readget
      • Createpost
      • Deletedelete
      • Listget
      • Partial Updatepatch
      • Readget
      • Updateput
    • Webhooks
      • Createpost
      • Deletedelete
      • Listget
      • Partial Updatepatch
      • Readget
    • Workspaces Policies
      • Actions
        • Createpost
        • Destroydelete
        • Listget
        • Partial Updatepatch
        • Retrieveget
        • Updateput
      • Decision Logs V1
        • Listget
        • Retrieveget
      • Createpost
      • Destroydelete
      • Listget
      • Partial Updatepatch
      • Retrieveget
      • Simulate Listget
      • Updateput
    • Api Repos Geoip Statusget
    • Badges Version Listget
    • Bulk Actionpost
    • Custom Domains Listget
    • License Policy Violation Listget
    • Rates Limits Listget
    • Status Check Basicget
    • Users Profile Readget
    • Vulnerability Policy Violation Listget

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