> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudhumans.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List REST API credentials

> Lists the REST API credentials saved in a workspace: the `id`, `name` and `deprecatedAt` of each. `type` must be `rest-api` (`400` otherwise).

A REST API credential is what an HTTP Request block sends on every call: a base URL, headers and query params, kept out of the flow. To use one, put its `id` in the block's `options.credentialsId` with **Update a flow**.

The response never contains the base URL, headers, query params or any other value a credential holds. They are write-only.



## OpenAPI

````yaml /api-reference/specs/controlled-flows/v1.json get /v1/credentials
openapi: 3.0.3
info:
  title: Controlled Flows API
  version: 1.0.0
  description: >-
    Read, build, validate and publish controlled flows and the tools agents
    call.
servers:
  - url: https://api.cloudhumans.com/typebot
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: The workspaces that hold your flows.
  - name: Flows
    description: >-
      Read, create, change, validate and publish flows. Writes land in the
      draft; only a publish makes them live.
  - name: Versions
    description: The saved versions of a flow, and restoring one.
  - name: Credentials
    description: >-
      REST API credentials that HTTP Request blocks send without exposing the
      secret in the flow.
paths:
  /v1/credentials:
    get:
      tags:
        - Credentials
      summary: List REST API credentials
      description: >-
        Lists the REST API credentials saved in a workspace: the `id`, `name`
        and `deprecatedAt` of each. `type` must be `rest-api` (`400` otherwise).


        A REST API credential is what an HTTP Request block sends on every call:
        a base URL, headers and query params, kept out of the flow. To use one,
        put its `id` in the block's `options.credentialsId` with **Update a
        flow**.


        The response never contains the base URL, headers, query params or any
        other value a credential holds. They are write-only.
      operationId: listCredentials
      parameters:
        - name: workspaceId
          in: query
          required: true
          description: >-
            The workspace to read, e.g. `clx1a2b3c4d5e6f7g8h9`. Get it from
            **List workspaces**. A workspace your token cannot reach answers
            404, indistinguishable from one that does not exist.
          schema:
            type: string
        - name: type
          in: query
          required: true
          description: >-
            The kind of credential to list. Only `rest-api` is accepted; any
            other value answers 400.
          schema:
            type: string
            enum:
              - rest-api
      responses:
        '200':
          description: >-
            The REST API credentials of the workspace, without their secrets. An
            empty list means the workspace has none.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialList'
        '400':
          description: >-
            The request could not be answered as written, for instance a `type`
            other than `rest-api`. `message` says which input was rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, expired or invalid credentials.
        '404':
          description: >-
            No workspace with this id, or none your token can reach — the two
            are deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit applied by the API gateway. Back off and retry.
components:
  schemas:
    CredentialList:
      type: object
      required:
        - credentials
      properties:
        credentials:
          type: array
          description: The credentials found, in no particular order.
          items:
            type: object
            required:
              - id
              - name
              - deprecatedAt
            properties:
              id:
                type: string
                description: >-
                  The credential id, to put in an HTTP Request block's
                  `options.credentialsId`.
              name:
                type: string
                description: The label the credential was saved with.
              deprecatedAt:
                type: string
                format: date-time
                nullable: true
                description: >-
                  When the credential was deprecated, or null while it is in
                  use.
      description: The REST API credentials of a workspace. No secret is ever included.
    Error:
      type: object
      properties:
        message:
          type: string
          description: What went wrong.
        code:
          type: string
          description: Error code, e.g. `NOT_FOUND` or `BAD_REQUEST`.
        issues:
          type: array
          description: Per-field validation problems, present on a 400 for invalid input.
          items:
            type: object
            additionalProperties: true
      required:
        - message
        - code
      description: Something the caller needs to fix.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.