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

# NOTE: Searches personal and service principal API keys

> Search finds personal client credentials and service principal credentials, with optional filtering by query text or key type.
 Request a modest page_size (≤25) to keep responses small.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples post /api/v1/search/iam/api_keys
openapi: 3.1.0
info:
  description: The C1 API is a HTTP API for managing C1 resources.
  title: C1 API
  version: 0.1.0-alpha
servers:
  - description: The C1 API server for the current tenant.
    url: https://{tenantDomain}.conductor.one
    variables:
      tenantDomain:
        default: example
        description: The domain of the tenant to use for this request.
security:
  - bearerAuth: []
    oauth: []
paths:
  /api/v1/search/iam/api_keys:
    post:
      tags:
        - Personal Client
      summary: 'NOTE: Searches personal and service principal API keys'
      description: >-
        Search finds personal client credentials and service principal
        credentials, with optional filtering by query text or key type.
         Request a modest page_size (≤25) to keep responses small.
      operationId: c1.api.api_key.v1.APIKeySearchService.Search
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/c1.api.api_key.v1.APIKeySearchServiceSearchRequest
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.api_key.v1.APIKeySearchServiceSearchResponse
          description: Successful response
components:
  schemas:
    c1.api.api_key.v1.APIKeySearchServiceSearchRequest:
      description: The APIKeySearchServiceSearchRequest message.
      properties:
        pageSize:
          description: The maximum number of results to return per page.
          format: int32
          type: integer
        pageToken:
          description: A pagination token returned from a previous Search call.
          type: string
        query:
          description: A text query to filter API keys by display name.
          type: string
        types:
          description: The key types to return. When empty, both types are returned.
          items:
            enum:
              - API_KEY_TYPE_UNSPECIFIED
              - API_KEY_TYPE_PERSONAL
              - API_KEY_TYPE_SERVICE_PRINCIPAL
            type: string
            x-speakeasy-unknown-values: allow
          type:
            - array
            - 'null'
      title: Api Key Search Service Search Request
      type: object
      x-speakeasy-name-override: APIKeySearchServiceSearchRequest
    c1.api.api_key.v1.APIKeySearchServiceSearchResponse:
      description: The APIKeySearchServiceSearchResponse message.
      properties:
        list:
          description: The list of API keys matching the search criteria.
          items:
            $ref: '#/components/schemas/c1.api.api_key.v1.APIKey'
          type:
            - array
            - 'null'
        nextPageToken:
          description: >-
            A token to retrieve the next page of results, or empty if there are
            no more results.
          type: string
      title: Api Key Search Service Search Response
      type: object
      x-speakeasy-name-override: APIKeySearchServiceSearchResponse
    c1.api.api_key.v1.APIKey:
      description: >
        APIKey is one API key search result: a personal client or a service
        principal key.


        This message contains a oneof named key. Only a single field of the
        following list may be set at a time:
          - personalClient
          - servicePrincipalKey
      properties:
        personalClient:
          oneOf:
            - $ref: '#/components/schemas/c1.api.iam.v1.PersonalClient'
            - type: 'null'
        servicePrincipalKey:
          oneOf:
            - $ref: '#/components/schemas/c1.api.api_key.v1.ServicePrincipalAPIKey'
            - type: 'null'
      title: Api Key
      type: object
      x-speakeasy-name-override: APIKey
    c1.api.iam.v1.PersonalClient:
      description: >-
        The PersonalClient message contains information about a presonal client
        credential.
      properties:
        allowSourceCidr:
          description: |-
            If set, only allows the CIDRs in the array to use the credential.
             Accepts IPv4 (e.g. 10.0.0.0/24) or IPv6 (e.g. 2001:db8::/32) CIDRs.
          items:
            type: string
          type:
            - array
            - 'null'
        clientId:
          description: The clientID of the credential.
          readOnly: true
          type: string
        createdAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        deletedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        displayName:
          description: The display name of the personal client credential.
          type: string
        expiresTime:
          format: date-time
          type:
            - string
            - 'null'
        id:
          description: The unique ID of the personal client credential.
          readOnly: true
          type: string
        lastUsedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        scopedRoles:
          description: |-
            scoped_roles provides a list of IAM Roles
             that this OAuth2 Client's API permissions
             are reduced to. The permissions granted to OAuth2 Client
             are AND'ed against the owning User's own permissions.
          items:
            type: string
          type:
            - array
            - 'null'
        updatedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        userId:
          description: The ID of the user that this credential is created for.
          readOnly: true
          type: string
      title: Personal Client
      type: object
      x-speakeasy-name-override: PersonalClient
    c1.api.api_key.v1.ServicePrincipalAPIKey:
      description: >-
        ServicePrincipalAPIKey is a service principal credential with the
        caller's permissions on its service principal.
      properties:
        credential:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.service_principal.v1.ServicePrincipalCredential
            - type: 'null'
        objectPermissions:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.authorization.v1.ActorObjectPermissions
            - type: 'null'
      title: Service Principal Api Key
      type: object
      x-speakeasy-name-override: ServicePrincipalAPIKey
    c1.api.service_principal.v1.ServicePrincipalCredential:
      description: >-
        ServicePrincipalCredential represents a client credential for a service
        principal.
      properties:
        allowSourceCidrs:
          description: CIDR restrictions for this credential.
          items:
            type: string
          readOnly: true
          type:
            - array
            - 'null'
        clientId:
          description: >-
            The full client ID in format:
            ${cutename}@${tenant}.${installation}/spc
          readOnly: true
          type: string
        createdAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        displayName:
          description: The display name of the credential.
          type: string
        expiresAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        id:
          description: The unique ID of the credential (cutename format).
          readOnly: true
          type: string
        lastUsedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        requireDpop:
          description: Whether DPoP proof-of-possession is required for this credential.
          readOnly: true
          type: boolean
        scopedRoleIds:
          description: >-
            Scoped role IDs for this credential (intersection with SP roles at
            token issuance).
          items:
            type: string
          readOnly: true
          type:
            - array
            - 'null'
        servicePrincipalId:
          description: The service principal user ID this credential belongs to.
          readOnly: true
          type: string
      title: Service Principal Credential
      type: object
      x-speakeasy-name-override: ServicePrincipalCredential
    c1.api.authorization.v1.ActorObjectPermissions:
      description: >-
        ActorObjectPermissions describes which actions the calling user is
        permitted to perform on an object, as determined by policy.
      properties:
        delete:
          description: The delete field.
          type: boolean
        edit:
          description: The edit field.
          type: boolean
        extra:
          additionalProperties:
            type: boolean
          description: The extra field.
          type: object
        read:
          description: The read field.
          type: boolean
      title: Actor Object Permissions
      type: object
      x-speakeasy-name-override: UserActorObjectPermissions
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    oauth:
      description: >-
        This API uses OAuth2 with the Client Credential flow.

        Client Credentials must be sent in the BODY, not the headers.

        For an example of how to implement this, refer to the
        [c1TokenSource.Token()](https://github.com/ConductorOne/conductorone-sdk-go/blob/3375fe7c0126d17e7ec4e711693dee7b791023aa/token_source.go#L101-L187)
        function.
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /auth/v1/token
      type: oauth2

````