Cognition AI Secrets API

Operations for managing secrets and credentials

Operations 3

GET /v1/secrets List all secrets metadata
POST /v1/secrets Create a new secret
DELETE /v1/secrets/{secret_id} Delete a 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/cognition-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

cognition-secrets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Devin External Attachments Secrets API
  version: 1.0.0
  description: 'The Devin External API enables you to programmatically create and interact with Devin sessions. This RESTful API allows you to integrate Devin into your own applications, automate workflows, and build powerful tools on top of Devin.

    **Note**: The External API is currently in alpha. While we strive to maintain backward compatibility, some endpoints may change as we improve the API.

    '
servers:
- url: https://api.devin.ai
  description: Devin Production Server
security:
- bearerAuth: []
tags:
- name: Secrets
  description: Operations for managing secrets and credentials
paths:
  /v1/secrets:
    get:
      tags:
      - Secrets
      summary: List all secrets metadata
      description: 'Get a list of all secrets metadata. This endpoint only returns non-sensitive

        information about the secrets, not the secret values themselves.

        '
      responses:
        '200':
          description: List of secrets metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  secrets:
                    type: array
                    items:
                      $ref: '#/components/schemas/SecretMetadata'
                required:
                - secrets
              examples:
                list-secrets-response:
                  summary: Example response listing secrets
                  value:
                    secrets:
                    - secret_id: sec_xxx
                      secret_type: key-value
                      secret_name: API Access Token
                      created_at: '2024-01-01T00:00:00Z'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    post:
      tags:
      - Secrets
      summary: Create a new secret
      description: 'Create a new secret in your organization. The secret value will be encrypted and stored securely.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSecretRequest'
            examples:
              create-secret-example:
                summary: Example creating a new secret
                value:
                  type: key-value
                  key: API_TOKEN
                  value: sk-1234567890abcdef
                  sensitive: true
                  note: Production API token for external service
      responses:
        '201':
          description: Secret created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The unique identifier of the created secret
                required:
                - id
              examples:
                create-secret-response:
                  summary: Example response for creating a secret
                  value:
                    id: sec_abc123def456
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '409':
          description: Conflict - Secret name already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Secret name is not unique
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v1/secrets/{secret_id}:
    delete:
      tags:
      - Secrets
      summary: Delete a secret
      description: 'Permanently delete a secret by its ID. This action cannot be undone.

        '
      parameters:
      - name: secret_id
        in: path
        required: true
        description: The ID of the secret to delete
        schema:
          type: string
      responses:
        '204':
          description: Secret successfully deleted
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    UnauthorizedError:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Missing or invalid Authorization header
    BadRequestError:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Invalid input or request
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: The requested resource does not exist
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Something went wrong
  schemas:
    CreateSecretRequest:
      type: object
      properties:
        type:
          type: string
          description: Type of secret
          enum:
          - cookie
          - key-value
          - totp
        key:
          type: string
          description: User-defined name for the secret
        value:
          type: string
          description: The secret value to store
        sensitive:
          type: boolean
          description: Whether the secret should be treated as sensitive
        note:
          type: string
          description: Optional note about the secret
      required:
      - type
      - key
      - value
      - sensitive
      - note
      description: Request body for creating a new secret
    SecretMetadata:
      type: object
      properties:
        secret_id:
          type: string
          description: Unique identifier for the secret
        secret_type:
          type: string
          description: Type of secret
          enum:
          - cookie
          - key-value
          - dictionary
          - totp
        secret_name:
          type: string
          description: User-defined name for the secret
        created_at:
          type: string
          format: date-time
          description: Creation timestamp (ISO 8601)
      required:
      - secret_id
      - secret_type
      - secret_name
      - created_at
      description: Metadata about a stored secret
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
externalDocs:
  description: Visit Devin's documentation page for more info
  url: https://docs.devin.ai