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

> ## Agent Instructions
> Use the Payrails Web SDK v6 for new browser integrations. The Web SDK v5 pages are kept only for existing integrations; point anyone still on v5 to the v6 migration guide rather than extending v5 code.
> Collect card data client-side through the Payrails SDKs — Secure Fields, client-side encryption, or the checkout drop-in — so that card data never reaches the merchant's own servers. Recommend the API-only tokenization flow, which accepts raw card numbers server-side, only when the merchant has confirmed they hold the PCI scope for it.
> Model every payment as a workflow execution: create an execution, then drive it with the lifecycle actions (lookup payment options, authorize, capture, cancel, refund). Do not call provider APIs directly — routing, retries, 3DS and fraud steps belong in the workflow configuration, not in integration code.
> Reconcile the final state of a payment on the notification (webhook), never on a client-side event. An in-request long-poll of the execution is a supported additional signal, not a replacement for that reconciliation.
> Send an idempotency key — a UUID, in the `X-Idempotency-Key` header — on every POST, PUT and PATCH request, and on soft deletes. GET requests need none, and hard deletes cannot be idempotent.
> Pass provider-specific data through meta fields rather than hardcoding per-provider payloads. Payrails translates meta fields into each provider's own format.
> Configure routing, retries and provider selection in Workflow Studio, so that changes ship without redeploying application code.

# Create a new version of a connection

> Saves the connection version data and returns connection version with ID.




## OpenAPI

````yaml https://cdn.payrails.io/docs/api/openapi.min.json post /token/connections/{connectionId}/versions
openapi: 3.1.0
info:
  version: 1.3.15
  title: Payrails API Reference
  contact:
    name: Payrails
    url: https://www.payrails.com
    email: tech@payrails.com
  license:
    name: Payrails GmbH
    url: https://www.payrails.com/
  description: >
    ---

    Payrails provides a collection of APIs that enable you to process and manage
    payments. Our APIs accept and return JSON in the HTTP body, and return
    standard HTTP response codes. You can consume the APIs directly using your
    favorite HTTP/REST library.
servers:
  - url: https://api.staging.payrails.io
    description: Payrails environment.
security:
  - ApiKey: []
tags:
  - name: Authentication
    description: >-
      Payrails API is secured via [OAuth
      2.0](https://datatracker.ietf.org/doc/html/rfc6749) industry-standard
      protocol for authorization. Server-side requests are authenticated using a
      [Bearer Token](https://datatracker.ietf.org/doc/html/rfc6750) in the
      request `Authorization` header.
  - name: Client
    description: Endpoints used by our client-side SDK.
  - name: Workflows
    description: >-
      Any operation in Payrails is defined and executed with a
      [Workflow](/guides/whats-payrails/workflow/) that is configured for a
      particular use-case of the merchant. The workflow configurations support
      versioning.
  - name: Executions
    description: >-
      A workflow execution is an act of performing a set of tasks that are
      defined in the
      [Workflow](/api-reference/reference/#operation/listDefaultWorkflows) such
      as accepting payments.
  - name: Actions
    description: >-
      A workflow execution action is a predefined interaction that can be
      triggered to change the state of the workflow execution. For example
      authorizing or refunding a payment.
  - name: Payments
    description: >-
      A [Payment](/guides/whats-payrails/payments/) in Payrails is a collection
      of operations over time, that is created by a workflow execution and
      followed by the workflow actions. In this section, you can list all the
      payments or a single one to learn about the details of involved payment
      methods, instruments, providers, statuses and more.
  - name: Instruments
    description: >-
      Payment instruments are specific instances of a payment method that belong
      to the holder executing the workflow. They can be a previously stored
      card, a new card that was typed in a form, a phone number, an IBAN, or
      some way to fetch an account in a provider (like PayPal or AliPay).
  - name: Payouts
    description: Payouts are money movements paid to an external party.
  - name: InstrumentTokens
    description: >-
      Tokens are representations of our payment instruments in external
      providers. One payment instrument can have many tokens, because we keep
      the mapping in each external provider that knows about it. For example,
      the same real life card can have a token in our Vault, but also in Adyen
      and Checkout PSPs.
  - name: BinLookup
    description: >-
      Operations related to getting information about a card by its BIN (or
      IIN).
  - name: Providers
    description: Operations related to managing Providers.
  - name: ProviderConfigs
    description: Operations related to managing configurations for Providers.
  - name: Rulesets
    description: Operations related to managing Rulesets.
  - name: Holders
    description: >-
      A Holder is a group of accounts that belong together with specific
      criteria, linked to their payment instruments and identities. For example,
      it can represent a digital wallet for a person, where they store balance
      that they top up, refunded orders, referral bonuses, etc.
  - name: SSO Connections
    description: Operations related to managing SSO identity provider connections.
  - name: APILogs
    description: API Logs.
  - name: Workspaces
    description: Operations related to managing workspaces.
  - name: DropInLinks
    description: >-
      Create and manage drop-in payment links that can be shared with payers.
      Drop-in links support full or partial payments, define the total amount
      and expiration, and return a public URL that merchants can send to
      customers.
  - name: Files
    description: Operations related to files processing
  - name: Reports
    description: Operations to see available reports.
  - name: ReportRuns
    description: Operations to generate and retrieve report runs.
  - name: FraudChecks
    description: >-
      A Fraud check Payrails is a collection of operations over time, that is
      created by a workflow execution and followed by the workflow actions. In
      this section, you can list all the fraud entities or a single one to learn
      about the details of involved instruments, providers, statuses, decisions
      and more.
  - name: ThreeDS
    description: Operations to monitor 3DS operations.
  - name: ReconciliationRecords
    description: >-
      Operations to retrieve reconciliation record aggregates, transactions, and
      reconciliation metadata.
  - name: Vault Instant Proxy
    description: Operations related to Instant Proxy API requests.
  - name: Vault Proxy Connections
    description: Operations related to managing token connections.
  - name: Vault Records and Aliases
    description: Operations related to managing records and aliases.
  - name: Vault Display SDK
    description: Operations related to DisplaySDK.
  - name: Vault Public Encryption
    description: Public endpoints related to encryption.
  - name: Disputes
    description: Operations to managing disputes.
paths:
  /token/connections/{connectionId}/versions:
    post:
      tags:
        - Vault Proxy Connections
      summary: Create a new version of a connection
      description: >
        Saves the connection version data and returns connection version with
        ID.
      operationId: createVaultConnectionVersions
      parameters:
        - name: connectionId
          in: path
          required: true
          description: >-
            Parameter connectionId is required for which connection version is
            created.
          schema:
            type: string
      requestBody:
        description: The connection version data that need to be saved for connectionId.
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of connection version.
                  example: Fetch reservations
                description:
                  type: string
                  description: Description of connection version.
                  example: Get all reservations
                httpMethods:
                  type: array
                  description: >
                    HTTP Methods this connection should be invoked by. You can
                    create different connections that are

                    invoked using same URL but which should behave differently
                    depending on method. For example,

                    there can be connection version that handles requests for
                    "GET /orders" and another connection

                    that handles requests for "POST /orders".
                  example:
                    - POST
                    - PATCH
                  items:
                    type: string
                    enum:
                      - GET
                      - POST
                      - PUT
                      - DELETE
                      - PATCH
                publicUrl:
                  type: string
                  description: Public url that will be invoked by third party or merchant.
                  example: /v1/reservations
                anyOf:
                  type: object
                  properties:
                    proxyUrl:
                      type: string
                      description: >
                        The proxy URL is primarily the URL where requests are
                        forwarded after tokenization or de-tokenization. It
                        applies to inbound connections.
                      example: https://merchant.com/v2/reservations
                    trustedDestinationHosts:
                      type: array
                      description: >
                        The destination hosts are a list of whitelisted hosts to
                        which outbound connections can be proxied.
                      items:
                        type: string
                      example:
                        - stripe.com
                        - example.com
                rules:
                  type: array
                  items:
                    anyOf:
                      - title: Card tokenization
                        type: object
                        properties:
                          action:
                            type: string
                            title: Action of this rule.
                            description: >-
                              The action required by this rule. Examples of
                              actions include tokenization and detokenization.
                            enum:
                              - tokenization
                            example: tokenization
                          config:
                            type: object
                            allOf:
                              - type: object
                                required:
                                  - targetContentType
                                  - targetRecordType
                                  - fields
                                properties:
                                  targetRecordType:
                                    type: string
                                    title: RecordType that has to be tokenized.
                                    enum:
                                      - card
                                      - networkToken
                                    description: >-
                                      RecordType that has to be parsed and
                                      tokenized from Payload.
                                    example: networkToken
                                  targetContentType:
                                    type: string
                                    title: ContentType of target payload.
                                    description: >-
                                      ContentType of target payload that need to
                                      be parsed.
                                    example: xml
                                    enum:
                                      - xml
                                      - json
                                      - formurlencoded
                                      - xmlformurlencoded
                                  expiresIn:
                                    type: integer
                                    title: Record Expiry Duration in Seconds.
                                    description: >-
                                      ExpiresIn refers to the duration in
                                      seconds or time remaining before a record
                                      becomes invalid or deleted.
                                    example: 5000
                                  recordSelector:
                                    type: string
                                    title: Record selector
                                    description: >-
                                      XPath or JSONPath selector for parsing
                                      specified record.
                                    example: /networkToken
                              - type: object
                                properties:
                                  fields:
                                    type: object
                                    required:
                                      - cardNumber
                                      - expiryMonth
                                      - expiryYear
                                    properties:
                                      cardNumber:
                                        title: Card number
                                        description: >-
                                          Rule for parsing cardNumber from
                                          Payload.
                                        type: object
                                        required:
                                          - fieldSelector
                                          - aliasFormat
                                        allOf:
                                          - required:
                                              - fieldSelector
                                              - storagePolicy
                                              - aliasFormat
                                            allOf:
                                              - required:
                                                  - fieldSelector
                                                properties:
                                                  fieldRegex:
                                                    title: Field regex
                                                    description: >
                                                      After a field is selected, specify how
                                                      it should be stored or retrieved. You
                                                      can use a regex expression to parse the
                                                      field.

                                                      For example, if a card number contains
                                                      dashes in the payload and you need to
                                                      remove them, you can use a regex
                                                      expression to do so.
                                                    nullable: true
                                                    type:
                                                      - string
                                                  fieldSelector:
                                                    title: field selector
                                                    description: >-
                                                      Allows to parse the field from request
                                                      or response payload.
                                                    minLength: 1
                                                    type: string
                                                type: object
                                              - type: object
                                                properties:
                                                  aliasFormat:
                                                    title: Alias format
                                                    default: keepOriginal
                                                    enum:
                                                      - uuid
                                                      - keepOriginal
                                                    type: string
                                                  displayFormat:
                                                    title: Display format
                                                    nullable: true
                                                    type: string
                                                  replacementFormat:
                                                    title: Replacement format
                                                    description: >
                                                      Defines with what value the field should
                                                      be replaced with. By default or when
                                                      replaceWithAlias selected,

                                                      the tokenized value is replaced with its
                                                      alias. When replaceWithDisplayableValue
                                                      selected, the field

                                                      value is replaced with its displayable
                                                      value.
                                                    nullable: true
                                                    type: string
                                                    enum:
                                                      - replaceWithAlias
                                                      - replaceWithDisplayableValue
                                                  storagePolicy:
                                                    title: Storage policy
                                                    default: permanent
                                                    enum:
                                                      - permanent
                                                      - volatile
                                                    type: string
                                          - type: object
                                            properties:
                                              aliasFormat:
                                                title: Alias format
                                                description: >-
                                                  Alias format on how merchant receive
                                                  this field.
                                                default: uuid
                                                enum:
                                                  - uuid
                                                  - binTFourAlphanumeric
                                                type: string
                                              displayFormat:
                                                title: Display format
                                                description: >-
                                                  Display format on how this field we will
                                                  displayed post tokenization.
                                                default: last4
                                                enum:
                                                  - last4
                                                type: string
                                              storagePolicy:
                                                title: Storage policy
                                                description: Storage policy for this field in vault.
                                                default: permanent
                                                enum:
                                                  - permanent
                                                type: string
                                      securityCode:
                                        title: Security code
                                        description: >-
                                          Rule for parsing securityCode from
                                          Payload.
                                        required:
                                          - fieldSelector
                                          - storagePolicy
                                          - aliasFormat
                                        properties:
                                          aliasFormat:
                                            title: Alias format
                                            description: >-
                                              Alias format on how merchant receive
                                              this field.
                                            default: uuid
                                            enum:
                                              - uuid
                                            type: string
                                          storagePolicy:
                                            title: Storage policy
                                            description: Storage policy for this field in vault.
                                            default: volatile
                                            enum:
                                              - volatile
                                            type: string
                                        type: object
                                      expiryMonth:
                                        required:
                                          - fieldSelector
                                          - storagePolicy
                                          - aliasFormat
                                        allOf:
                                          - required:
                                              - fieldSelector
                                            properties:
                                              fieldRegex:
                                                title: Field regex
                                                description: >
                                                  After a field is selected, specify how
                                                  it should be stored or retrieved. You
                                                  can use a regex expression to parse the
                                                  field.

                                                  For example, if a card number contains
                                                  dashes in the payload and you need to
                                                  remove them, you can use a regex
                                                  expression to do so.
                                                nullable: true
                                                type:
                                                  - string
                                              fieldSelector:
                                                title: field selector
                                                description: >-
                                                  Allows to parse the field from request
                                                  or response payload.
                                                minLength: 1
                                                type: string
                                            type: object
                                          - type: object
                                            properties:
                                              aliasFormat:
                                                title: Alias format
                                                default: keepOriginal
                                                enum:
                                                  - uuid
                                                  - keepOriginal
                                                type: string
                                              displayFormat:
                                                title: Display format
                                                nullable: true
                                                type: string
                                              replacementFormat:
                                                title: Replacement format
                                                description: >
                                                  Defines with what value the field should
                                                  be replaced with. By default or when
                                                  replaceWithAlias selected,

                                                  the tokenized value is replaced with its
                                                  alias. When replaceWithDisplayableValue
                                                  selected, the field

                                                  value is replaced with its displayable
                                                  value.
                                                nullable: true
                                                type: string
                                                enum:
                                                  - replaceWithAlias
                                                  - replaceWithDisplayableValue
                                              storagePolicy:
                                                title: Storage policy
                                                default: permanent
                                                enum:
                                                  - permanent
                                                  - volatile
                                                type: string
                                        title: Expiry month
                                        description: >-
                                          Rule for parsing expiryMonth from
                                          Payload.
                                      expiryYear:
                                        required:
                                          - fieldSelector
                                          - storagePolicy
                                          - aliasFormat
                                        allOf:
                                          - required:
                                              - fieldSelector
                                            properties:
                                              fieldRegex:
                                                title: Field regex
                                                description: >
                                                  After a field is selected, specify how
                                                  it should be stored or retrieved. You
                                                  can use a regex expression to parse the
                                                  field.

                                                  For example, if a card number contains
                                                  dashes in the payload and you need to
                                                  remove them, you can use a regex
                                                  expression to do so.
                                                nullable: true
                                                type:
                                                  - string
                                              fieldSelector:
                                                title: field selector
                                                description: >-
                                                  Allows to parse the field from request
                                                  or response payload.
                                                minLength: 1
                                                type: string
                                            type: object
                                          - type: object
                                            properties:
                                              aliasFormat:
                                                title: Alias format
                                                default: keepOriginal
                                                enum:
                                                  - uuid
                                                  - keepOriginal
                                                type: string
                                              displayFormat:
                                                title: Display format
                                                nullable: true
                                                type: string
                                              replacementFormat:
                                                title: Replacement format
                                                description: >
                                                  Defines with what value the field should
                                                  be replaced with. By default or when
                                                  replaceWithAlias selected,

                                                  the tokenized value is replaced with its
                                                  alias. When replaceWithDisplayableValue
                                                  selected, the field

                                                  value is replaced with its displayable
                                                  value.
                                                nullable: true
                                                type: string
                                                enum:
                                                  - replaceWithAlias
                                                  - replaceWithDisplayableValue
                                              storagePolicy:
                                                title: Storage policy
                                                default: permanent
                                                enum:
                                                  - permanent
                                                  - volatile
                                                type: string
                                        title: Expiry year
                                        description: >-
                                          Rule for parsing expiryYear from
                                          Payload.
                                      holderName:
                                        required:
                                          - fieldSelector
                                          - storagePolicy
                                          - aliasFormat
                                        allOf:
                                          - required:
                                              - fieldSelector
                                            properties:
                                              fieldRegex:
                                                title: Field regex
                                                description: >
                                                  After a field is selected, specify how
                                                  it should be stored or retrieved. You
                                                  can use a regex expression to parse the
                                                  field.

                                                  For example, if a card number contains
                                                  dashes in the payload and you need to
                                                  remove them, you can use a regex
                                                  expression to do so.
                                                nullable: true
                                                type:
                                                  - string
                                              fieldSelector:
                                                title: field selector
                                                description: >-
                                                  Allows to parse the field from request
                                                  or response payload.
                                                minLength: 1
                                                type: string
                                            type: object
                                          - type: object
                                            properties:
                                              aliasFormat:
                                                title: Alias format
                                                default: keepOriginal
                                                enum:
                                                  - uuid
                                                  - keepOriginal
                                                type: string
                                              displayFormat:
                                                title: Display format
                                                nullable: true
                                                type: string
                                              replacementFormat:
                                                title: Replacement format
                                                description: >
                                                  Defines with what value the field should
                                                  be replaced with. By default or when
                                                  replaceWithAlias selected,

                                                  the tokenized value is replaced with its
                                                  alias. When replaceWithDisplayableValue
                                                  selected, the field

                                                  value is replaced with its displayable
                                                  value.
                                                nullable: true
                                                type: string
                                                enum:
                                                  - replaceWithAlias
                                                  - replaceWithDisplayableValue
                                              storagePolicy:
                                                title: Storage policy
                                                default: permanent
                                                enum:
                                                  - permanent
                                                  - volatile
                                                type: string
                                        title: Card holder name
                                        description: >-
                                          Rule for parsing cardHolderName from
                                          Payload.
                      - title: Network token tokenization
                        type: object
                        properties:
                          action:
                            type: string
                            title: Action of this rule.
                            description: >-
                              The action required by this rule. Examples of
                              actions include tokenization and detokenization.
                            enum:
                              - tokenization
                            example: tokenization
                          config:
                            type: object
                            required:
                              - targetContentType
                              - targetRecordType
                              - fields
                            allOf:
                              - type: object
                                required:
                                  - targetContentType
                                  - targetRecordType
                                  - fields
                                properties:
                                  targetRecordType:
                                    type: string
                                    title: RecordType that has to be tokenized.
                                    enum:
                                      - card
                                      - networkToken
                                    description: >-
                                      RecordType that has to be parsed and
                                      tokenized from Payload.
                                    example: networkToken
                                  targetContentType:
                                    type: string
                                    title: ContentType of target payload.
                                    description: >-
                                      ContentType of target payload that need to
                                      be parsed.
                                    example: xml
                                    enum:
                                      - xml
                                      - json
                                      - formurlencoded
                                      - xmlformurlencoded
                                  expiresIn:
                                    type: integer
                                    title: Record Expiry Duration in Seconds.
                                    description: >-
                                      ExpiresIn refers to the duration in
                                      seconds or time remaining before a record
                                      becomes invalid or deleted.
                                    example: 5000
                                  recordSelector:
                                    type: string
                                    title: Record selector
                                    description: >-
                                      XPath or JSONPath selector for parsing
                                      specified record.
                                    example: /networkToken
                              - type: object
                                properties:
                                  fields:
                                    type: object
                                    required:
                                      - networkToken
                                      - expiryMonth
                                      - expiryYear
                                    properties:
                                      networkToken:
                                        title: Network token
                                        description: >-
                                          Rule for parsing networkToken -
                                          accountNumber from Payload.
                                        type: object
                                        required:
                                          - fieldSelector
                                          - aliasFormat
                                        allOf:
                                          - required:
                                              - fieldSelector
                                              - storagePolicy
                                              - aliasFormat
                                            allOf:
                                              - required:
                                                  - fieldSelector
                                                properties:
                                                  fieldRegex:
                                                    title: Field regex
                                                    description: >
                                                      After a field is selected, specify how
                                                      it should be stored or retrieved. You
                                                      can use a regex expression to parse the
                                                      field.

                                                      For example, if a card number contains
                                                      dashes in the payload and you need to
                                                      remove them, you can use a regex
                                                      expression to do so.
                                                    nullable: true
                                                    type:
                                                      - string
                                                  fieldSelector:
                                                    title: field selector
                                                    description: >-
                                                      Allows to parse the field from request
                                                      or response payload.
                                                    minLength: 1
                                                    type: string
                                                type: object
                                              - type: object
                                                properties:
                                                  aliasFormat:
                                                    title: Alias format
                                                    default: keepOriginal
                                                    enum:
                                                      - uuid
                                                      - keepOriginal
                                                    type: string
                                                  displayFormat:
                                                    title: Display format
                                                    nullable: true
                                                    type: string
                                                  replacementFormat:
                                                    title: Replacement format
                                                    description: >
                                                      Defines with what value the field should
                                                      be replaced with. By default or when
                                                      replaceWithAlias selected,

                                                      the tokenized value is replaced with its
                                                      alias. When replaceWithDisplayableValue
                                                      selected, the field

                                                      value is replaced with its displayable
                                                      value.
                                                    nullable: true
                                                    type: string
                                                    enum:
                                                      - replaceWithAlias
                                                      - replaceWithDisplayableValue
                                                  storagePolicy:
                                                    title: Storage policy
                                                    default: permanent
                                                    enum:
                                                      - permanent
                                                      - volatile
                                                    type: string
                                          - type: object
                                            properties:
                                              aliasFormat:
                                                title: Alias format
                                                description: >-
                                                  Alias format on how merchant receive
                                                  this field.
                                                default: uuid
                                                enum:
                                                  - uuid
                                                  - binTFourAlphanumeric
                                                type: string
                                              displayFormat:
                                                title: Display format
                                                description: >-
                                                  Display format on how this field we will
                                                  displayed post tokenization.
                                                default: last4
                                                enum:
                                                  - last4
                                                type: string
                                              storagePolicy:
                                                title: Storage policy
                                                description: Storage policy for this field in vault.
                                                default: permanent
                                                enum:
                                                  - permanent
                                                type: string
                                      cryptogram:
                                        title: Cryptogram
                                        description: >-
                                          Rule for parsing cryptogram from
                                          Payload.
                                        required:
                                          - fieldSelector
                                          - storagePolicy
                                          - aliasFormat
                                        properties:
                                          aliasFormat:
                                            title: Alias format
                                            description: >-
                                              Alias format on how merchant receive
                                              this field.
                                            default: uuid
                                            enum:
                                              - uuid
                                            type: string
                                          storagePolicy:
                                            title: Storage policy
                                            description: Storage policy for this field in vault.
                                            default: volatile
                                            enum:
                                              - volatile
                                            type: string
                                        type: object
                                      expiryMonth:
                                        required:
                                          - fieldSelector
                                          - storagePolicy
                                          - aliasFormat
                                        allOf:
                                          - required:
                                              - fieldSelector
                                            properties:
                                              fieldRegex:
                                                title: Field regex
                                                description: >
                                                  After a field is selected, specify how
                                                  it should be stored or retrieved. You
                                                  can use a regex expression to parse the
                                                  field.

                                                  For example, if a card number contains
                                                  dashes in the payload and you need to
                                                  remove them, you can use a regex
                                                  expression to do so.
                                                nullable: true
                                                type:
                                                  - string
                                              fieldSelector:
                                                title: field selector
                                                description: >-
                                                  Allows to parse the field from request
                                                  or response payload.
                                                minLength: 1
                                                type: string
                                            type: object
                                          - type: object
                                            properties:
                                              aliasFormat:
                                                title: Alias format
                                                default: keepOriginal
                                                enum:
                                                  - uuid
                                                  - keepOriginal
                                                type: string
                                              displayFormat:
                                                title: Display format
                                                nullable: true
                                                type: string
                                              replacementFormat:
                                                title: Replacement format
                                                description: >
                                                  Defines with what value the field should
                                                  be replaced with. By default or when
                                                  replaceWithAlias selected,

                                                  the tokenized value is replaced with its
                                                  alias. When replaceWithDisplayableValue
                                                  selected, the field

                                                  value is replaced with its displayable
                                                  value.
                                                nullable: true
                                                type: string
                                                enum:
                                                  - replaceWithAlias
                                                  - replaceWithDisplayableValue
                                              storagePolicy:
                                                title: Storage policy
                                                default: permanent
                                                enum:
                                                  - permanent
                                                  - volatile
                                                type: string
                                        title: Expiry month
                                        description: >-
                                          Rule for parsing expiryMonth from
                                          Payload.
                                      expiryYear:
                                        required:
                                          - fieldSelector
                                          - storagePolicy
                                          - aliasFormat
                                        allOf:
                                          - required:
                                              - fieldSelector
                                            properties:
                                              fieldRegex:
                                                title: Field regex
                                                description: >
                                                  After a field is selected, specify how
                                                  it should be stored or retrieved. You
                                                  can use a regex expression to parse the
                                                  field.

                                                  For example, if a card number contains
                                                  dashes in the payload and you need to
                                                  remove them, you can use a regex
                                                  expression to do so.
                                                nullable: true
                                                type:
                                                  - string
                                              fieldSelector:
                                                title: field selector
                                                description: >-
                                                  Allows to parse the field from request
                                                  or response payload.
                                                minLength: 1
                                                type: string
                                            type: object
                                          - type: object
                                            properties:
                                              aliasFormat:
                                                title: Alias format
                                                default: keepOriginal
                                                enum:
                                                  - uuid
                                                  - keepOriginal
                                                type: string
                                              displayFormat:
                                                title: Display format
                                                nullable: true
                                                type: string
                                              replacementFormat:
                                                title: Replacement format
                                                description: >
                                                  Defines with what value the field should
                                                  be replaced with. By default or when
                                                  replaceWithAlias selected,

                                                  the tokenized value is replaced with its
                                                  alias. When replaceWithDisplayableValue
                                                  selected, the field

                                                  value is replaced with its displayable
                                                  value.
                                                nullable: true
                                                type: string
                                                enum:
                                                  - replaceWithAlias
                                                  - replaceWithDisplayableValue
                                              storagePolicy:
                                                title: Storage policy
                                                default: permanent
                                                enum:
                                                  - permanent
                                                  - volatile
                                                type: string
                                        title: Expiry year
                                        description: >-
                                          Rule for parsing expiryYear from
                                          Payload.
                      - title: Card detokenization
                        type: object
                        properties:
                          action:
                            type: string
                            title: Action of this rule.
                            description: >-
                              The action required by this rule. Examples of
                              actions include tokenization and detokenization.
                            enum:
                              - detokenization
                            example: detokenization
                          config:
                            type: object
                            allOf:
                              - type: object
                                required:
                                  - targetContentType
                                  - targetRecordType
                                  - fields
                                properties:
                                  targetRecordType:
                                    type: string
                                    title: RecordType that has to be tokenized.
                                    enum:
                                      - card
                                      - networkToken
                                    description: >-
                                      RecordType that has to be parsed and
                                      tokenized from Payload.
                                    example: networkToken
                                  targetContentType:
                                    type: string
                                    title: ContentType of target payload.
                                    description: >-
                                      ContentType of target payload that need to
                                      be parsed.
                                    example: xml
                                    enum:
                                      - xml
                                      - json
                                      - formurlencoded
                                      - xmlformurlencoded
                                  expiresIn:
                                    type: integer
                                    title: Record Expiry Duration in Seconds.
                                    description: >-
                                      ExpiresIn refers to the duration in
                                      seconds or time remaining before a record
                                      becomes invalid or deleted.
                                    example: 5000
                                  recordSelector:
                                    type: string
                                    title: Record selector
                                    description: >-
                                      XPath or JSONPath selector for parsing
                                      specified record.
                                    example: /networkToken
                              - type: object
                                properties:
                                  fields:
                                    type: object
                                    required:
                                      - cardNumber
                                      - expiryMonth
                                      - expiryYear
                                    properties:
                                      cardNumber:
                                        required:
                                          - fieldSelector
                                        properties:
                                          fieldRegex:
                                            title: Field regex
                                            description: >
                                              After a field is selected, specify how
                                              it should be stored or retrieved. You
                                              can use a regex expression to parse the
                                              field.

                                              For example, if a card number contains
                                              dashes in the payload and you need to
                                              remove them, you can use a regex
                                              expression to do so.
                                            nullable: true
                                            type:
                                              - string
                                          fieldSelector:
                                            title: field selector
                                            description: >-
                                              Allows to parse the field from request
                                              or response payload.
                                            minLength: 1
                                            type: string
                                        type: object
                                        title: Card number
                                        description: >-
                                          Rule for parsing cardNumber from
                                          Payload.
                                      securityCode:
                                        required:
                                          - fieldSelector
                                        properties:
                                          fieldRegex:
                                            title: Field regex
                                            description: >
                                              After a field is selected, specify how
                                              it should be stored or retrieved. You
                                              can use a regex expression to parse the
                                              field.

                                              For example, if a card number contains
                                              dashes in the payload and you need to
                                              remove them, you can use a regex
                                              expression to do so.
                                            nullable: true
                                            type:
                                              - string
                                          fieldSelector:
                                            title: field selector
                                            description: >-
                                              Allows to parse the field from request
                                              or response payload.
                                            minLength: 1
                                            type: string
                                        type: object
                                        title: Security code
                                        description: >-
                                          Rule for parsing securityCode from
                                          Payload.
                                      expiryMonth:
                                        required:
                                          - fieldSelector
                                        properties:
                                          fieldRegex:
                                            title: Field regex
                                            description: >
                                              After a field is selected, specify how
                                              it should be stored or retrieved. You
                                              can use a regex expression to parse the
                                              field.

                                              For example, if a card number contains
                                              dashes in the payload and you need to
                                              remove them, you can use a regex
                                              expression to do so.
                                            nullable: true
                                            type:
                                              - string
                                          fieldSelector:
                                            title: field selector
                                            description: >-
                                              Allows to parse the field from request
                                              or response payload.
                                            minLength: 1
                                            type: string
                                        type: object
                                        title: Expiry month
                                        description: >-
                                          Rule for parsing expiryMonth from
                                          Payload.
                                      expiryYear:
                                        required:
                                          - fieldSelector
                                        properties:
                                          fieldRegex:
                                            title: Field regex
                                            description: >
                                              After a field is selected, specify how
                                              it should be stored or retrieved. You
                                              can use a regex expression to parse the
                                              field.

                                              For example, if a card number contains
                                              dashes in the payload and you need to
                                              remove them, you can use a regex
                                              expression to do so.
                                            nullable: true
                                            type:
                                              - string
                                          fieldSelector:
                                            title: field selector
                                            description: >-
                                              Allows to parse the field from request
                                              or response payload.
                                            minLength: 1
                                            type: string
                                        type: object
                                        title: Expiry year
                                        description: >-
                                          Rule for parsing expiryYear from
                                          Payload.
                                      holderName:
                                        required:
                                          - fieldSelector
                                        properties:
                                          fieldRegex:
                                            title: Field regex
                                            description: >
                                              After a field is selected, specify how
                                              it should be stored or retrieved. You
                                              can use a regex expression to parse the
                                              field.

                                              For example, if a card number contains
                                              dashes in the payload and you need to
                                              remove them, you can use a regex
                                              expression to do so.
                                            nullable: true
                                            type:
                                              - string
                                          fieldSelector:
                                            title: field selector
                                            description: >-
                                              Allows to parse the field from request
                                              or response payload.
                                            minLength: 1
                                            type: string
                                        type: object
                                        title: Card holder name
                                        description: >-
                                          Rule for parsing cardHolderName from
                                          Payload.
                      - title: Network token detokenization
                        type: object
                        properties:
                          action:
                            type: string
                            title: Action of this rule.
                            description: >-
                              The action required by this rule. Examples of
                              actions include tokenization and detokenization.
                            enum:
                              - detokenization
                            example: detokenization
                          config:
                            type: object
                            allOf:
                              - type: object
                                required:
                                  - targetContentType
                                  - targetRecordType
                                  - fields
                                properties:
                                  targetRecordType:
                                    type: string
                                    title: RecordType that has to be tokenized.
                                    enum:
                                      - card
                                      - networkToken
                                    description: >-
                                      RecordType that has to be parsed and
                                      tokenized from Payload.
                                    example: networkToken
                                  targetContentType:
                                    type: string
                                    title: ContentType of target payload.
                                    description: >-
                                      ContentType of target payload that need to
                                      be parsed.
                                    example: xml
                                    enum:
                                      - xml
                                      - json
                                      - formurlencoded
                                      - xmlformurlencoded
                                  expiresIn:
                                    type: integer
                                    title: Record Expiry Duration in Seconds.
                                    description: >-
                                      ExpiresIn refers to the duration in
                                      seconds or time remaining before a record
                                      becomes invalid or deleted.
                                    example: 5000
                                  recordSelector:
                                    type: string
                                    title: Record selector
                                    description: >-
                                      XPath or JSONPath selector for parsing
                                      specified record.
                                    example: /networkToken
                              - type: object
                                properties:
                                  fields:
                                    type: object
                                    required:
                                      - networkToken
                                      - expiryMonth
                                      - expiryYear
                                    properties:
                                      networkToken:
                                        required:
                                          - fieldSelector
                                        properties:
                                          fieldRegex:
                                            title: Field regex
                                            description: >
                                              After a field is selected, specify how
                                              it should be stored or retrieved. You
                                              can use a regex expression to parse the
                                              field.

                                              For example, if a card number contains
                                              dashes in the payload and you need to
                                              remove them, you can use a regex
                                              expression to do so.
                                            nullable: true
                                            type:
                                              - string
                                          fieldSelector:
                                            title: field selector
                                            description: >-
                                              Allows to parse the field from request
                                              or response payload.
                                            minLength: 1
                                            type: string
                                        type: object
                                        title: Network token
                                        description: >-
                                          Rule for parsing networkToken -
                                          accountNumber from Payload.
                                      cryptogram:
                                        required:
                                          - fieldSelector
                                        properties:
                                          fieldRegex:
                                            title: Field regex
                                            description: >
                                              After a field is selected, specify how
                                              it should be stored or retrieved. You
                                              can use a regex expression to parse the
                                              field.

                                              For example, if a card number contains
                                              dashes in the payload and you need to
                                              remove them, you can use a regex
                                              expression to do so.
                                            nullable: true
                                            type:
                                              - string
                                          fieldSelector:
                                            title: field selector
                                            description: >-
                                              Allows to parse the field from request
                                              or response payload.
                                            minLength: 1
                                            type: string
                                        type: object
                                        title: Cryptogram
                                        description: >-
                                          Rule for parsing cryptogram from
                                          Payload.
                                      expiryMonth:
                                        required:
                                          - fieldSelector
                                        properties:
                                          fieldRegex:
                                            title: Field regex
                                            description: >
                                              After a field is selected, specify how
                                              it should be stored or retrieved. You
                                              can use a regex expression to parse the
                                              field.

                                              For example, if a card number contains
                                              dashes in the payload and you need to
                                              remove them, you can use a regex
                                              expression to do so.
                                            nullable: true
                                            type:
                                              - string
                                          fieldSelector:
                                            title: field selector
                                            description: >-
                                              Allows to parse the field from request
                                              or response payload.
                                            minLength: 1
                                            type: string
                                        type: object
                                        title: Expiry month
                                        description: >-
                                          Rule for parsing expiryMonth from
                                          Payload.
                                      expiryYear:
                                        required:
                                          - fieldSelector
                                        properties:
                                          fieldRegex:
                                            title: Field regex
                                            description: >
                                              After a field is selected, specify how
                                              it should be stored or retrieved. You
                                              can use a regex expression to parse the
                                              field.

                                              For example, if a card number contains
                                              dashes in the payload and you need to
                                              remove them, you can use a regex
                                              expression to do so.
                                            nullable: true
                                            type:
                                              - string
                                          fieldSelector:
                                            title: field selector
                                            description: >-
                                              Allows to parse the field from request
                                              or response payload.
                                            minLength: 1
                                            type: string
                                        type: object
                                        title: Expiry year
                                        description: >-
                                          Rule for parsing expiryYear from
                                          Payload.
                      - title: Custom function
                        description: Function that executed as part of this rule.
                        type: object
                        properties:
                          action:
                            type: string
                            title: Action of this rule.
                            description: >-
                              The action required by this rule. Examples of
                              actions include tokenization and detokenization.
                            enum:
                              - customFunction
                            example: customFunction
                          function:
                            type: object
                            title: Custom function.
                            description: >-
                              Custom function that will be executed as part of
                              this rule.
                            properties:
                              identifier:
                                type: string
                                title: Custom function identifier
                                description: >-
                                  Unique name of custom function that will be
                                  executed part of this rule.
                                enum:
                                  - maskedCardInRequestHeaders
                status:
                  type: string
                  example: draft
            examples:
              inbound:
                description: Inbound connection version
                value:
                  name: Fetch reservations
                  description: get all reservations
                  publicUrl: /test-me
                  proxyUrl: https://test.com/path/123
                  httpMethods:
                    - POST
                    - PATCH
                  rules:
                    - action: tokenization
                      config:
                        targetRecordType: card
                        targetContentType: xml
                        expiresIn: 5000
                        fields:
                          cardNumber:
                            aliasFormat: uuid
                            displayFormat: last4
                            fieldSelector: /card/expiryMonth
                            storagePolicy: permanent
                          expiryMonth:
                            aliasFormat: uuid
                            displayFormat: null
                            fieldSelector: /card/expiryMonth
                            storagePolicy: permanent
                          expiryYear:
                            aliasFormat: uuid
                            fieldSelector: /card/expiryYear
                            storagePolicy: permanent
                          securityCode:
                            aliasFormat: uuid
                            fieldSelector: /card/cvv
                            storagePolicy: volatile
                          holderName:
                            aliasFormat: uuid
                            fieldSelector: /card/holderName
                            storagePolicy: permanent
                        recordSelector: /xxx/card
                      sequence: 1
                      target: requestBody
                    - action: tokenization
                      config:
                        targetContentType: xml
                        targetRecordType: networkToken
                        expiresIn: 5000
                        fields:
                          networkToken:
                            aliasFormat: uuid
                            displayFormat: last4
                            fieldSelector: /card/expiryMonth
                            storagePolicy: permanent
                          expiryMonth:
                            aliasFormat: uuid
                            fieldSelector: /card/expiryMonth
                            storagePolicy: permanent
                          expiryYear:
                            aliasFormat: uuid
                            fieldSelector: /card/expiryMonth
                            storagePolicy: permanent
                        recordSelector: /xxx/card
                      sequence: 2
                      target: requestBody
                    - action: customFunction
                      function:
                        identifier: maskedCardInRequestHeaders
                      sequence: 3
                      target: requestBody
                  status: draft
              outbound:
                description: outbound connection version
                value:
                  name: Fetch reservations
                  description: get all reservations
                  publicUrl: /test-me
                  httpMethods:
                    - POST
                    - PATCH
                  trustedDestinationHosts:
                    - test.com
                    - example.com
                  rules:
                    - action: detokenization
                      config:
                        targetRecordType: card
                        targetContentType: xml
                        expiresIn: 5000
                        fields:
                          cardNumber:
                            fieldSelector: /card/number
                          expiryMonth:
                            fieldSelector: /card/expiryMonth
                            fieldRegex: (.*)/.*
                          expiryYear:
                            fieldSelector: /card/expiryYear
                            fieldRegex: .*/(.*)
                          holderName:
                            fieldSelector: /card/name
                        recordSelector: /xxx/card
                      sequence: 1
                      target: requestBody
                    - action: detokenization
                      config:
                        targetRecordType: networkToken
                        targetContentType: xml
                        expiresIn: 5000
                        fields:
                          networkToken:
                            fieldSelector: /card/number
                          expiryMonth:
                            fieldSelector: /card/expiryMonth
                            fieldRegex: (.*)/.*
                          expiryYear:
                            fieldSelector: /card/expiryYear
                            fieldRegex: .*/(.*)
                        recordSelector: /xxx/card
                      sequence: 2
                      target: requestBody
                  status: draft
      responses:
        '201':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                    description: Name of connection version.
                    example: Fetch reservations
                  description:
                    type: string
                    description: Description of connection version.
                    example: Get all reservations
                  httpMethods:
                    type: array
                    description: >
                      HTTP Methods this connection should be invoked by. You can
                      create different connections that are

                      invoked using same URL but which should behave differently
                      depending on method. For example,

                      there can be connection version that handles requests for
                      "GET /orders" and another connection

                      that handles requests for "POST /orders".
                    example:
                      - POST
                      - PATCH
                    items:
                      type: string
                      enum:
                        - GET
                        - POST
                        - PUT
                        - DELETE
                        - PATCH
                  publicUrl:
                    type: string
                    description: >-
                      Public url that will be invoked by third party or
                      merchant.
                    example: /v1/reservations
                  anyOf:
                    type: object
                    properties:
                      proxyUrl:
                        type: string
                        description: >
                          The proxy URL is primarily the URL where requests are
                          forwarded after tokenization or de-tokenization. It
                          applies to inbound connections.
                        example: https://merchant.com/v2/reservations
                      trustedDestinationHosts:
                        type: array
                        description: >
                          The destination hosts are a list of whitelisted hosts
                          to which outbound connections can be proxied.
                        items:
                          type: string
                        example:
                          - stripe.com
                          - example.com
                  rules:
                    type: array
                    items:
                      anyOf:
                        - title: Card tokenization
                          type: object
                          properties:
                            action:
                              type: string
                              title: Action of this rule.
                              description: >-
                                The action required by this rule. Examples of
                                actions include tokenization and detokenization.
                              enum:
                                - tokenization
                              example: tokenization
                            config:
                              type: object
                              allOf:
                                - type: object
                                  required:
                                    - targetContentType
                                    - targetRecordType
                                    - fields
                                  properties:
                                    targetRecordType:
                                      type: string
                                      title: RecordType that has to be tokenized.
                                      enum:
                                        - card
                                        - networkToken
                                      description: >-
                                        RecordType that has to be parsed and
                                        tokenized from Payload.
                                      example: networkToken
                                    targetContentType:
                                      type: string
                                      title: ContentType of target payload.
                                      description: >-
                                        ContentType of target payload that need
                                        to be parsed.
                                      example: xml
                                      enum:
                                        - xml
                                        - json
                                        - formurlencoded
                                        - xmlformurlencoded
                                    expiresIn:
                                      type: integer
                                      title: Record Expiry Duration in Seconds.
                                      description: >-
                                        ExpiresIn refers to the duration in
                                        seconds or time remaining before a
                                        record becomes invalid or deleted.
                                      example: 5000
                                    recordSelector:
                                      type: string
                                      title: Record selector
                                      description: >-
                                        XPath or JSONPath selector for parsing
                                        specified record.
                                      example: /networkToken
                                - type: object
                                  properties:
                                    fields:
                                      type: object
                                      required:
                                        - cardNumber
                                        - expiryMonth
                                        - expiryYear
                                      properties:
                                        cardNumber:
                                          title: Card number
                                          description: >-
                                            Rule for parsing cardNumber from
                                            Payload.
                                          type: object
                                          required:
                                            - fieldSelector
                                            - aliasFormat
                                          allOf:
                                            - required:
                                                - fieldSelector
                                                - storagePolicy
                                                - aliasFormat
                                              allOf:
                                                - required:
                                                    - fieldSelector
                                                  properties:
                                                    fieldRegex:
                                                      title: Field regex
                                                      description: >
                                                        After a field is selected, specify how
                                                        it should be stored or retrieved. You
                                                        can use a regex expression to parse the
                                                        field.

                                                        For example, if a card number contains
                                                        dashes in the payload and you need to
                                                        remove them, you can use a regex
                                                        expression to do so.
                                                      nullable: true
                                                      type:
                                                        - string
                                                    fieldSelector:
                                                      title: field selector
                                                      description: >-
                                                        Allows to parse the field from request
                                                        or response payload.
                                                      minLength: 1
                                                      type: string
                                                  type: object
                                                - type: object
                                                  properties:
                                                    aliasFormat:
                                                      title: Alias format
                                                      default: keepOriginal
                                                      enum:
                                                        - uuid
                                                        - keepOriginal
                                                      type: string
                                                    displayFormat:
                                                      title: Display format
                                                      nullable: true
                                                      type: string
                                                    replacementFormat:
                                                      title: Replacement format
                                                      description: >
                                                        Defines with what value the field should
                                                        be replaced with. By default or when
                                                        replaceWithAlias selected,

                                                        the tokenized value is replaced with its
                                                        alias. When replaceWithDisplayableValue
                                                        selected, the field

                                                        value is replaced with its displayable
                                                        value.
                                                      nullable: true
                                                      type: string
                                                      enum:
                                                        - replaceWithAlias
                                                        - replaceWithDisplayableValue
                                                    storagePolicy:
                                                      title: Storage policy
                                                      default: permanent
                                                      enum:
                                                        - permanent
                                                        - volatile
                                                      type: string
                                            - type: object
                                              properties:
                                                aliasFormat:
                                                  title: Alias format
                                                  description: >-
                                                    Alias format on how merchant receive
                                                    this field.
                                                  default: uuid
                                                  enum:
                                                    - uuid
                                                    - binTFourAlphanumeric
                                                  type: string
                                                displayFormat:
                                                  title: Display format
                                                  description: >-
                                                    Display format on how this field we will
                                                    displayed post tokenization.
                                                  default: last4
                                                  enum:
                                                    - last4
                                                  type: string
                                                storagePolicy:
                                                  title: Storage policy
                                                  description: Storage policy for this field in vault.
                                                  default: permanent
                                                  enum:
                                                    - permanent
                                                  type: string
                                        securityCode:
                                          title: Security code
                                          description: >-
                                            Rule for parsing securityCode from
                                            Payload.
                                          required:
                                            - fieldSelector
                                            - storagePolicy
                                            - aliasFormat
                                          properties:
                                            aliasFormat:
                                              title: Alias format
                                              description: >-
                                                Alias format on how merchant receive
                                                this field.
                                              default: uuid
                                              enum:
                                                - uuid
                                              type: string
                                            storagePolicy:
                                              title: Storage policy
                                              description: Storage policy for this field in vault.
                                              default: volatile
                                              enum:
                                                - volatile
                                              type: string
                                          type: object
                                        expiryMonth:
                                          required:
                                            - fieldSelector
                                            - storagePolicy
                                            - aliasFormat
                                          allOf:
                                            - required:
                                                - fieldSelector
                                              properties:
                                                fieldRegex:
                                                  title: Field regex
                                                  description: >
                                                    After a field is selected, specify how
                                                    it should be stored or retrieved. You
                                                    can use a regex expression to parse the
                                                    field.

                                                    For example, if a card number contains
                                                    dashes in the payload and you need to
                                                    remove them, you can use a regex
                                                    expression to do so.
                                                  nullable: true
                                                  type:
                                                    - string
                                                fieldSelector:
                                                  title: field selector
                                                  description: >-
                                                    Allows to parse the field from request
                                                    or response payload.
                                                  minLength: 1
                                                  type: string
                                              type: object
                                            - type: object
                                              properties:
                                                aliasFormat:
                                                  title: Alias format
                                                  default: keepOriginal
                                                  enum:
                                                    - uuid
                                                    - keepOriginal
                                                  type: string
                                                displayFormat:
                                                  title: Display format
                                                  nullable: true
                                                  type: string
                                                replacementFormat:
                                                  title: Replacement format
                                                  description: >
                                                    Defines with what value the field should
                                                    be replaced with. By default or when
                                                    replaceWithAlias selected,

                                                    the tokenized value is replaced with its
                                                    alias. When replaceWithDisplayableValue
                                                    selected, the field

                                                    value is replaced with its displayable
                                                    value.
                                                  nullable: true
                                                  type: string
                                                  enum:
                                                    - replaceWithAlias
                                                    - replaceWithDisplayableValue
                                                storagePolicy:
                                                  title: Storage policy
                                                  default: permanent
                                                  enum:
                                                    - permanent
                                                    - volatile
                                                  type: string
                                          title: Expiry month
                                          description: >-
                                            Rule for parsing expiryMonth from
                                            Payload.
                                        expiryYear:
                                          required:
                                            - fieldSelector
                                            - storagePolicy
                                            - aliasFormat
                                          allOf:
                                            - required:
                                                - fieldSelector
                                              properties:
                                                fieldRegex:
                                                  title: Field regex
                                                  description: >
                                                    After a field is selected, specify how
                                                    it should be stored or retrieved. You
                                                    can use a regex expression to parse the
                                                    field.

                                                    For example, if a card number contains
                                                    dashes in the payload and you need to
                                                    remove them, you can use a regex
                                                    expression to do so.
                                                  nullable: true
                                                  type:
                                                    - string
                                                fieldSelector:
                                                  title: field selector
                                                  description: >-
                                                    Allows to parse the field from request
                                                    or response payload.
                                                  minLength: 1
                                                  type: string
                                              type: object
                                            - type: object
                                              properties:
                                                aliasFormat:
                                                  title: Alias format
                                                  default: keepOriginal
                                                  enum:
                                                    - uuid
                                                    - keepOriginal
                                                  type: string
                                                displayFormat:
                                                  title: Display format
                                                  nullable: true
                                                  type: string
                                                replacementFormat:
                                                  title: Replacement format
                                                  description: >
                                                    Defines with what value the field should
                                                    be replaced with. By default or when
                                                    replaceWithAlias selected,

                                                    the tokenized value is replaced with its
                                                    alias. When replaceWithDisplayableValue
                                                    selected, the field

                                                    value is replaced with its displayable
                                                    value.
                                                  nullable: true
                                                  type: string
                                                  enum:
                                                    - replaceWithAlias
                                                    - replaceWithDisplayableValue
                                                storagePolicy:
                                                  title: Storage policy
                                                  default: permanent
                                                  enum:
                                                    - permanent
                                                    - volatile
                                                  type: string
                                          title: Expiry year
                                          description: >-
                                            Rule for parsing expiryYear from
                                            Payload.
                                        holderName:
                                          required:
                                            - fieldSelector
                                            - storagePolicy
                                            - aliasFormat
                                          allOf:
                                            - required:
                                                - fieldSelector
                                              properties:
                                                fieldRegex:
                                                  title: Field regex
                                                  description: >
                                                    After a field is selected, specify how
                                                    it should be stored or retrieved. You
                                                    can use a regex expression to parse the
                                                    field.

                                                    For example, if a card number contains
                                                    dashes in the payload and you need to
                                                    remove them, you can use a regex
                                                    expression to do so.
                                                  nullable: true
                                                  type:
                                                    - string
                                                fieldSelector:
                                                  title: field selector
                                                  description: >-
                                                    Allows to parse the field from request
                                                    or response payload.
                                                  minLength: 1
                                                  type: string
                                              type: object
                                            - type: object
                                              properties:
                                                aliasFormat:
                                                  title: Alias format
                                                  default: keepOriginal
                                                  enum:
                                                    - uuid
                                                    - keepOriginal
                                                  type: string
                                                displayFormat:
                                                  title: Display format
                                                  nullable: true
                                                  type: string
                                                replacementFormat:
                                                  title: Replacement format
                                                  description: >
                                                    Defines with what value the field should
                                                    be replaced with. By default or when
                                                    replaceWithAlias selected,

                                                    the tokenized value is replaced with its
                                                    alias. When replaceWithDisplayableValue
                                                    selected, the field

                                                    value is replaced with its displayable
                                                    value.
                                                  nullable: true
                                                  type: string
                                                  enum:
                                                    - replaceWithAlias
                                                    - replaceWithDisplayableValue
                                                storagePolicy:
                                                  title: Storage policy
                                                  default: permanent
                                                  enum:
                                                    - permanent
                                                    - volatile
                                                  type: string
                                          title: Card holder name
                                          description: >-
                                            Rule for parsing cardHolderName from
                                            Payload.
                        - title: Network token tokenization
                          type: object
                          properties:
                            action:
                              type: string
                              title: Action of this rule.
                              description: >-
                                The action required by this rule. Examples of
                                actions include tokenization and detokenization.
                              enum:
                                - tokenization
                              example: tokenization
                            config:
                              type: object
                              required:
                                - targetContentType
                                - targetRecordType
                                - fields
                              allOf:
                                - type: object
                                  required:
                                    - targetContentType
                                    - targetRecordType
                                    - fields
                                  properties:
                                    targetRecordType:
                                      type: string
                                      title: RecordType that has to be tokenized.
                                      enum:
                                        - card
                                        - networkToken
                                      description: >-
                                        RecordType that has to be parsed and
                                        tokenized from Payload.
                                      example: networkToken
                                    targetContentType:
                                      type: string
                                      title: ContentType of target payload.
                                      description: >-
                                        ContentType of target payload that need
                                        to be parsed.
                                      example: xml
                                      enum:
                                        - xml
                                        - json
                                        - formurlencoded
                                        - xmlformurlencoded
                                    expiresIn:
                                      type: integer
                                      title: Record Expiry Duration in Seconds.
                                      description: >-
                                        ExpiresIn refers to the duration in
                                        seconds or time remaining before a
                                        record becomes invalid or deleted.
                                      example: 5000
                                    recordSelector:
                                      type: string
                                      title: Record selector
                                      description: >-
                                        XPath or JSONPath selector for parsing
                                        specified record.
                                      example: /networkToken
                                - type: object
                                  properties:
                                    fields:
                                      type: object
                                      required:
                                        - networkToken
                                        - expiryMonth
                                        - expiryYear
                                      properties:
                                        networkToken:
                                          title: Network token
                                          description: >-
                                            Rule for parsing networkToken -
                                            accountNumber from Payload.
                                          type: object
                                          required:
                                            - fieldSelector
                                            - aliasFormat
                                          allOf:
                                            - required:
                                                - fieldSelector
                                                - storagePolicy
                                                - aliasFormat
                                              allOf:
                                                - required:
                                                    - fieldSelector
                                                  properties:
                                                    fieldRegex:
                                                      title: Field regex
                                                      description: >
                                                        After a field is selected, specify how
                                                        it should be stored or retrieved. You
                                                        can use a regex expression to parse the
                                                        field.

                                                        For example, if a card number contains
                                                        dashes in the payload and you need to
                                                        remove them, you can use a regex
                                                        expression to do so.
                                                      nullable: true
                                                      type:
                                                        - string
                                                    fieldSelector:
                                                      title: field selector
                                                      description: >-
                                                        Allows to parse the field from request
                                                        or response payload.
                                                      minLength: 1
                                                      type: string
                                                  type: object
                                                - type: object
                                                  properties:
                                                    aliasFormat:
                                                      title: Alias format
                                                      default: keepOriginal
                                                      enum:
                                                        - uuid
                                                        - keepOriginal
                                                      type: string
                                                    displayFormat:
                                                      title: Display format
                                                      nullable: true
                                                      type: string
                                                    replacementFormat:
                                                      title: Replacement format
                                                      description: >
                                                        Defines with what value the field should
                                                        be replaced with. By default or when
                                                        replaceWithAlias selected,

                                                        the tokenized value is replaced with its
                                                        alias. When replaceWithDisplayableValue
                                                        selected, the field

                                                        value is replaced with its displayable
                                                        value.
                                                      nullable: true
                                                      type: string
                                                      enum:
                                                        - replaceWithAlias
                                                        - replaceWithDisplayableValue
                                                    storagePolicy:
                                                      title: Storage policy
                                                      default: permanent
                                                      enum:
                                                        - permanent
                                                        - volatile
                                                      type: string
                                            - type: object
                                              properties:
                                                aliasFormat:
                                                  title: Alias format
                                                  description: >-
                                                    Alias format on how merchant receive
                                                    this field.
                                                  default: uuid
                                                  enum:
                                                    - uuid
                                                    - binTFourAlphanumeric
                                                  type: string
                                                displayFormat:
                                                  title: Display format
                                                  description: >-
                                                    Display format on how this field we will
                                                    displayed post tokenization.
                                                  default: last4
                                                  enum:
                                                    - last4
                                                  type: string
                                                storagePolicy:
                                                  title: Storage policy
                                                  description: Storage policy for this field in vault.
                                                  default: permanent
                                                  enum:
                                                    - permanent
                                                  type: string
                                        cryptogram:
                                          title: Cryptogram
                                          description: >-
                                            Rule for parsing cryptogram from
                                            Payload.
                                          required:
                                            - fieldSelector
                                            - storagePolicy
                                            - aliasFormat
                                          properties:
                                            aliasFormat:
                                              title: Alias format
                                              description: >-
                                                Alias format on how merchant receive
                                                this field.
                                              default: uuid
                                              enum:
                                                - uuid
                                              type: string
                                            storagePolicy:
                                              title: Storage policy
                                              description: Storage policy for this field in vault.
                                              default: volatile
                                              enum:
                                                - volatile
                                              type: string
                                          type: object
                                        expiryMonth:
                                          required:
                                            - fieldSelector
                                            - storagePolicy
                                            - aliasFormat
                                          allOf:
                                            - required:
                                                - fieldSelector
                                              properties:
                                                fieldRegex:
                                                  title: Field regex
                                                  description: >
                                                    After a field is selected, specify how
                                                    it should be stored or retrieved. You
                                                    can use a regex expression to parse the
                                                    field.

                                                    For example, if a card number contains
                                                    dashes in the payload and you need to
                                                    remove them, you can use a regex
                                                    expression to do so.
                                                  nullable: true
                                                  type:
                                                    - string
                                                fieldSelector:
                                                  title: field selector
                                                  description: >-
                                                    Allows to parse the field from request
                                                    or response payload.
                                                  minLength: 1
                                                  type: string
                                              type: object
                                            - type: object
                                              properties:
                                                aliasFormat:
                                                  title: Alias format
                                                  default: keepOriginal
                                                  enum:
                                                    - uuid
                                                    - keepOriginal
                                                  type: string
                                                displayFormat:
                                                  title: Display format
                                                  nullable: true
                                                  type: string
                                                replacementFormat:
                                                  title: Replacement format
                                                  description: >
                                                    Defines with what value the field should
                                                    be replaced with. By default or when
                                                    replaceWithAlias selected,

                                                    the tokenized value is replaced with its
                                                    alias. When replaceWithDisplayableValue
                                                    selected, the field

                                                    value is replaced with its displayable
                                                    value.
                                                  nullable: true
                                                  type: string
                                                  enum:
                                                    - replaceWithAlias
                                                    - replaceWithDisplayableValue
                                                storagePolicy:
                                                  title: Storage policy
                                                  default: permanent
                                                  enum:
                                                    - permanent
                                                    - volatile
                                                  type: string
                                          title: Expiry month
                                          description: >-
                                            Rule for parsing expiryMonth from
                                            Payload.
                                        expiryYear:
                                          required:
                                            - fieldSelector
                                            - storagePolicy
                                            - aliasFormat
                                          allOf:
                                            - required:
                                                - fieldSelector
                                              properties:
                                                fieldRegex:
                                                  title: Field regex
                                                  description: >
                                                    After a field is selected, specify how
                                                    it should be stored or retrieved. You
                                                    can use a regex expression to parse the
                                                    field.

                                                    For example, if a card number contains
                                                    dashes in the payload and you need to
                                                    remove them, you can use a regex
                                                    expression to do so.
                                                  nullable: true
                                                  type:
                                                    - string
                                                fieldSelector:
                                                  title: field selector
                                                  description: >-
                                                    Allows to parse the field from request
                                                    or response payload.
                                                  minLength: 1
                                                  type: string
                                              type: object
                                            - type: object
                                              properties:
                                                aliasFormat:
                                                  title: Alias format
                                                  default: keepOriginal
                                                  enum:
                                                    - uuid
                                                    - keepOriginal
                                                  type: string
                                                displayFormat:
                                                  title: Display format
                                                  nullable: true
                                                  type: string
                                                replacementFormat:
                                                  title: Replacement format
                                                  description: >
                                                    Defines with what value the field should
                                                    be replaced with. By default or when
                                                    replaceWithAlias selected,

                                                    the tokenized value is replaced with its
                                                    alias. When replaceWithDisplayableValue
                                                    selected, the field

                                                    value is replaced with its displayable
                                                    value.
                                                  nullable: true
                                                  type: string
                                                  enum:
                                                    - replaceWithAlias
                                                    - replaceWithDisplayableValue
                                                storagePolicy:
                                                  title: Storage policy
                                                  default: permanent
                                                  enum:
                                                    - permanent
                                                    - volatile
                                                  type: string
                                          title: Expiry year
                                          description: >-
                                            Rule for parsing expiryYear from
                                            Payload.
                        - title: Card detokenization
                          type: object
                          properties:
                            action:
                              type: string
                              title: Action of this rule.
                              description: >-
                                The action required by this rule. Examples of
                                actions include tokenization and detokenization.
                              enum:
                                - detokenization
                              example: detokenization
                            config:
                              type: object
                              allOf:
                                - type: object
                                  required:
                                    - targetContentType
                                    - targetRecordType
                                    - fields
                                  properties:
                                    targetRecordType:
                                      type: string
                                      title: RecordType that has to be tokenized.
                                      enum:
                                        - card
                                        - networkToken
                                      description: >-
                                        RecordType that has to be parsed and
                                        tokenized from Payload.
                                      example: networkToken
                                    targetContentType:
                                      type: string
                                      title: ContentType of target payload.
                                      description: >-
                                        ContentType of target payload that need
                                        to be parsed.
                                      example: xml
                                      enum:
                                        - xml
                                        - json
                                        - formurlencoded
                                        - xmlformurlencoded
                                    expiresIn:
                                      type: integer
                                      title: Record Expiry Duration in Seconds.
                                      description: >-
                                        ExpiresIn refers to the duration in
                                        seconds or time remaining before a
                                        record becomes invalid or deleted.
                                      example: 5000
                                    recordSelector:
                                      type: string
                                      title: Record selector
                                      description: >-
                                        XPath or JSONPath selector for parsing
                                        specified record.
                                      example: /networkToken
                                - type: object
                                  properties:
                                    fields:
                                      type: object
                                      required:
                                        - cardNumber
                                        - expiryMonth
                                        - expiryYear
                                      properties:
                                        cardNumber:
                                          required:
                                            - fieldSelector
                                          properties:
                                            fieldRegex:
                                              title: Field regex
                                              description: >
                                                After a field is selected, specify how
                                                it should be stored or retrieved. You
                                                can use a regex expression to parse the
                                                field.

                                                For example, if a card number contains
                                                dashes in the payload and you need to
                                                remove them, you can use a regex
                                                expression to do so.
                                              nullable: true
                                              type:
                                                - string
                                            fieldSelector:
                                              title: field selector
                                              description: >-
                                                Allows to parse the field from request
                                                or response payload.
                                              minLength: 1
                                              type: string
                                          type: object
                                          title: Card number
                                          description: >-
                                            Rule for parsing cardNumber from
                                            Payload.
                                        securityCode:
                                          required:
                                            - fieldSelector
                                          properties:
                                            fieldRegex:
                                              title: Field regex
                                              description: >
                                                After a field is selected, specify how
                                                it should be stored or retrieved. You
                                                can use a regex expression to parse the
                                                field.

                                                For example, if a card number contains
                                                dashes in the payload and you need to
                                                remove them, you can use a regex
                                                expression to do so.
                                              nullable: true
                                              type:
                                                - string
                                            fieldSelector:
                                              title: field selector
                                              description: >-
                                                Allows to parse the field from request
                                                or response payload.
                                              minLength: 1
                                              type: string
                                          type: object
                                          title: Security code
                                          description: >-
                                            Rule for parsing securityCode from
                                            Payload.
                                        expiryMonth:
                                          required:
                                            - fieldSelector
                                          properties:
                                            fieldRegex:
                                              title: Field regex
                                              description: >
                                                After a field is selected, specify how
                                                it should be stored or retrieved. You
                                                can use a regex expression to parse the
                                                field.

                                                For example, if a card number contains
                                                dashes in the payload and you need to
                                                remove them, you can use a regex
                                                expression to do so.
                                              nullable: true
                                              type:
                                                - string
                                            fieldSelector:
                                              title: field selector
                                              description: >-
                                                Allows to parse the field from request
                                                or response payload.
                                              minLength: 1
                                              type: string
                                          type: object
                                          title: Expiry month
                                          description: >-
                                            Rule for parsing expiryMonth from
                                            Payload.
                                        expiryYear:
                                          required:
                                            - fieldSelector
                                          properties:
                                            fieldRegex:
                                              title: Field regex
                                              description: >
                                                After a field is selected, specify how
                                                it should be stored or retrieved. You
                                                can use a regex expression to parse the
                                                field.

                                                For example, if a card number contains
                                                dashes in the payload and you need to
                                                remove them, you can use a regex
                                                expression to do so.
                                              nullable: true
                                              type:
                                                - string
                                            fieldSelector:
                                              title: field selector
                                              description: >-
                                                Allows to parse the field from request
                                                or response payload.
                                              minLength: 1
                                              type: string
                                          type: object
                                          title: Expiry year
                                          description: >-
                                            Rule for parsing expiryYear from
                                            Payload.
                                        holderName:
                                          required:
                                            - fieldSelector
                                          properties:
                                            fieldRegex:
                                              title: Field regex
                                              description: >
                                                After a field is selected, specify how
                                                it should be stored or retrieved. You
                                                can use a regex expression to parse the
                                                field.

                                                For example, if a card number contains
                                                dashes in the payload and you need to
                                                remove them, you can use a regex
                                                expression to do so.
                                              nullable: true
                                              type:
                                                - string
                                            fieldSelector:
                                              title: field selector
                                              description: >-
                                                Allows to parse the field from request
                                                or response payload.
                                              minLength: 1
                                              type: string
                                          type: object
                                          title: Card holder name
                                          description: >-
                                            Rule for parsing cardHolderName from
                                            Payload.
                        - title: Network token detokenization
                          type: object
                          properties:
                            action:
                              type: string
                              title: Action of this rule.
                              description: >-
                                The action required by this rule. Examples of
                                actions include tokenization and detokenization.
                              enum:
                                - detokenization
                              example: detokenization
                            config:
                              type: object
                              allOf:
                                - type: object
                                  required:
                                    - targetContentType
                                    - targetRecordType
                                    - fields
                                  properties:
                                    targetRecordType:
                                      type: string
                                      title: RecordType that has to be tokenized.
                                      enum:
                                        - card
                                        - networkToken
                                      description: >-
                                        RecordType that has to be parsed and
                                        tokenized from Payload.
                                      example: networkToken
                                    targetContentType:
                                      type: string
                                      title: ContentType of target payload.
                                      description: >-
                                        ContentType of target payload that need
                                        to be parsed.
                                      example: xml
                                      enum:
                                        - xml
                                        - json
                                        - formurlencoded
                                        - xmlformurlencoded
                                    expiresIn:
                                      type: integer
                                      title: Record Expiry Duration in Seconds.
                                      description: >-
                                        ExpiresIn refers to the duration in
                                        seconds or time remaining before a
                                        record becomes invalid or deleted.
                                      example: 5000
                                    recordSelector:
                                      type: string
                                      title: Record selector
                                      description: >-
                                        XPath or JSONPath selector for parsing
                                        specified record.
                                      example: /networkToken
                                - type: object
                                  properties:
                                    fields:
                                      type: object
                                      required:
                                        - networkToken
                                        - expiryMonth
                                        - expiryYear
                                      properties:
                                        networkToken:
                                          required:
                                            - fieldSelector
                                          properties:
                                            fieldRegex:
                                              title: Field regex
                                              description: >
                                                After a field is selected, specify how
                                                it should be stored or retrieved. You
                                                can use a regex expression to parse the
                                                field.

                                                For example, if a card number contains
                                                dashes in the payload and you need to
                                                remove them, you can use a regex
                                                expression to do so.
                                              nullable: true
                                              type:
                                                - string
                                            fieldSelector:
                                              title: field selector
                                              description: >-
                                                Allows to parse the field from request
                                                or response payload.
                                              minLength: 1
                                              type: string
                                          type: object
                                          title: Network token
                                          description: >-
                                            Rule for parsing networkToken -
                                            accountNumber from Payload.
                                        cryptogram:
                                          required:
                                            - fieldSelector
                                          properties:
                                            fieldRegex:
                                              title: Field regex
                                              description: >
                                                After a field is selected, specify how
                                                it should be stored or retrieved. You
                                                can use a regex expression to parse the
                                                field.

                                                For example, if a card number contains
                                                dashes in the payload and you need to
                                                remove them, you can use a regex
                                                expression to do so.
                                              nullable: true
                                              type:
                                                - string
                                            fieldSelector:
                                              title: field selector
                                              description: >-
                                                Allows to parse the field from request
                                                or response payload.
                                              minLength: 1
                                              type: string
                                          type: object
                                          title: Cryptogram
                                          description: >-
                                            Rule for parsing cryptogram from
                                            Payload.
                                        expiryMonth:
                                          required:
                                            - fieldSelector
                                          properties:
                                            fieldRegex:
                                              title: Field regex
                                              description: >
                                                After a field is selected, specify how
                                                it should be stored or retrieved. You
                                                can use a regex expression to parse the
                                                field.

                                                For example, if a card number contains
                                                dashes in the payload and you need to
                                                remove them, you can use a regex
                                                expression to do so.
                                              nullable: true
                                              type:
                                                - string
                                            fieldSelector:
                                              title: field selector
                                              description: >-
                                                Allows to parse the field from request
                                                or response payload.
                                              minLength: 1
                                              type: string
                                          type: object
                                          title: Expiry month
                                          description: >-
                                            Rule for parsing expiryMonth from
                                            Payload.
                                        expiryYear:
                                          required:
                                            - fieldSelector
                                          properties:
                                            fieldRegex:
                                              title: Field regex
                                              description: >
                                                After a field is selected, specify how
                                                it should be stored or retrieved. You
                                                can use a regex expression to parse the
                                                field.

                                                For example, if a card number contains
                                                dashes in the payload and you need to
                                                remove them, you can use a regex
                                                expression to do so.
                                              nullable: true
                                              type:
                                                - string
                                            fieldSelector:
                                              title: field selector
                                              description: >-
                                                Allows to parse the field from request
                                                or response payload.
                                              minLength: 1
                                              type: string
                                          type: object
                                          title: Expiry year
                                          description: >-
                                            Rule for parsing expiryYear from
                                            Payload.
                        - title: Custom function
                          description: Function that executed as part of this rule.
                          type: object
                          properties:
                            action:
                              type: string
                              title: Action of this rule.
                              description: >-
                                The action required by this rule. Examples of
                                actions include tokenization and detokenization.
                              enum:
                                - customFunction
                              example: customFunction
                            function:
                              type: object
                              title: Custom function.
                              description: >-
                                Custom function that will be executed as part of
                                this rule.
                              properties:
                                identifier:
                                  type: string
                                  title: Custom function identifier
                                  description: >-
                                    Unique name of custom function that will be
                                    executed part of this rule.
                                  enum:
                                    - maskedCardInRequestHeaders
                  status:
                    type: string
                    example: draft
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - errors
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      description: >-
                        Error struct that includes the error, cause, reason, and
                        possible resolutions. Check the full documentation
                        [here](https://docs.payrails.com/docs/error-codes#error-structure).
                      required:
                        - id
                        - code
                        - detail
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: >-
                            Unique identifier of the error. Please use this
                            value when reporting an issue to our team, so we can
                            help you faster.
                        code:
                          type: string
                          description: >-
                            Machine-friendly error code assigned to the error.
                            Check the full list of possible values
                            [here](https://docs.payrails.com/docs/error-codes#list-of-error-codes).
                        detail:
                          type: string
                          description: >-
                            Human-readable description about the error, its
                            cause, and resolution.
                        docUrl:
                          type: string
                          description: >-
                            Link to the specific documentation about this
                            particular `code`.
                        reason:
                          type: object
                          additionalProperties: true
                          description: >-
                            Metadata providing more details about the reason of
                            the error. The structure of this object varies
                            according to the `code`.
              example:
                errors:
                  - id: a24bc325-3929-4d9d-9c08-b3aa532685b7
                    code: request.malformed
                    detail: The request has malformed syntax
                    docUrl: >-
                      https://docs.payrails.com/docs/error-codes#requestmalformed
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - errors
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      description: >-
                        Error struct that includes the error, cause, reason, and
                        possible resolutions. Check the full documentation
                        [here](https://docs.payrails.com/docs/error-codes#error-structure).
                      required:
                        - id
                        - code
                        - detail
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: >-
                            Unique identifier of the error. Please use this
                            value when reporting an issue to our team, so we can
                            help you faster.
                        code:
                          type: string
                          description: >-
                            Machine-friendly error code assigned to the error.
                            Check the full list of possible values
                            [here](https://docs.payrails.com/docs/error-codes#list-of-error-codes).
                        detail:
                          type: string
                          description: >-
                            Human-readable description about the error, its
                            cause, and resolution.
                        docUrl:
                          type: string
                          description: >-
                            Link to the specific documentation about this
                            particular `code`.
                        reason:
                          type: object
                          additionalProperties: true
                          description: >-
                            Metadata providing more details about the reason of
                            the error. The structure of this object varies
                            according to the `code`.
              example:
                errors:
                  - id: a24bc325-3929-4d9d-9c08-b3aa532685b7
                    code: request.unauthorized
                    detail: >-
                      The request lacks necessary credentials to perform the
                      specified action
                    docUrl: >-
                      https://docs.payrails.com/docs/error-codes#requestunauthorized
        '403':
          description: Insufficient Scope.
          content:
            application/json:
              schema:
                type: object
                required:
                  - errors
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      description: >-
                        Error struct that includes the error, cause, reason, and
                        possible resolutions. Check the full documentation
                        [here](https://docs.payrails.com/docs/error-codes#error-structure).
                      required:
                        - id
                        - code
                        - detail
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: >-
                            Unique identifier of the error. Please use this
                            value when reporting an issue to our team, so we can
                            help you faster.
                        code:
                          type: string
                          description: >-
                            Machine-friendly error code assigned to the error.
                            Check the full list of possible values
                            [here](https://docs.payrails.com/docs/error-codes#list-of-error-codes).
                        detail:
                          type: string
                          description: >-
                            Human-readable description about the error, its
                            cause, and resolution.
                        docUrl:
                          type: string
                          description: >-
                            Link to the specific documentation about this
                            particular `code`.
                        reason:
                          type: object
                          additionalProperties: true
                          description: >-
                            Metadata providing more details about the reason of
                            the error. The structure of this object varies
                            according to the `code`.
              example:
                errors:
                  - id: e7db22b3-914e-4975-928e-9edfb0885bea
                    code: request.forbidden
                    detail: >-
                      The request credentials lack the required permissions to
                      perform the specified action
                    docUrl: >-
                      https://docs.payrails.com/docs/error-codes#requestforbidden
        '422':
          description: Unprocessable Entity.
          content:
            application/json:
              schema:
                type: object
                required:
                  - errors
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      description: >-
                        Error struct that includes the error, cause, reason, and
                        possible resolutions. Check the full documentation
                        [here](https://docs.payrails.com/docs/error-codes#error-structure).
                      required:
                        - id
                        - code
                        - detail
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: >-
                            Unique identifier of the error. Please use this
                            value when reporting an issue to our team, so we can
                            help you faster.
                        code:
                          type: string
                          description: >-
                            Machine-friendly error code assigned to the error.
                            Check the full list of possible values
                            [here](https://docs.payrails.com/docs/error-codes#list-of-error-codes).
                        detail:
                          type: string
                          description: >-
                            Human-readable description about the error, its
                            cause, and resolution.
                        docUrl:
                          type: string
                          description: >-
                            Link to the specific documentation about this
                            particular `code`.
                        reason:
                          type: object
                          additionalProperties: true
                          description: >-
                            Metadata providing more details about the reason of
                            the error. The structure of this object varies
                            according to the `code`.
              example:
                errors:
                  - id: 07a1d642-dbf5-47d3-8563-700514b38e46
                    code: request.header.missing
                    detail: The request is missing a required header
                    docUrl: >-
                      https://docs.payrails.com/docs/error-codes#requestheadermissing
      security:
        - BearerToken:
            - vaultconnectionversions:create
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >
        You can use your secret API key in the `x-api-key` header of your API
        requests for supported endpoints: `x-api-key: <YOUR_API_KEY_HERE>`.

        API keys are environment specific and should be securely guarded.


        You don't have your API key yet? Contact your Payrails account manager.
    BearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        You can use an OAuth2 JWT bearer token in the `Authorization` header of
        your API requests for supported endpoints: `Authorization: Bearer
        <YOUR_JWT_HERE>`.

        These tokens are valid for 10 minutes and can be requested via the
        [access token endpoint](#operation/getOAuthToken) endpoint.

````

## Related topics

- [Managing Connections](/docs/token-vault/vault-proxy/proxy-connections/managing-connections.md)
- [Create a connection](/reference/createvaultconnections.md)
- [List connection versions for connection](/reference/listconnectionversions.md)
