Drone Secrets API

Secret variable management for repos and organizations.

Operations 11

GET /api/repos/{namespace}/{name}/secrets List repository secrets #
POST /api/repos/{namespace}/{name}/secrets Create a repository secret #
GET /api/repos/{namespace}/{name}/secrets/{secret} Get a repository secret #
PATCH /api/repos/{namespace}/{name}/secrets/{secret} Update a repository secret #
DELETE /api/repos/{namespace}/{name}/secrets/{secret} Delete a repository secret #
GET /api/secrets List all organization secrets #
GET /api/secrets/{namespace} List namespace secrets #
POST /api/secrets/{namespace} Create a namespace secret #
GET /api/secrets/{namespace}/{secret} Get a namespace secret #
PATCH /api/secrets/{namespace}/{secret} Update a namespace secret #
DELETE /api/secrets/{namespace}/{secret} Delete a namespace 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/drone-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

drone-secrets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Drone REST Builds Secrets API
  description: The Drone REST API provides programmatic access to the Drone CI/CD platform, enabling management of builds, repositories, secrets, cron jobs, templates, and user accounts. Authentication is performed using bearer tokens retrieved from the Drone user interface profile page.
  version: 1.0.0
  contact:
    name: Drone Support
    url: https://docs.drone.io/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://your-drone-server
  description: Your self-hosted Drone server
security:
- BearerAuth: []
tags:
- name: Secrets
  description: Secret variable management for repos and organizations.
paths:
  /api/repos/{namespace}/{name}/secrets:
    parameters:
    - name: namespace
      in: path
      required: true
      schema:
        type: string
    - name: name
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: listRepoSecrets
      summary: List repository secrets
      description: Returns a list of all secrets for the specified repository.
      tags:
      - Secrets
      responses:
        '200':
          description: List of secrets.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Secret'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createRepoSecret
      summary: Create a repository secret
      description: Creates a new secret for the specified repository.
      tags:
      - Secrets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Secret'
      responses:
        '200':
          description: Created secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/repos/{namespace}/{name}/secrets/{secret}:
    parameters:
    - name: namespace
      in: path
      required: true
      schema:
        type: string
    - name: name
      in: path
      required: true
      schema:
        type: string
    - name: secret
      in: path
      required: true
      schema:
        type: string
      description: The secret name.
    get:
      operationId: getRepoSecret
      summary: Get a repository secret
      description: Returns a secret by name for the specified repository.
      tags:
      - Secrets
      responses:
        '200':
          description: Secret details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateRepoSecret
      summary: Update a repository secret
      description: Updates an existing secret for the specified repository.
      tags:
      - Secrets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Secret'
      responses:
        '200':
          description: Updated secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: deleteRepoSecret
      summary: Delete a repository secret
      description: Deletes a secret from the specified repository.
      tags:
      - Secrets
      responses:
        '204':
          description: Secret deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/secrets:
    get:
      operationId: listOrgSecrets
      summary: List all organization secrets
      description: Returns a list of all organization-level secrets. Requires admin privileges.
      tags:
      - Secrets
      responses:
        '200':
          description: List of secrets.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Secret'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/secrets/{namespace}:
    parameters:
    - name: namespace
      in: path
      required: true
      schema:
        type: string
      description: The organization namespace.
    get:
      operationId: listNamespaceSecrets
      summary: List namespace secrets
      description: Returns a list of all secrets for the specified namespace/organization.
      tags:
      - Secrets
      responses:
        '200':
          description: List of secrets.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Secret'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createNamespaceSecret
      summary: Create a namespace secret
      description: Creates a new secret for the specified namespace/organization.
      tags:
      - Secrets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Secret'
      responses:
        '200':
          description: Created secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/secrets/{namespace}/{secret}:
    parameters:
    - name: namespace
      in: path
      required: true
      schema:
        type: string
    - name: secret
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: getNamespaceSecret
      summary: Get a namespace secret
      description: Returns a secret by name from the specified namespace.
      tags:
      - Secrets
      responses:
        '200':
          description: Secret details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
        '401':
          $ref: '#/components/responses/Unauthorized'
    patch:
      operationId: updateNamespaceSecret
      summary: Update a namespace secret
      description: Updates a secret in the specified namespace.
      tags:
      - Secrets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Secret'
      responses:
        '200':
          description: Updated secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: deleteNamespaceSecret
      summary: Delete a namespace secret
      description: Deletes a secret from the specified namespace.
      tags:
      - Secrets
      responses:
        '204':
          description: Secret deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Secret:
      type: object
      description: Represents a secret variable stored in Drone.
      properties:
        namespace:
          type: string
        name:
          type: string
        data:
          type: string
        pull_request:
          type: boolean
        pull_request_push:
          type: boolean
    Error:
      type: object
      description: API error response.
      properties:
        code:
          type: integer
        message:
          type: string
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication credentials missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token retrieved from the Drone user interface profile page.