Runtime Secrets API

The secrets API from Runtime, for secrets.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

GET /v2/secrets Lists the organization's secrets by name, without their values #
GET /v2/secrets/{name} Returns a secret, without its value #
PUT /v2/secrets/{name} Stores or replaces a secret with its value, or changes one without it. #
DELETE /v2/secrets/{name} Deletes a secret and its value: no request carries it from then on, open… #

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/withruntime-com:withruntime-com-secrets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

withruntime-com-secrets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Runtime API v2 Secrets API
  version: '2026-10-27'
servers:
- url: https://api.withruntime.com
security:
- bearer: []
tags:
- name: Secrets
paths:
  /v2/secrets:
    get:
      operationId: secrets.list
      summary: Lists the organization's secrets by name, without their values
      tags:
      - Secrets
      x-action: secrets:list
      parameters:
      - name: cursor
        in: query
        required: false
        description: 'Where the page starts: a page''s `next`.'
        schema:
          type: string
      - name: limit
        in: query
        required: false
        description: The most items the page holds.
        schema:
          type: integer
          default: 50
          minimum: 1
          maximum: 200
      responses:
        '400':
          description: 'An error: invalid_request.'
          x-error-codes:
          - invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'An error: unauthorized.'
          x-error-codes:
          - unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'An error: forbidden.'
          x-error-codes:
          - forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'An error: rate_limited.'
          x-error-codes:
          - rate_limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'An error: internal.'
          x-error-codes:
          - internal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 'An error: unavailable.'
          x-error-codes:
          - unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: A page of Secret.
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Secret'
                  next:
                    type: string
                    description: Where the next page starts, as the next call's cursor; none on the last page.
      x-mcp-tool: runtime_secrets_list
      x-idempotent: true
  /v2/secrets/{name}:
    get:
      operationId: secrets.get
      summary: Returns a secret, without its value
      tags:
      - Secrets
      x-action: secrets:get
      parameters:
      - name: name
        in: path
        required: true
        description: Its name.
        schema:
          type: string
      - name: wait
        in: query
        required: false
        description: Seconds to wait, at most 60, for its state to differ from `ifState`; it answers once it does, or as it is when the wait ends.
        schema:
          type: number
          maximum: 60
          minimum: 0
      - name: ifState
        in: query
        required: false
        description: The state the caller last read, which `wait` waits for it to leave.
        schema:
          type: string
      responses:
        '400':
          description: 'An error: invalid_request.'
          x-error-codes:
          - invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'An error: unauthorized.'
          x-error-codes:
          - unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'An error: forbidden.'
          x-error-codes:
          - forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'An error: not_found.'
          x-error-codes:
          - not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'An error: rate_limited.'
          x-error-codes:
          - rate_limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'An error: internal.'
          x-error-codes:
          - internal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 'An error: unavailable.'
          x-error-codes:
          - unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: A secret, without its value.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
      x-mcp-tool: runtime_secrets_get
      x-idempotent: true
    put:
      operationId: secrets.set
      summary: Stores or replaces a secret with its value, or changes one without it.
      tags:
      - Secrets
      x-action: secrets:write
      parameters:
      - name: name
        in: path
        required: true
        description: Its name.
        schema:
          type: string
      responses:
        '400':
          description: 'An error: invalid_request.'
          x-error-codes:
          - invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'An error: unauthorized.'
          x-error-codes:
          - unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'An error: forbidden.'
          x-error-codes:
          - forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'An error: not_found.'
          x-error-codes:
          - not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 'An error: conflict.'
          x-error-codes:
          - conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'An error: rate_limited.'
          x-error-codes:
          - rate_limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'An error: internal.'
          x-error-codes:
          - internal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 'An error: unavailable.'
          x-error-codes:
          - unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: A secret, without its value.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
      x-mcp-tool: runtime_secrets_set
      x-idempotent: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecretSet'
    delete:
      operationId: secrets.delete
      summary: 'Deletes a secret and its value: no request carries it from then on, open…'
      tags:
      - Secrets
      x-action: secrets:delete
      parameters:
      - name: name
        in: path
        required: true
        description: Its name.
        schema:
          type: string
      responses:
        '400':
          description: 'An error: invalid_request.'
          x-error-codes:
          - invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'An error: unauthorized.'
          x-error-codes:
          - unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'An error: forbidden.'
          x-error-codes:
          - forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'An error: not_found.'
          x-error-codes:
          - not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 'An error: conflict.'
          x-error-codes:
          - conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'An error: rate_limited.'
          x-error-codes:
          - rate_limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'An error: internal.'
          x-error-codes:
          - internal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 'An error: unavailable.'
          x-error-codes:
          - unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: A secret, without its value.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
      x-mcp-tool: runtime_secrets_delete
      x-idempotent: true
components:
  schemas:
    SecretGit:
      type: object
      description: What a git push carrying a secret may update.
      properties:
        push:
          type: array
          items:
            type: string
          description: 'The branches a push may update: 1 to 16 patterns of 12 to 256 characters, `refs/heads/` then a branch name, `*` only at the end, and `{label.<key>}` for the machine''s own label right below a fixed first segment (`refs/heads/task/{label.task}`). A tag, a delete or any other ref is refused, and so is every API write that moves a ref. Opening or editing a pull request, reviewing it, and commenting on a pull request or an issue go under any rule that allows the path. Any other API write goes only when a rule names its exact path, with no `*`. A secret with no rules makes no API write.'
      required:
      - push
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          - requestId
          - hint
          - retryable
          properties:
            code:
              type: string
              enum:
              - invalid_request
              - unauthorized
              - payment_required
              - card_required
              - forbidden
              - limit_exceeded
              - not_found
              - method_not_allowed
              - already_exists
              - conflict
              - too_large
              - rate_limited
              - internal
              - not_implemented
              - unavailable
              - capacity_unavailable
              - timeout
            message:
              type: string
            requestId:
              type: string
              description: The answer's request-id header.
            hint:
              type: string
              description: What to do about it.
            retryable:
              type: boolean
              description: 'The same request, sent again after Retry-After, may pass: nothing was done.'
            param:
              type: string
              description: The request's field it is about.
            details:
              type: object
              description: Its case (`reason`) and the facts of it.
              properties:
                reason:
                  type: string
                  enum:
                  - invalid_request
                  - invalid_code
                  - invalid_network_rule
                  - system_label
                  - invalid_archive
                  - archive_failed
                  - not_a_directory
                  - is_a_directory
                  - exec_format_error
                  - limit_above_org
                  - unauthorized
                  - forbidden
                  - payment_required
                  - card_required
                  - card_declined
                  - public_preview_not_allowed
                  - permission_denied
                  - org_closing
                  - limit_not_set
                  - not_found
                  - route_not_found
                  - method_not_allowed
                  - image_not_found
                  - file_not_found
                  - cwd_not_found
                  - program_not_found
                  - process_not_found
                  - upload_not_found
                  - length_required
                  - already_exists
                  - name_taken
                  - conflict
                  - image_in_use
                  - not_supported
                  - precondition_failed
                  - sandbox_paused
                  - delete_protected
                  - confirmation_required
                  - idempotency_key_reused
                  - version_conflict
                  - upload_running
                  - upload_incomplete
                  - checksum_mismatch
                  - blobs_missing
                  - file_changed
                  - display_not_running
                  - browser_not_running
                  - kernel_not_installed
                  - act_failed
                  - root_unavailable
                  - image_lost
                  - archive_unavailable
                  - directory_not_empty
                  - stdin_closed
                  - stdin_busy
                  - fork_unsafe
                  - card_on_file
                  - no_card
                  - not_test_mode
                  - too_large
                  - file_too_large
                  - limit_exceeded
                  - quota_exceeded
                  - blob_store_full
                  - process_limit
                  - disk_full
                  - rate_limited
                  - transfer_limit
                  - internal
                  - sandbox_failed
                  - not_implemented
                  - previews_unavailable
                  - unavailable
                  - run_goes_on
                  - machine_restarting
                  - sign_in_unavailable
                  - secrets_unavailable
                  - billing_unavailable
                  - capacity_unavailable
                  - timeout
    SecretSet:
      type: object
      description: A secret to store or replace, or, without its value, to change.
      properties:
        visible:
          type: boolean
          description: The machine holds the value itself, in its environment variable from its start and in the file `/run/secrets/<envName>` (mode 0400, owned by root), which is rewritten within a second of each change and removed within a second of a delete or a scope that leaves the machine out. For values the proxy cannot put in, such as a database password or an SSH key. Changed only by a set with the value; false when omitted.
        hosts:
          type: array
          items:
            type: string
          description: 'The hosts its value goes to on HTTPS: a name, or `*.` and a name for every name under it. Required unless visible; refused when visible.'
        header:
          type: string
          description: The header it is set in on every request to its hosts; when omitted, its placeholder is replaced in the credential headers (Authorization, x-api-key and the like). Hidden secrets only.
        format:
          type: string
          description: The header's value, `{value}` replaced by the secret; `{value}` when omitted. Hidden secrets only.
        envName:
          type: string
          description: The environment variable that holds its placeholder (or, when visible, its value) in each machine it reaches; its name when omitted. When two secrets that reach one machine name the same variable, it holds the one first by name.
        scope:
          $ref: '#/components/schemas/SecretScope'
        policies:
          $ref: '#/components/schemas/SecretPolicies'
        value:
          type: string
          format: password
          writeOnly: true
          description: 'Its value, never answered. Hidden: 1 to 8192 visible ASCII characters and spaces, one line, since it goes into an HTTP header. Visible: 1 byte to 64 KiB of UTF-8 text with no NUL, newlines included (a PEM file, an SSH key, a service account''s JSON). With it, the set stores the secret whole, as its fields say. Without it, the set changes only the hosts, `policies.rules` and scope it names, and keeps the rest: hosts and rules only narrow, since widening needs the value, and so does a visible secret''s scope, whose machines hold its value; any other field is refused 400.'
        expectedVersion:
          type: integer
          description: Replaced only from this version; 409 otherwise.
    SecretScope:
      type: object
      description: Which machines may use a secret.
      properties:
        labelsAny:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
          description: Machines with every label of any one of these sets. Give this or `none`.
        none:
          type: boolean
          description: '`true`: no machine. Runtime alone uses the secret: it is in no machine''s requests or environment. A registry login an image import pulls with (`pullSecret`) has this scope. Give this or `labelsAny`.'
    SecretApi:
      type: object
      description: What API calls carrying a secret may do.
      properties:
        graphql:
          $ref: '#/components/schemas/SecretGraphql'
    SecretPolicies:
      type: object
      description: 'How a secret may be used, beyond its hosts: a request carries it only when every policy it holds allows it.'
      properties:
        rules:
          type: array
          items:
            $ref: '#/components/schemas/SecretRule'
          description: Only requests one of these rules allows carry it; every request to its hosts when omitted. A set with its value and without rules removes them; one without its value keeps them, or narrows them to these.
        git:
          $ref: '#/components/schemas/SecretGit'
        api:
          $ref: '#/components/schemas/SecretApi'
    Secret:
      type: object
      description: A secret, without its value.
      properties:
        visible:
          type: boolean
          description: The machine holds the value itself, in its environment variable from its start and in the file `/run/secrets/<envName>` (mode 0400, owned by root), which is rewritten within a second of each change and removed within a second of a delete or a scope that leaves the machine out. For values the proxy cannot put in, such as a database password or an SSH key. Changed only by a set with the value; false when omitted.
        hosts:
          type: array
          items:
            type: string
          description: 'The hosts its value goes to on HTTPS: a name, or `*.` and a name for every name under it. Required unless visible; refused when visible.'
        header:
          type: string
          description: The header it is set in on every request to its hosts; when omitted, its placeholder is replaced in the credential headers (Authorization, x-api-key and the like). Hidden secrets only.
        format:
          type: string
          description: The header's value, `{value}` replaced by the secret; `{value}` when omitted. Hidden secrets only.
        envName:
          type: string
          description: The environment variable that holds its placeholder (or, when visible, its value) in each machine it reaches; its name when omitted. When two secrets that reach one machine name the same variable, it holds the one first by name.
        scope:
          $ref: '#/components/schemas/SecretScope'
        policies:
          $ref: '#/components/schemas/SecretPolicies'
        name:
          type: string
          description: Its name.
        object:
          type: string
          enum:
          - secret
          description: Always `secret`.
        state:
          type: string
          enum:
          - active
          - deleted
          description: '`active` while requests carry it; `deleted` once deleted: a delete''s answer.'
        placeholder:
          type: string
          description: What a machine holds in the value's place; none when visible.
        version:
          type: integer
          description: Raised by each change.
        valueBytes:
          type: integer
          description: Its value's length in bytes.
        updatedAt:
          type: string
          format: date-time
          description: When it was last changed.
        deletedAt:
          type: string
          format: date-time
          description: 'When it was deleted: a delete''s answer, its state `deleted`.'
      required:
      - name
      - object
      - state
      - version
    SecretRule:
      type: object
      description: Which requests to a secret's hosts may carry it.
      properties:
        methods:
          type: array
          items:
            type: string
          description: Only these methods (`POST`); every method when omitted.
        paths:
          type: array
          items:
            type: string
          description: 'Only these paths: exact (`/v1/chat/completions`), or a prefix ending in `/*`.'
      required:
      - paths
    SecretGraphql:
      type: object
      description: The GraphQL mutations a request carrying a secret may make.
      properties:
        path:
          type: string
          description: The GraphQL endpoint's path; `/graphql` when omitted.
        mutations:
          type: array
          items:
            type: string
          description: Only these mutations, by name (at most 64); a request making any other is refused.
      required:
      - mutations
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
x-shortcuts:
- name: run
  description: Runs a command in a new sandbox and deletes the sandbox after, whether the command succeeded or not. Returns the command's result.
  inputSchema:
    type: object
    properties:
      cmd:
        oneOf:
        - type: string
          minLength: 1
          description: Run by bash -lc.
        - type: array
          items:
            type: string
          minItems: 1
          description: The program and its arguments, run without a shell.
        description: 'The command: text is run by `bash -lc`; a list is the program and its arguments, run without a shell.'
      image:
        type: string
        description: The image it boots, by name or ID; Runtime's default image when omitted.
      vcpu:
        type: integer
        description: Its vCPUs; 2 when omitted.
      memoryGB:
        type: number
        description: Its memory in GB (1 GB is 1,024 MiB); 4 when omitted.
      cwd:
        type: string
        description: The directory it runs in; the user's home when omitted.
      env:
        type: object
        additionalProperties:
          type: string
        description: Environment variables to add.
      stdin:
        type: string
        contentEncoding: base64
        description: Bytes sent to its standard input.
      timeoutSeconds:
        type: number
        description: Seconds it may run before it is stopped; it runs to its end when omitted.
    required:
    - cmd
  steps:
  - verb: sandboxes.create
    args:
      image:
        arg: image
      vcpu:
        arg: vcpu
      memoryGB:
        arg: memoryGB
    always: false
  - verb: sandboxes.exec
    args:
      id:
        step: 0
        field: id
      cmd:
        arg: cmd
      cwd:
        arg: cwd
      env:
        arg: env
      stdin:
        arg: stdin
      timeoutSeconds:
        arg: timeoutSeconds
    always: false
  - verb: sandboxes.delete
    args:
      id:
        step: 0
        field: id
    always: true
  answer: 1