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

# Read the current API key

> Reads the credential that made this request, which tells a caller who it is. `id` is what it sends as `client_id`. A partner owner can't be included, so `?include=owner` lists it in `not_included`.

Credentials: `partner`, `merchant`

Permission: `api-keys:get-current`



## OpenAPI

````yaml /api-reference/v1/openapi.json get /api-keys/current
openapi: 3.1.0
info:
  title: Quidkey API
  version: 1.0.0
  description: >-
    The Quidkey public API.


    Within a version, a response can carry what this document doesn't list yet:
    a new field, a new value of an enum, a new error code. Handle a value you
    don't recognise rather than refusing the response. A client generated from
    this document turns an `enum` into a closed type unless told otherwise, so
    turn on its option for unknown values, such as openapi-generator's
    `enumUnknownDefaultCase`. A request is held to what's listed: a value it
    doesn't list is refused.
  contact:
    name: Quidkey
    url: https://docs.quidkey.com
servers:
  - url: https://api.quidkey.com/v1
security:
  - bearer: []
tags:
  - name: account_owner
  - name: agreement
  - name: agreement_acceptance
  - name: api_key
  - name: bank
  - name: bank_account
  - name: capability
  - name: country
  - name: identity_verification
  - name: legal_entity
  - name: merchant
  - name: party
  - name: payment_link
  - name: payout
  - name: transaction
  - name: webhook_endpoint
paths:
  /api-keys/current:
    get:
      tags:
        - api_key
      summary: Read the current API key
      description: >-
        Reads the credential that made this request, which tells a caller who it
        is. `id` is what it sends as `client_id`. A partner owner can't be
        included, so `?include=owner` lists it in `not_included`.


        Credentials: `partner`, `merchant`


        Permission: `api-keys:get-current`
      operationId: api_key.getCurrent
      parameters:
        - name: include
          in: query
          required: false
          description: >-
            Link fields to hydrate into `entities`, comma-separated. Sending it
            replaces the default, which is nothing.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - owner
        - name: view
          in: query
          required: false
          description: The representation to answer with.
          schema:
            type: string
            enum:
              - full
            default: full
      responses:
        '200':
          description: The api_key, in the full view.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                required:
                  - result
                  - entities
                  - not_included
                properties:
                  result:
                    $ref: '#/components/schemas/ApiKeyFull'
                  entities:
                    additionalProperties:
                      $ref: '#/components/schemas/MerchantFull'
                    description: Included linked resources, keyed by URI.
                    type: object
                    properties: {}
                  not_included:
                    type: array
                    items:
                      $ref: '#/components/schemas/NotIncludedEntry'
        '400':
          description: '`VALIDATION_FAILED`: The request is malformed or failed validation.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          x-error-codes:
            - VALIDATION_FAILED
        '401':
          description: '`UNAUTHENTICATED`: A valid bearer token is required.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          x-error-codes:
            - UNAUTHENTICATED
        '403':
          description: >-
            `FORBIDDEN`: This credential doesn't have permission for this
            endpoint.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          x-error-codes:
            - FORBIDDEN
        '404':
          description: '`NOT_FOUND`: Not found.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          x-error-codes:
            - NOT_FOUND
        '406':
          description: '`NOT_ACCEPTABLE`: This endpoint doesn''t offer the format in Accept.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          x-error-codes:
            - NOT_ACCEPTABLE
        '429':
          description: '`RATE_LIMITED`: Too many requests.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          x-error-codes:
            - RATE_LIMITED
        '500':
          description: '`INTERNAL_ERROR`: Something went wrong on our side.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          x-error-codes:
            - INTERNAL_ERROR
        '503':
          description: '`SERVICE_UNAVAILABLE`: The service is busy. Try again shortly.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          x-error-codes:
            - SERVICE_UNAVAILABLE
components:
  headers:
    RequestId:
      description: Identifies this request. Quote it to support.
      schema:
        type: string
    RetryAfter:
      description: How many seconds to wait before retrying.
      schema:
        minimum: 0
        type: integer
  schemas:
    ApiKeyFull:
      additionalProperties: false
      type: object
      required:
        - _type
        - _uri
        - _view
        - id
        - created_at
        - updated_at
        - owner
      properties:
        _type:
          const: api_key
          type: string
        _uri:
          pattern: ^/
          description: The canonical URI, relative to the version root.
          type: string
        _view:
          const: full
          type: string
        id:
          type: string
        created_at:
          anyOf:
            - format: date-time
              pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$
              type: string
            - type: 'null'
        updated_at:
          anyOf:
            - format: date-time
              pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$
              type: string
            - type: 'null'
        owner:
          anyOf:
            - $ref: '#/components/schemas/UnpublishedPartnerLink'
            - $ref: '#/components/schemas/MerchantLink'
          description: The account that holds this credential.
    MerchantFull:
      additionalProperties: false
      type: object
      required:
        - _type
        - _uri
        - _view
        - id
        - created_at
        - updated_at
        - partner
        - brand_name
        - website_url
        - category_code
        - country
        - status
        - home_currency
        - is_multi_account_allowed
        - account_owners
        - onboarding
        - legal_entities
        - payment_links
        - agreement_acceptances
        - bank_accounts
        - capabilities
        - webhook_endpoints
        - transactions
        - payouts
      properties:
        _type:
          const: merchant
          type: string
        _uri:
          pattern: ^/
          description: The canonical URI, relative to the version root.
          type: string
        _view:
          const: full
          type: string
        id:
          type: string
        created_at:
          anyOf:
            - format: date-time
              pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$
              type: string
            - type: 'null'
        updated_at:
          anyOf:
            - format: date-time
              pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$
              type: string
            - type: 'null'
        partner:
          $ref: '#/components/schemas/UnpublishedPartnerLink'
        brand_name:
          type: string
        website_url:
          anyOf:
            - format: uri
              type: string
            - type: 'null'
          description: >-
            Unique across all merchants. Sent as absolute HTTPS. One set outside
            this API can read `http://`. `null` when none is held.
        category_code:
          type: string
        country:
          anyOf:
            - pattern: ^[A-Z]{2}$
              type: string
            - type: 'null'
          description: '`null` when none is held.'
        status:
          type: string
          enum:
            - pending
            - active
            - suspended
          description: >-
            Where the merchant stands with Quidkey.


            - `pending`: Not live yet: it takes no live payment transactions.
            Read `onboarding` for what is outstanding.

            - `active`: Live. A live payment transaction can still be refused:
            after 12 months with none, until Quidkey has reviewed the merchant,
            or while the account it would land in awaits verification.

            - `suspended`: Quidkey has paused it, whether or not it had gone
            live: no live payment transaction, refund or payout starts.
            Reinstating it answers `pending` or `active`. Why isn't shared.
        home_currency:
          anyOf:
            - pattern: ^[A-Z]{3}$
              type: string
            - type: 'null'
          description: >-
            What a payment transaction through a virtual account is converted
            into and paid out in when the merchant has no payout account in the
            transaction's own currency. A direct payment transaction is never
            converted. It's set from the merchant's first payout account, where
            that currency can be held, and only Quidkey can change it. `null`
            while it has none, and a merchant can't go live without one.
        is_multi_account_allowed:
          type: boolean
          description: >-
            Whether another `owned` account can be added while one is active.
            Linking a bank account isn't limited by it. It can't be set through
            this API.
        account_owners:
          $ref: '#/components/schemas/AccountOwnerCollectionLink'
        onboarding:
          $ref: '#/components/schemas/OnboardingSubResourceLink'
        legal_entities:
          $ref: '#/components/schemas/LegalEntityCollectionLink'
        payment_links:
          $ref: '#/components/schemas/PaymentLinkCollectionLink'
        agreement_acceptances:
          $ref: '#/components/schemas/AgreementAcceptanceCollectionLink'
        bank_accounts:
          $ref: '#/components/schemas/BankAccountCollectionLink'
        capabilities:
          $ref: '#/components/schemas/CapabilityCollectionLink'
        webhook_endpoints:
          $ref: '#/components/schemas/WebhookEndpointCollectionLink'
          description: A partner's credential can't follow this link, and answers 403.
        transactions:
          $ref: '#/components/schemas/TransactionCollectionLink'
        payouts:
          $ref: '#/components/schemas/PayoutCollectionLink'
    NotIncludedEntry:
      additionalProperties: false
      type: object
      required:
        - link
        - reason
      properties:
        link:
          $ref: '#/components/schemas/AnyLink'
        reason:
          type: string
          enum:
            - no_permission
            - not_published
          description: >-
            Why this link has no entity.


            - `no_permission`: This credential can't read it. Fetching it
            answers 403, or 404 where a 403 would reveal that it exists.

            - `not_published`: The API doesn't show it: a type it doesn't
            publish, or a record it doesn't show on a type it does, such as a
            failed payout. Fetching it, where it has a URI, answers 404.
    Error:
      additionalProperties: false
      type: object
      required:
        - error
      properties:
        error:
          additionalProperties: false
          type: object
          required:
            - code
            - message
            - details
            - retryable
            - request_id
          properties:
            code:
              description: Branch on this. New codes can appear.
              type: string
            message:
              description: For people. It can change.
              type: string
            details:
              type: array
              items:
                $ref: '#/components/schemas/ErrorDetail'
            retryable:
              description: >-
                Whether sending the same request again unchanged, after a wait,
                can succeed with nothing else changing.
              type: boolean
            request_id:
              description: Quote this to support.
              type: string
    UnpublishedPartnerLink:
      additionalProperties: false
      type: object
      required:
        - _type
        - id
      properties:
        _type:
          const: partner
          type: string
        id:
          type: string
      x-link-target:
        resource: partner
        kind: resource
        is_published: false
    MerchantLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
        - id
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: merchant
          type: string
        id:
          type: string
      x-link-target:
        resource: merchant
        kind: resource
        is_published: true
        views:
          - full
    AccountOwnerCollectionLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: collection
          type: string
      x-link-target:
        resource: account_owner
        kind: collection
        is_published: true
        views:
          - full
    OnboardingSubResourceLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
        - id
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: onboarding
          type: string
        id:
          type: string
      x-link-target:
        resource: onboarding
        kind: singleton
        is_published: true
        views:
          - full
    LegalEntityCollectionLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: collection
          type: string
      x-link-target:
        resource: legal_entity
        kind: collection
        is_published: true
        views:
          - full
    PaymentLinkCollectionLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: collection
          type: string
      x-link-target:
        resource: payment_link
        kind: collection
        is_published: true
        views:
          - full
          - summary
    AgreementAcceptanceCollectionLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: collection
          type: string
      x-link-target:
        resource: agreement_acceptance
        kind: collection
        is_published: true
        views:
          - full
    BankAccountCollectionLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: collection
          type: string
      x-link-target:
        resource: bank_account
        kind: collection
        is_published: true
        views:
          - full
    CapabilityCollectionLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: collection
          type: string
      x-link-target:
        resource: capability
        kind: collection
        is_published: true
        views:
          - full
    WebhookEndpointCollectionLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: collection
          type: string
      x-link-target:
        resource: webhook_endpoint
        kind: collection
        is_published: true
        views:
          - full
    TransactionCollectionLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: collection
          type: string
      x-link-target:
        resource: transaction
        kind: collection
        is_published: true
        views:
          - full
          - summary
    PayoutCollectionLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: collection
          type: string
      x-link-target:
        resource: payout
        kind: collection
        is_published: true
        views:
          - full
    AnyLink:
      anyOf:
        - additionalProperties: false
          type: object
          required:
            - _link
            - _type
            - id
          properties:
            _link:
              pattern: ^/
              type: string
            _type:
              type: string
            id:
              type: string
        - additionalProperties: false
          type: object
          required:
            - _type
            - id
          properties:
            _type:
              type: string
            id:
              type: string
      x-link-target:
        resource: any
        kind: any
        is_published: true
    ErrorDetail:
      anyOf:
        - additionalProperties: false
          type: object
          required:
            - field
            - message
          properties:
            field:
              type: string
            message:
              type: string
        - additionalProperties: false
          type: object
          required:
            - required_actions
            - message
          properties:
            required_actions:
              description: The `required_actions` codes holding this back.
              type: array
              items:
                type: string
            message:
              type: string
        - additionalProperties: false
          type: object
          required:
            - available_percent
            - message
          properties:
            available_percent:
              $ref: '#/components/schemas/Percent'
            message:
              type: string
        - additionalProperties: false
          type: object
          required:
            - agreement
            - message
          properties:
            agreement:
              $ref: '#/components/schemas/AgreementLink'
            message:
              type: string
        - additionalProperties: false
          type: object
          required:
            - agreement
            - current_agreement
            - message
          properties:
            agreement:
              $ref: '#/components/schemas/AgreementLink'
            current_agreement:
              $ref: '#/components/schemas/AgreementLink'
            message:
              type: string
        - additionalProperties: false
          type: object
          required:
            - legal_entity
            - message
          properties:
            legal_entity:
              $ref: '#/components/schemas/LegalEntityLink'
            message:
              type: string
    Percent:
      pattern: ^\d+(\.\d+)?$
      description: 'A percentage as a decimal string: `"25.00"` is 25%.'
      type: string
    AgreementLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
        - id
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: agreement
          type: string
        id:
          type: string
      x-link-target:
        resource: agreement
        kind: resource
        is_published: true
        views:
          - full
    LegalEntityLink:
      additionalProperties: false
      type: object
      required:
        - _link
        - _type
        - id
      properties:
        _link:
          pattern: ^/
          type: string
        _type:
          const: legal_entity
          type: string
        id:
          type: string
      x-link-target:
        resource: legal_entity
        kind: resource
        is_published: true
        views:
          - full
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.