> ## Documentation Index
> Fetch the complete documentation index at: https://oma-codex-339-workspace-permissions.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate Credential

> Validate Credential through the OMA API.

<Info>Every request requires `?beta=true`.</Info>


## OpenAPI

````yaml /openapi/oma.en.json post /v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate
openapi: 3.1.0
info:
  title: OMA API Reference
  version: 1.0.0
  description: Open Managed Agents application API reference.
servers:
  - url: http://localhost:38080
    description: Local OMA server
security:
  - omaApiKey: []
  - omaBearer: []
paths:
  /v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate:
    post:
      summary: Validate Credential
      operationId: BetaValidateCredential
      parameters:
        - name: beta
          in: query
          required: true
          description: Selects the beta API contract for this endpoint. Must be `true`.
          schema:
            type: boolean
            enum:
              - true
        - name: anthropic-version
          in: header
          required: false
          schema:
            type: string
        - name: anthropic-beta
          in: header
          required: false
          schema:
            type: string
            items:
              type: string
            x-stainless-override-schema:
              x-stainless-param: betas
              x-stainless-extend-default: true
              type: array
              description: Optional header to specify the beta version(s) you want to use.
              items:
                $ref: '#/components/schemas/AnthropicBeta'
            x-default: managed-agents-2026-04-01
        - name: vault_id
          in: path
          required: true
          schema:
            type: string
          description: Path parameter vault_id
          example: vlt_011CZkZDLs7fYzm1hXNPeRjv
        - name: credential_id
          in: path
          required: true
          schema:
            type: string
          description: Path parameter credential_id
          example: vcrd_011CZkZEMt8gZan2iYOQfSkw
      responses:
        '200':
          description: Successful response (OK)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaManagedAgentsCredentialValidation'
        '400':
          description: Invalid argument - The client specified an invalid argument
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '401':
          description: >-
            Unauthenticated - The request does not have valid authentication
            credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '403':
          description: >-
            Permission denied - The caller does not have permission to execute
            the specified operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '404':
          description: Not found - Some requested entity was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '408':
          description: >-
            Deadline exceeded - The deadline expired before the operation could
            complete
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '409':
          description: Aborted - The operation was aborted due to concurrency issue
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '412':
          description: >-
            Failed precondition - Operation was rejected because the system is
            not in required state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '413':
          description: Out of range - Operation was attempted past the valid range
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '429':
          description: >-
            Resource exhausted - Some resource has been exhausted (rate
            limiting)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '431':
          description: Request header fields too large - Request metadata was too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '499':
          description: Cancelled - The operation was cancelled by the client
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '500':
          description: Internal - Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '501':
          description: Unimplemented - The operation is not implemented or supported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '503':
          description: Unavailable - The service is currently unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
        '504':
          description: Deadline exceeded - Upstream service did not respond in time
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BetaErrorResponse'
components:
  schemas:
    BetaManagedAgentsCredentialValidation:
      description: Result of live-probing a credential against its configured MCP server.
      type: object
      additionalProperties: false
      required:
        - type
        - credential_id
        - vault_id
        - status
        - validated_at
        - has_refresh_token
        - mcp_probe
        - refresh
      properties:
        type:
          type: string
          enum:
            - vault_credential_validation
          examples:
            - vault_credential_validation
        credential_id:
          description: Unique identifier of the credential that was validated.
          type: string
          examples:
            - vcrd_011CZkZEMt8gZan2iYOQfSkw
        vault_id:
          description: Identifier of the vault containing the credential.
          type: string
          examples:
            - vlt_011CZkZDLs7fYzm1hXNPeRjv
        status:
          description: Overall verdict of the validation probe.
          allOf:
            - $ref: '#/components/schemas/BetaManagedAgentsCredentialValidationStatus'
          examples:
            - valid
        validated_at:
          description: When the validation probe was performed.
          allOf:
            - $ref: '#/components/schemas/BetaTimestamp'
          examples:
            - '2026-03-15T10:00:00Z'
        has_refresh_token:
          description: Whether the credential has a refresh token configured.
          type: boolean
          examples:
            - true
        mcp_probe:
          description: >-
            Details of the failing MCP probe step. Null when the probe
            succeeded.
          allOf:
            - $ref: '#/components/schemas/BetaManagedAgentsMcpProbe'
          nullable: true
          examples:
            - null
        refresh:
          description: >-
            Details of the refresh-token exchange attempted on a 401. Null when
            no refresh was attempted.
          allOf:
            - $ref: '#/components/schemas/BetaManagedAgentsRefreshObject'
          nullable: true
          examples:
            - null
      example:
        type: vault_credential_validation
        credential_id: vcrd_011CZkZEMt8gZan2iYOQfSkw
        vault_id: vlt_011CZkZDLs7fYzm1hXNPeRjv
        status: valid
        validated_at: '2026-03-15T10:00:00Z'
        has_refresh_token: true
        mcp_probe: null
        refresh: null
    BetaErrorResponse:
      properties:
        error:
          discriminator:
            mapping:
              api_error:
                $ref: '#/components/schemas/BetaAPIError'
              authentication_error:
                $ref: '#/components/schemas/BetaAuthenticationError'
              billing_error:
                $ref: '#/components/schemas/BetaBillingError'
              invalid_request_error:
                $ref: '#/components/schemas/BetaInvalidRequestError'
              not_found_error:
                $ref: '#/components/schemas/BetaNotFoundError'
              overloaded_error:
                $ref: '#/components/schemas/BetaOverloadedError'
              permission_error:
                $ref: '#/components/schemas/BetaPermissionError'
              rate_limit_error:
                $ref: '#/components/schemas/BetaRateLimitError'
              timeout_error:
                $ref: '#/components/schemas/BetaGatewayTimeoutError'
            propertyName: type
          oneOf:
            - $ref: '#/components/schemas/BetaInvalidRequestError'
            - $ref: '#/components/schemas/BetaAuthenticationError'
            - $ref: '#/components/schemas/BetaBillingError'
            - $ref: '#/components/schemas/BetaPermissionError'
            - $ref: '#/components/schemas/BetaNotFoundError'
            - $ref: '#/components/schemas/BetaRateLimitError'
            - $ref: '#/components/schemas/BetaGatewayTimeoutError'
            - $ref: '#/components/schemas/BetaAPIError'
            - $ref: '#/components/schemas/BetaOverloadedError'
          title: Error
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        type:
          const: error
          default: error
          title: Type
          type: string
      required:
        - error
        - request_id
        - type
      title: ErrorResponse
      type: object
    BetaManagedAgentsCredentialValidationStatus:
      type: string
      description: Overall verdict of a credential validation probe.
      enum:
        - valid
        - invalid
        - unknown
    BetaTimestamp:
      description: A timestamp in RFC 3339 format
      type: string
      format: date-time
    BetaManagedAgentsMcpProbe:
      description: The failing step of an MCP validation probe.
      type: object
      additionalProperties: false
      required:
        - method
        - http_response
      properties:
        method:
          description: >-
            The MCP method that failed (for example `initialize` or
            `tools/list`).
          type: string
        http_response:
          description: >-
            The captured HTTP error response. Null when no HTTP response was
            received (timeout, DNS, TLS).
          allOf:
            - $ref: '#/components/schemas/BetaManagedAgentsRefreshHttpResponse'
          nullable: true
    BetaManagedAgentsRefreshObject:
      description: >-
        Outcome of a refresh-token exchange attempted during credential
        validation.
      type: object
      additionalProperties: false
      required:
        - status
        - http_response
      properties:
        status:
          description: Outcome of the refresh attempt.
          allOf:
            - $ref: '#/components/schemas/BetaManagedAgentsCredentialRefreshStatus'
        http_response:
          description: >-
            The captured HTTP error response from the token endpoint. Populated
            only when `status` is `failed`.
          allOf:
            - $ref: '#/components/schemas/BetaManagedAgentsRefreshHttpResponse'
          nullable: true
    BetaAPIError:
      properties:
        message:
          default: Internal server error
          title: Message
          type: string
        type:
          const: api_error
          default: api_error
          title: Type
          type: string
      required:
        - message
        - type
      title: APIError
      type: object
    BetaAuthenticationError:
      properties:
        message:
          default: Authentication error
          title: Message
          type: string
        type:
          const: authentication_error
          default: authentication_error
          title: Type
          type: string
      required:
        - message
        - type
      title: AuthenticationError
      type: object
    BetaBillingError:
      properties:
        message:
          default: Billing error
          title: Message
          type: string
        type:
          const: billing_error
          default: billing_error
          title: Type
          type: string
      required:
        - message
        - type
      title: BillingError
      type: object
    BetaInvalidRequestError:
      properties:
        message:
          default: Invalid request
          title: Message
          type: string
        type:
          const: invalid_request_error
          default: invalid_request_error
          title: Type
          type: string
      required:
        - message
        - type
      title: InvalidRequestError
      type: object
    BetaNotFoundError:
      properties:
        message:
          default: Not found
          title: Message
          type: string
        type:
          const: not_found_error
          default: not_found_error
          title: Type
          type: string
      required:
        - message
        - type
      title: NotFoundError
      type: object
    BetaOverloadedError:
      properties:
        message:
          default: Overloaded
          title: Message
          type: string
        type:
          const: overloaded_error
          default: overloaded_error
          title: Type
          type: string
      required:
        - message
        - type
      title: OverloadedError
      type: object
    BetaPermissionError:
      properties:
        message:
          default: Permission denied
          title: Message
          type: string
        type:
          const: permission_error
          default: permission_error
          title: Type
          type: string
      required:
        - message
        - type
      title: PermissionError
      type: object
    BetaRateLimitError:
      properties:
        message:
          default: Rate limited
          title: Message
          type: string
        type:
          const: rate_limit_error
          default: rate_limit_error
          title: Type
          type: string
      required:
        - message
        - type
      title: RateLimitError
      type: object
    BetaGatewayTimeoutError:
      properties:
        message:
          default: Request timeout
          title: Message
          type: string
        type:
          const: timeout_error
          default: timeout_error
          title: Type
          type: string
      required:
        - message
        - type
      title: GatewayTimeoutError
      type: object
    BetaManagedAgentsRefreshHttpResponse:
      description: An HTTP response captured during a credential validation probe.
      type: object
      additionalProperties: false
      required:
        - status_code
        - content_type
        - body
        - body_truncated
      properties:
        status_code:
          description: HTTP status code.
          type: integer
          format: int32
        content_type:
          description: Value of the `Content-Type` response header.
          type: string
        body:
          description: Response body. May be truncated and has sensitive values scrubbed.
          type: string
        body_truncated:
          description: Whether `body` was truncated.
          type: boolean
    BetaManagedAgentsCredentialRefreshStatus:
      type: string
      description: >-
        Outcome of a refresh-token exchange attempted during credential
        validation.
      enum:
        - succeeded
        - failed
        - connect_error
        - no_refresh_token
  securitySchemes:
    omaApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: OMA workspace API key.
      x-default: sk-ant-local-default
    omaBearer:
      type: http
      scheme: bearer
      description: OMA workspace API key sent as a bearer token.

````