AI for Database Workflow Credentials API

Manage encrypted, destination-bound credentials for workflow actions

Operations 5

GET /workflow-credentials List workflow credentials #
POST /workflow-credentials Create workflow credential #
GET /workflow-credentials/{id} Get workflow credential metadata #
PATCH /workflow-credentials/{id} Rotate workflow credential secret #
DELETE /workflow-credentials/{id} Delete workflow credential #

Documentation

Specifications

Other Resources

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/aifordatabase-workflow-credentials-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 email required.

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

OpenAPI Specification

aifordatabase-workflow-credentials-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AI for Database Workflow Credentials API
  version: 1.0.0
  description: API for AI agents to interact with databases through natural language, dashboards, workflows, and more.
servers:
- url: https://app.aifordatabase.com/api/v1
security:
- bearerAuth: []
tags:
- name: Workflow Credentials
  description: Manage encrypted, destination-bound credentials for workflow actions
paths:
  /workflow-credentials:
    get:
      tags:
      - Workflow Credentials
      summary: List workflow credentials
      operationId: listWorkflowCredentials
      description: List metadata for encrypted workflow credentials. Requires the workflow_credentials scope and an organization admin role. Secret configuration is never returned.
      parameters:
      - $ref: '#/components/parameters/PageParam'
      - $ref: '#/components/parameters/PageSizeParam'
      responses:
        '200':
          description: Paginated credential metadata
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/WorkflowCredential'
        '403':
          $ref: '#/components/responses/Forbidden'
    post:
      tags:
      - Workflow Credentials
      summary: Create workflow credential
      operationId: createWorkflowCredential
      description: Encrypt a credential and bind it to exact outbound destination hostnames. Requires the workflow_credentials scope and an organization admin role. The secret is write-only.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowCredentialCreate'
      responses:
        '201':
          description: Credential metadata
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessEnvelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/WorkflowCredential'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: Credential name already exists
  /workflow-credentials/{id}:
    get:
      tags:
      - Workflow Credentials
      summary: Get workflow credential metadata
      operationId: getWorkflowCredential
      description: Get non-secret credential metadata. Requires the workflow_credentials scope and an organization admin role.
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: Credential metadata
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessEnvelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/WorkflowCredential'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
      - Workflow Credentials
      summary: Rotate workflow credential secret
      operationId: rotateWorkflowCredential
      description: Replace only the encrypted secret configuration while preserving its kind and allowed hosts. Requires the workflow_credentials scope and an organization admin role.
      parameters:
      - $ref: '#/components/parameters/IdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowCredentialRotate'
      responses:
        '200':
          description: Updated credential metadata
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessEnvelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/WorkflowCredential'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      tags:
      - Workflow Credentials
      summary: Delete workflow credential
      operationId: deleteWorkflowCredential
      description: Delete a credential only when no workflow draft or active published version references it. Requires the workflow_credentials scope and an organization admin role.
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: Credential deleted
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccessEnvelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/DeletedResponse'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Credential is still referenced by a workflow
components:
  schemas:
    WorkflowCredential:
      type: object
      description: Credential metadata only. Stored secret configuration is never returned.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        kind:
          type: string
          enum:
          - API_KEY_HEADER
          - BEARER
          - BASIC
          - CUSTOM_HEADERS
        allowedHosts:
          type: array
          items:
            type: string
        hasSecret:
          type: boolean
          const: true
        lastTestedAt:
          type: string
          format: date-time
          nullable: true
        lastTestStatus:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    DeletedResponse:
      type: object
      properties:
        deleted:
          type: boolean
          example: true
    ApiMeta:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
        timestamp:
          type: string
          format: date-time
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
      - requestId
      - timestamp
    SuccessEnvelope:
      type: object
      properties:
        data: {}
        error:
          type: 'null'
        meta:
          $ref: '#/components/schemas/ApiMeta'
      required:
      - data
      - error
      - meta
    ApiError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details: {}
      required:
      - code
      - message
    Pagination:
      type: object
      properties:
        total:
          type: integer
        page:
          type: integer
        pageSize:
          type: integer
        totalPages:
          type: integer
      required:
      - total
      - page
      - pageSize
      - totalPages
    WorkflowCredentialCreate:
      type: object
      required:
      - name
      - kind
      - allowedHosts
      - config
      properties:
        name:
          type: string
          maxLength: 120
        kind:
          type: string
          enum:
          - API_KEY_HEADER
          - BEARER
          - BASIC
          - CUSTOM_HEADERS
        allowedHosts:
          type: array
          minItems: 1
          maxItems: 20
          description: Exact destination hostnames without scheme, port, or path.
          items:
            type: string
        config:
          $ref: '#/components/schemas/WorkflowCredentialConfig'
          writeOnly: true
    WorkflowCredentialConfig:
      oneOf:
      - type: object
        title: API key header
        required:
        - headerName
        - value
        properties:
          headerName:
            type: string
          value:
            type: string
            writeOnly: true
      - type: object
        title: Bearer token
        required:
        - token
        properties:
          token:
            type: string
            writeOnly: true
      - type: object
        title: Basic authentication
        required:
        - username
        - password
        properties:
          username:
            type: string
            writeOnly: true
          password:
            type: string
            writeOnly: true
      - type: object
        title: Custom headers
        required:
        - headers
        properties:
          headers:
            type: array
            minItems: 1
            maxItems: 20
            writeOnly: true
            items:
              type: object
              required:
              - name
              - value
              properties:
                name:
                  type: string
                value:
                  type: string
    WorkflowCredentialRotate:
      type: object
      required:
      - config
      properties:
        config:
          $ref: '#/components/schemas/WorkflowCredentialConfig'
          writeOnly: true
    ErrorEnvelope:
      type: object
      properties:
        data:
          type: 'null'
        error:
          $ref: '#/components/schemas/ApiError'
        meta:
          $ref: '#/components/schemas/ApiMeta'
      required:
      - data
      - error
      - meta
  parameters:
    PageSizeParam:
      name: pageSize
      in: query
      schema:
        type: integer
        default: 20
        maximum: 100
      description: Items per page (max 100)
    IdParam:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Resource ID
    PageParam:
      name: page
      in: query
      schema:
        type: integer
        default: 1
      description: Page number (1-based)
  responses:
    BadRequest:
      description: Validation error or bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Platform API key starting with afd_