Coder Secrets API

The Secrets API from Coder — 2 operation(s) for secrets.

Operations 5

GET /api/v2/users/{user}/secrets List user secrets #
POST /api/v2/users/{user}/secrets Create a new user secret #
GET /api/v2/users/{user}/secrets/{name} Get a user secret by name #
DELETE /api/v2/users/{user}/secrets/{name} Delete a user secret #
PATCH /api/v2/users/{user}/secrets/{name} Update a user secret #

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/coder-secrets-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

coder-secrets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Coderd is the service created by running coder server. It is a thin API that connects workspaces, provisioners and users. coderd stores its state in Postgres and is the only service that communicates with Postgres.
  title: Coder Agents Secrets API
  termsOfService: https://coder.com/legal/terms-of-service
  contact:
    name: API Support
    url: https://coder.com
    email: support@coder.com
  license:
    name: AGPL-3.0
    url: https://github.com/coder/coder/blob/main/LICENSE
  version: '2.0'
servers:
- url: https://{coderHost}/api/v2
  description: Coder instance
  variables:
    coderHost:
      default: coder.example.com
      description: Your Coder deployment hostname
security:
- CoderSessionToken: []
tags:
- name: Secrets
paths:
  /api/v2/users/{user}/secrets:
    get:
      operationId: list-user-secrets
      summary: List user secrets
      tags:
      - Secrets
      security:
      - CoderSessionToken: []
      parameters:
      - name: user
        in: path
        required: true
        description: User ID, username, or me
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/codersdk.UserSecret'
    post:
      operationId: create-a-new-user-secret
      summary: Create a new user secret
      tags:
      - Secrets
      security:
      - CoderSessionToken: []
      parameters:
      - name: user
        in: path
        required: true
        description: User ID, username, or me
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/codersdk.CreateUserSecretRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/codersdk.UserSecret'
  /api/v2/users/{user}/secrets/{name}:
    get:
      operationId: get-a-user-secret-by-name
      summary: Get a user secret by name
      tags:
      - Secrets
      security:
      - CoderSessionToken: []
      parameters:
      - name: user
        in: path
        required: true
        description: User ID, username, or me
        schema:
          type: string
      - name: name
        in: path
        required: true
        description: Secret name
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/codersdk.UserSecret'
    delete:
      operationId: delete-a-user-secret
      summary: Delete a user secret
      tags:
      - Secrets
      security:
      - CoderSessionToken: []
      parameters:
      - name: user
        in: path
        required: true
        description: User ID, username, or me
        schema:
          type: string
      - name: name
        in: path
        required: true
        description: Secret name
        schema:
          type: string
      responses:
        '204':
          description: No Content
    patch:
      operationId: update-a-user-secret
      summary: Update a user secret
      tags:
      - Secrets
      security:
      - CoderSessionToken: []
      parameters:
      - name: user
        in: path
        required: true
        description: User ID, username, or me
        schema:
          type: string
      - name: name
        in: path
        required: true
        description: Secret name
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/codersdk.UpdateUserSecretRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/codersdk.UserSecret'
components:
  schemas:
    codersdk.CreateUserSecretRequest:
      type: object
      properties:
        description:
          type: string
        env_name:
          type: string
        file_path:
          type: string
        name:
          type: string
        value:
          type: string
    codersdk.UpdateUserSecretRequest:
      type: object
      properties:
        description:
          type: string
        env_name:
          type: string
        file_path:
          type: string
        value:
          type: string
    codersdk.UserSecret:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
        description:
          type: string
        env_name:
          type: string
        file_path:
          type: string
        id:
          type: string
          format: uuid
        name:
          type: string
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    CoderSessionToken:
      type: apiKey
      in: header
      name: Coder-Session-Token