Cloudsmith user API

The user API from Cloudsmith — 4 operation(s) for user.

Operations 5

GET /user/self/ Provide a brief for the current user (if any). #
POST /user/token/ Create or retrieve API token for a user. #
GET /user/tokens/ Retrieve the API key assigned to the user that is currently authenticated. #
POST /user/tokens/ Create an API key for the user that is currently authenticated. #
PUT /user/tokens/{slug_perm}/refresh/ Refresh the specified API key for the user that is currently authenticated. #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cloudsmith-user-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cloudsmith-user-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloudsmith API (v1) audit-log User API
  description: The API to the Cloudsmith Service
  termsOfService: https://help.cloudsmith.io
  contact:
    name: Cloudsmith Support
    url: https://help.cloudsmith.io
    email: support@cloudsmith.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: v1
servers:
- url: https://api.cloudsmith.io/
security:
- apikey: []
- basic: []
tags:
- name: user
paths:
  /user/self/:
    parameters: []
    get:
      operationId: user_self
      summary: Provide a brief for the current user (if any).
      description: Provide a brief for the current user (if any).
      responses:
        '200':
          description: Retrieved brief for the current user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserBrief'
        '400':
          description: Request could not be processed (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '422':
          description: Missing or invalid parameters (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      tags:
      - user
  /user/token/:
    parameters: []
    post:
      operationId: user_token_create
      summary: Create or retrieve API token for a user.
      description: 'Handles both:

        - Users authenticating with basic credentials to get a token

        - Two-factor authentication flow'
      responses:
        '201':
          description: Retrieved/created user API token/key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAuthToken'
        '403':
          description: Locked out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '422':
          description: Failed to authenticate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '400':
          description: Request could not be processed (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      tags:
      - user
      security:
      - basic: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserAuthTokenRequest'
  /user/tokens/:
    parameters: []
    get:
      operationId: user_tokens_list
      summary: Retrieve the API key assigned to the user that is currently authenticated.
      description: Retrieve the API key assigned to the user that is currently authenticated.
      parameters:
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        schema:
          type: integer
      - name: page_size
        in: query
        description: Number of results to return per page.
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: Retrieved the API key for the user that is currently authenticated.
          content:
            application/json:
              schema:
                required:
                - results
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/UserAuthenticationToken'
        '400':
          description: Request could not be processed (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '422':
          description: Missing or invalid parameters (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      tags:
      - user
    post:
      operationId: user_tokens_create
      summary: Create an API key for the user that is currently authenticated.
      description: Create an API key for the user that is currently authenticated.
      responses:
        '201':
          description: Created an API key for the user that is currently authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAuthenticationToken'
        '400':
          description: User has already created an API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '422':
          description: Missing or invalid parameters (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      tags:
      - user
  /user/tokens/{slug_perm}/refresh/:
    parameters:
    - name: slug_perm
      in: path
      required: true
      schema:
        type: string
    put:
      operationId: user_tokens_refresh
      summary: Refresh the specified API key for the user that is currently authenticated.
      description: Refresh the specified API key for the user that is currently authenticated.
      responses:
        '200':
          description: Successfully refreshed the API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAuthenticationToken'
        '404':
          description: The specified API key cannot be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '400':
          description: Request could not be processed (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '422':
          description: Missing or invalid parameters (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      tags:
      - user
components:
  schemas:
    UserAuthTokenRequest:
      type: object
      properties:
        email:
          title: Email
          description: Email address to authenticate with
          type: string
          format: email
          minLength: 1
        password:
          title: Password
          description: Password to authenticate with
          type: string
          minLength: 1
        totp_token:
          title: Two-factor code
          description: Two-factor authentication code
          type: string
          minLength: 1
    ErrorDetail:
      required:
      - detail
      type: object
      properties:
        detail:
          title: Detail
          description: An extended message for the response.
          type: string
          minLength: 1
        fields:
          title: Fields
          description: 'A Dictionary of related errors where key: Field and value: Array of Errors related to that field'
          type: object
          additionalProperties:
            type: array
            items:
              type: string
              minLength: 1
    UserAuthenticationToken:
      type: object
      properties:
        created:
          title: Created
          description: The time at which the API key was created.
          type: string
          format: date-time
          readOnly: true
        key:
          title: Key
          description: The unique API key used for authentication. This will be obfuscated on read-only HTTP methods.
          type: string
          readOnly: true
        slug_perm:
          title: Slug perm
          description: The slug_perm for token.
          type: string
          readOnly: true
    UserAuthToken:
      type: object
      properties:
        token:
          title: Token
          description: API token for the authenticated user
          type: string
          readOnly: true
          minLength: 1
        two_factor_required:
          title: Two factor required
          description: Flag indicating whether a 2FA code is required to complete authentication
          type: boolean
          readOnly: true
        two_factor_token:
          title: Two factor token
          description: Token to use when providing 2FA code
          type: string
          readOnly: true
          minLength: 1
    UserBrief:
      type: object
      properties:
        authenticated:
          title: Authenticated
          description: If true then you're logged in as a user.
          type: boolean
          readOnly: true
        email:
          title: Email address
          description: Your email address that we use to contact you. This is only visible to you.
          type:
          - string
          - 'null'
          format: email
          maxLength: 254
          minLength: 1
        name:
          title: Name
          description: The full name of the user (if any).
          type:
          - string
          - 'null'
          readOnly: true
          minLength: 1
        profile_url:
          title: Profile url
          description: The URL for the full profile of the user.
          type:
          - string
          - 'null'
          format: uri
          readOnly: true
        self_url:
          title: Self url
          type: string
          readOnly: true
        slug:
          title: Slug
          type:
          - string
          - 'null'
          readOnly: true
        slug_perm:
          title: Slug perm
          type:
          - string
          - 'null'
          readOnly: true
  securitySchemes:
    apikey:
      type: apiKey
      name: X-Api-Key
      in: header
    basic:
      type: http
      scheme: basic