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

# Get credential organization

> Returns the organization id that owns a credential. This route uses a bypass-RLS lookup and is limited to service-account callers with the `credential:read` scope. The trading-account id must match the credential's trading account.



## OpenAPI

````yaml /api-reference/credentials.openapi.json get /v1/trading-accounts/{trading_account_id}/credentials/{credential_id}/organization
openapi: 3.1.0
info:
  title: credentials
  description: ''
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.anthid.com
    description: Production
security: []
tags:
  - name: Credentials
    description: Trading-account metadata and lifecycle operations
  - name: Credentials
    description: >-
      Broker credential creation, metadata, secret access, and lifecycle
      operations
paths:
  /v1/trading-accounts/{trading_account_id}/credentials/{credential_id}/organization:
    get:
      tags:
        - Credentials
      summary: Get credential organization
      description: >-
        Returns the organization id that owns a credential. This route uses a
        bypass-RLS lookup and is limited to service-account callers with the
        `credential:read` scope. The trading-account id must match the
        credential's trading account.
      operationId: getCredentialOrganization
      parameters:
        - name: trading_account_id
          in: path
          description: Trading account id that owns the credential
          required: true
          schema:
            type: string
            format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
        - name: credential_id
          in: path
          description: Broker credential id to inspect
          required: true
          schema:
            type: string
            format: uuid
          example: 550e8400-e29b-41d4-a716-446655440111
      responses:
        '200':
          description: Credential organization retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialOrganizationResponse'
              example:
                organization_id: 550e8400-e29b-41d4-a716-446655440222
        '400':
          description: Trading account id does not match the credential
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid authentication credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Caller is not a service account with the `credential:read` scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No credential exists for the provided ids
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Caller exceeded the request rate limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unexpected server error while fetching the credential organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - clientCredentials: []
components:
  schemas:
    CredentialOrganizationResponse:
      type: object
      required:
        - organization_id
      properties:
        organization_id:
          type: string
          format: uuid
    Error:
      oneOf:
        - type: object
          required:
            - EncryptionError
          properties:
            EncryptionError:
              type: string
        - type: object
          required:
            - WorkOsError
          properties:
            WorkOsError:
              type: string
        - type: object
          required:
            - KvError
          properties:
            KvError:
              type: string
        - type: object
          required:
            - StreamError
          properties:
            StreamError:
              type: string
        - type: object
          required:
            - InternalError
          properties:
            InternalError:
              type: string
        - type: object
          required:
            - ThirdPartyError
          properties:
            ThirdPartyError:
              type: string
        - type: object
          required:
            - ParseError
          properties:
            ParseError:
              type: string
        - type: object
          required:
            - NotFound
          properties:
            NotFound:
              type: string
        - type: object
          required:
            - AlreadyExists
          properties:
            AlreadyExists:
              type: string
        - type: object
          required:
            - BadRequest
          properties:
            BadRequest:
              type: string
        - type: object
          required:
            - Forbidden
          properties:
            Forbidden:
              type: string
        - type: object
          required:
            - Unauthorized
          properties:
            Unauthorized:
              type: string
        - type: object
          required:
            - Database
          properties:
            Database:
              type: string
        - type: object
          required:
            - TooManyRequests
          properties:
            TooManyRequests:
              type: string
        - type: object
          required:
            - BrokerError
          properties:
            BrokerError:
              type: string
        - type: object
          required:
            - AuthError
          properties:
            AuthError:
              type: string
        - type: object
          required:
            - InvalidInput
          properties:
            InvalidInput:
              type: string
        - type: object
          required:
            - ConnectionLimitExceeded
          properties:
            ConnectionLimitExceeded:
              type: string
  securitySchemes:
    clientCredentials:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Machine bearer token minted via the client_credentials grant.

````