openapi: 3.0.3
info:
  version: 10.24.29
  title: Vault API
  description: |
    Welcome to the Vault API 👋

    When you're looking to connect to an API, the first step is authentication.

    Vault helps you handle OAuth flows, store API keys, and refresh access tokens from users (called consumers in Apideck).

    ## Base URL

    The base URL for all API requests is `https://unify.apideck.com`

    ## Get Started

    To use the Apideck APIs, you need to sign up for free at [https://app.apideck.com/signup](). Follow the steps below to get started.

    - [Create a free account.](https://app.apideck.com/signup)
    - Go to the [Dashboard](https://app.apideck.com/unify/unified-apis/dashboard).
    - Get your API key and the application ID.
    - Select and configure the integrations you want to make available to your users. Through the Unify dashboard, you can configure which connectors you want to support as integrations.
    - Retrieve the client_id and client_secret for the integration you want to activate (Only needed for OAuth integrations).
    - Register the redirect URI for the example app (https://unify.apideck.com/vault/callback) in the list of redirect URIs under your app's settings.

    ### Vault JS

    [Vault JS](https://developers.apideck.com/guides/vault) is a vanilla JavaScript library to embed Apideck Vault in any web application.

    [Follow this guide](https://developers.apideck.com/guides/vault) to get started

    ### Hosted Vault

    Hosted Vault (vault.apideck.com) is a no-code solution, so you don't need to build your own UI to handle the integration settings and authentication.

    ![Hosted Vault - Integrations portal](https://github.com/apideck-samples/integration-settings/raw/master/public/img/vault.png)

    Behind the scenes, Hosted Vault implements the Vault API endpoints and handles the following features for your customers:

    - Add a connection
    - Handle the OAuth flow
    - Configure connection settings per integration
    - Manage connections
    - Discover and propose integration options

    To use Hosted Vault, you will need to first [**create a session**](https://developers.apideck.com/apis/vault/reference#tag/Sessions/operation/sessionsCreate). This can be achieved by making a POST request to the Vault API to create a valid session for a user, hereafter referred to as the consumer ID.

    ### Vault API

    _Beware, this strategy takes more time to implement in comparison to Vault JS and Hosted Vault._

    If you are building your integration settings UI manually, you can call the Vault API directly.

    The Vault API is for those who want to completely white label the in-app integrations overview and authentication experience. All the available endpoints are listed below.

    Through the API, your customers authenticate directly in your app, where Vault will still take care of redirecting to the auth provider and back to your app.

    If you're already storing access tokens, we will help you migrate through our Vault Migration API.

    ## Domain model

    At its core, a domain model creates a web of interconnected entities.

    Our domain model contains five main entity types: Consumer (user, account, team, machine), Application, Connector, Integration, and Connection.

    ## Connection state

    The connection state is computed based on the connection flow below.

    ![](https://developers.apideck.com/api-references/vault/connection-flow.png)

    ## Unify and Proxy integration

    The only thing you need to use the Unify APIs and Proxy is the consumer id; thereafter, Vault will do the look-up in the background to handle the token injection before performing the API call(s).

    ## Headers

    Custom headers that are expected as part of the request. Note that [RFC7230](https://tools.ietf.org/html/rfc7230) states header names are case insensitive.

    | Name | Type | Required | Description | | --- | --- | --- | --- | | x-apideck-app-id | String | Yes | The id of your Unify application. Available at https://app.apideck.com/api-keys. | | x-apideck-consumer-id | String | Yes | The id of the customer stored inside Apideck Vault. This can be a user id, account id, device id or whatever entity that can have integration within your app. | | x-apideck-raw | Boolean | No | Include raw response. Mostly used for debugging purposes. |

    ## Webhook Events

    Vault provides real-time webhook events to notify you of connection state changes:

    - **vault.connection.created** - Triggered when a new connection is created in Vault - **vault.connection.updated** - Triggered whenever any connection data changes (credentials, settings, metadata) - **vault.connection.callable** - Triggered when a connection transitions to callable state (ready for API calls) - **vault.connection.disabled** - Triggered when the enabled property changes from true to false - **vault.connection.deleted** - Triggered when a connection is permanently removed from the system - **vault.connection.revoked** - Triggered when OAuth access is successfully revoked at the service provider level - **vault.connection.token_refresh.failed** - Triggered when automatic token refresh fails for an OAuth connection

    ### Event Sequences

    **Initial OAuth Flow:** 1. `vault.connection.created` (if new connection) 2. `vault.connection.updated` (when OAuth credentials are saved) 3. `vault.connection.callable` (when connection becomes ready for API calls)

    **Re-authorization:** 1. `vault.connection.updated` (when new credentials are saved) 2. `vault.connection.callable` (if connection becomes callable again)

    **Connection Management:** - **Disabled**: `vault.connection.disabled` (connection paused but preserved) - **Deleted**: `vault.connection.deleted` (permanent removal) - **Revoked**: `vault.connection.revoked` (OAuth access revoked at service provider)

    ## Guides

    - [How to integrate Vault JS](https://developers.apideck.com/guides/vault)
    - [How to build an integrations UI with Vault](https://github.com/apideck-samples/vault?tab=readme-ov-file#integration-settings)

    ## How to integrate Apideck Vault

    Vault provides **three auth strategies** to use API tokens from your customers:

    - [Vault JS](https://developers.apideck.com/guides/vault) (recommended)
    - Vault API
    - Hosted Vault (advanced)

    ### What auth types does Vault support?

    We currently support three authentication flows for your customers to activate an integration:

    #### API keys

    For services supporting the API key strategy, Hosted Vault provides an in-app form where users can configure their API keys provided by the integration service.

    #### OAuth 2.0

    Vault handles the complete Authorization Code Grant Type Flow for you. This flow only supports browser-based (passive) authentication because most identity providers don't allow entering a username and password to be entered into applications that they don't own.

    Certain connectors require an OAuth redirect authentication flow, where the end-user is redirected to the provider's website or mobile app to authenticate. This is handled by the `/authorize` endpoint.

    #### Basic auth

    Basic authentication is a simple authentication scheme built into the HTTP protocol. The required fields to complete basic auth are handled by Hosted Vault or by updating the connection through the Vault API.

    You can learn more about [API Auth methods](https://www.apideck.com/blog/api-auth-authentication-methods-and-examples) in our guide.

    ## FAQ

    **What purpose does Vault serve? Can I just handle the authentication and access token myself?**

    You can store everything yourself, but that defeats the purpose of using Apideck Unify. Handling tokens for multiple providers can quickly become very complex.

    ### Is my data secure?

    Vault employs data minimization, therefore only requesting the minimum amount of scopes needed to perform an API request.

    ### How do I migrate existing data?

    Using our migration endpoints, you can [import access tokens and accounts](https://developers.apideck.com/guides/migrating-integrations) to Apideck Vault.

    ### Can I use Vault in combination with existing integrations?

    Yes, you can. The flexibility of Unify allows you to quickly use the cases you need while keeping a gradual migration path based on your timeline and requirements.

    ### Webhook Event Differences

    **What's the difference between disabled, deleted, and revoked?**

    - **Disabled**: Connection is paused but preserved (enabled=false). Can be re-enabled. - **Deleted**: Connection is permanently removed from the system. Cannot be recovered. - **Revoked**: OAuth access is revoked at the service provider level. Connection record remains but requires re-authorization.

    **When do I get multiple events during OAuth?**

    During re-authorization, you typically receive: 1. `vault.connection.updated` (when new credentials are saved) 2. `vault.connection.callable` (if connection becomes callable again)

    **What's the difference between updated and callable events?**

    - `updated` fires on any change to connection data - `callable` only fires when the connection state changes TO callable - Think of `callable` as a significant milestone, while `updated` is any change
  contact:
    email: hello@apideck.com
    url: https://developers.apideck.com
  x-logo:
    url: https://developers.apideck.com/icon.png
  x-apideck-api: vault
  x-apideck-sdk-support: true
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
externalDocs:
  description: Apideck Developer Docs
  url: https://developers.apideck.com
servers:
  - url: https://unify.apideck.com
    description: Production server
tags:
  - name: Sessions
    description: A session represents an authorized session for a consumer. A session is a JWT token that is valid for a short time (1h by default). Use this session token to open Hosted Vault or Vault JS for a consumer.
    x-apideck-model:
      $ref: '#/components/schemas/Session'
  - name: Connections
    description: A connection represents an account of a consumer for a connector. For example a consumer with ID "test-consumer" has a Salesforce connection for the CRM API. Connections securely save credentials and settings for a connector.
    x-apideck-model:
      $ref: '#/components/schemas/Connection'
  - name: Consumers
    description: A consumer represents an account or user in your system. All connections to connectors are scoped to a consumer.
    x-apideck-model:
      $ref: '#/components/schemas/Consumer'
  - name: Logs
    description: A log represents a request made for a given consumer. Logs include requests made to unified APIs, connectors and the Vault API.
    x-apideck-model:
      $ref: '#/components/schemas/Log'
  - name: Custom Mappings
    description: A custom mapping represents a mapping between a connector and a Unified API. Custom mappings allow you to map downstream properties to the Unified API response.
    x-apideck-model:
      $ref: '#/components/schemas/CustomMapping'
components:
  parameters:
    id:
      in: path
      name: id
      schema:
        type: string
      required: true
      description: ID of the record you are acting upon.
    applicationId:
      name: x-apideck-app-id
      in: header
      required: true
      description: The ID of your Unify application
      schema:
        type: string
        minLength: 1
      example: dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
      x-speakeasy-name-override: appId
    consumerId:
      name: x-apideck-consumer-id
      in: header
      required: true
      description: ID of the consumer which you want to get or push data from
      schema:
        type: string
      example: test-consumer
      x-speakeasy-name-override: consumerId
    optionalConsumerId:
      name: x-apideck-consumer-id
      in: header
      required: false
      description: ID of the consumer which you want to get or push data from
      schema:
        type: string
      example: test-consumer
      x-speakeasy-name-override: consumerId
    x-apideck-service-id:
      name: x-apideck-service-id
      in: header
      required: true
      description: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
      schema:
        type: string
    unified_api:
      name: unified_api
      in: path
      required: true
      description: Unified API
      schema:
        type: string
      example: crm
    service_id:
      name: service_id
      in: path
      description: Service ID of the resource to return
      required: true
      schema:
        type: string
      example: pipedrive
    application_id:
      name: application_id
      in: path
      description: Application ID of the resource to return
      required: true
      schema:
        type: string
      example: dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
    consumer_id:
      name: consumer_id
      in: path
      description: ID of the consumer to return
      required: true
      schema:
        type: string
      example: test_user_id
    target_field_id:
      name: target_field_id
      in: path
      description: ID of the target field to return as a custom mapping.
      example: hris+employees+first_aid_training
      required: true
      schema:
        type: string
    x-apideck-downstream-url:
      name: x-apideck-downstream-url
      in: header
      description: Downstream URL
      example: https://api.twilio.com
      required: true
      schema:
        type: string
    x-apideck-downstream-method:
      name: x-apideck-downstream-method
      in: header
      description: Downstream method. If not provided the upstream method will be inherited,
      example: POST
      required: false
      schema:
        type: string
    x-apideck-downstream-authorization:
      name: x-apideck-downstream-authorization
      in: header
      description: Downstream authorization header. This will skip the Vault token injection.
      example: Bearer <token>
      required: false
      schema:
        type: string
    api:
      name: api
      in: query
      description: Scope results to Unified API
      schema:
        type: string
      example: crm
    resource:
      name: resource
      in: path
      required: true
      description: Name of the resource (plural)
      schema:
        type: string
      example: leads
    raw:
      name: raw
      in: query
      description: Include raw response. Mostly used for debugging purposes
      schema:
        type: boolean
        default: false
    limit:
      name: limit
      in: query
      description: Number of results to return. Minimum 1, Maximum 200, Default 20
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 20
    cursor:
      name: cursor
      in: query
      description: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.
      schema:
        type: string
        nullable: true
    filter:
      name: filter
      in: query
      description: Filter results
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/LogsFilter'
    redirect_uri:
      name: redirect_uri
      in: query
      description: URL to redirect back to after authorization. When left empty the default configured redirect uri will be used.
      required: true
      schema:
        type: string
      example: http://example.com/integrations
    redirect_uri_revoke:
      name: redirect_uri
      in: query
      description: The redirect uri to redirect to after the revoke flow is completed.
      required: true
      schema:
        type: string
      example: http://example.com/integrations
    state:
      name: state
      in: query
      description: An opaque value the applications adds to the initial request that the authorization server includes when redirecting the back to the application. This value must be used by the application to prevent CSRF attacks.
      required: true
      schema:
        type: string
      example: <jwt_token>
    code:
      name: code
      in: query
      description: An authorization code from the connector which Apideck Vault will later exchange for an access token.
      required: true
      schema:
        type: string
      example: g0ZGZmNjVmOWI
    configured:
      name: configured
      in: query
      description: Scopes results to connections that have been configured or not
      schema:
        type: boolean
      example: true
    scope:
      name: scope
      in: query
      description: One or more OAuth scopes to request from the connector. OAuth scopes control the set of resources and operations that are allowed after authorization. Refer to the connector's documentation for the available scopes.
      schema:
        type: array
        items:
          type: string
      style: spaceDelimited
      explode: false
      example:
        - openid
        - leads:write
        - profile:read
    start_datetime:
      name: start_datetime
      in: query
      description: Scopes results to requests that happened after datetime
      required: true
      schema:
        type: string
      example: '2021-05-01T12:00:00.000Z'
    end_datetime:
      name: end_datetime
      in: query
      description: Scopes results to requests that happened before datetime
      required: true
      schema:
        type: string
      example: '2021-05-30T12:00:00.000Z'
    resource_id:
      name: resource_id
      in: query
      description: This is the id of the resource you want to fetch when listing custom fields. For example, if you want to fetch custom fields for a specific contact, you would use the contact id.
      schema:
        type: string
      example: '1234'
    consumers_filter:
      name: filter
      in: query
      description: Filter results
      style: deepObject
      explode: true
      schema:
        $ref: '#/components/schemas/ConsumersFilter'
  schemas:
    ApplicationId:
      type: string
      description: ID of your Apideck Application
      example: dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
    ConsentState:
      type: string
      x-apideck-schema-id: ConsentState
      description: The current consent state of the connection
      enum:
        - implicit
        - pending
        - granted
        - denied
        - revoked
        - requires_reconsent
      x-apideck-enum-id: connections.consent_state
      example: granted
    ConsentRecord:
      type: object
      x-apideck-schema-id: ConsentRecord
      required:
        - id
        - created_at
        - granted
        - resources
      properties:
        id:
          type: string
          description: Unique identifier for this consent record
          example: con_1234567890
          readOnly: true
        created_at:
          type: string
          description: ISO timestamp when consent was recorded
          example: '2025-04-15T14:30:00Z'
          readOnly: true
        granted:
          type: boolean
          description: Whether consent was granted (true) or denied/revoked (false)
          example: true
        resources:
          $ref: '#/components/schemas/DataScopesResources'
    AuthType:
      type: string
      x-apideck-enum-id: auth_types
      enum:
        - oauth2
        - apiKey
        - basic
        - custom
        - none
      example: oauth2
      description: Type of authorization used by the connector
      readOnly: true
    BadRequestResponse:
      type: object
      x-apideck-schema-id: BadRequest
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 400
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Bad Request
        type_name:
          type: string
          description: The type of error returned
          example: RequestValidationError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Invalid Params
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: Missing property foobar
            - type: object
              x-speakeasy-detail: true
              example:
                missing:
                  - foobar: required
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#requestvalidationerror
        downstream_errors:
          type: array
          description: Contains downstream errors returned from the connector. Only present when type_name is ConnectorExecutionError.
          items:
            type: object
            properties:
              message:
                type: string
                description: Error message from the downstream provider
              detail:
                type: string
                description: Additional error details
              code:
                type: string
                description: Error code from the downstream provider
          example:
            - message: Account code '100' has been archived or deleted
              detail: Each line item must reference a valid account
              code: VALIDATION_ERROR
    Connection:
      type: object
      x-apideck-schema-id: Connection
      properties:
        id:
          type: string
          description: The unique identifier of the connection.
          example: crm+salesforce
          readOnly: true
        service_id:
          type: string
          description: The ID of the service this connection belongs to.
          example: salesforce
          readOnly: true
        name:
          type: string
          description: The name of the connection
          example: Salesforce
          readOnly: true
        tag_line:
          type: string
          example: CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.
          readOnly: true
        unified_api:
          type: string
          description: The unified API category where the connection belongs to.
          example: crm
          readOnly: true
        state:
          $ref: '#/components/schemas/ConnectionState'
        integration_state:
          $ref: '#/components/schemas/IntegrationState'
        auth_type:
          $ref: '#/components/schemas/AuthType'
        oauth_grant_type:
          $ref: '#/components/schemas/OAuthGrantType'
        status:
          type: string
          description: Status of the connection.
          x-apideck-enum-id: connections.status
          enum:
            - live
            - upcoming
            - requested
          readOnly: true
        enabled:
          type: boolean
          description: Whether the connection is enabled or not. You can enable or disable a connection using the Update Connection API.
          example: true
        website:
          type: string
          description: The website URL of the connection
          example: https://www.salesforce.com
          readOnly: true
        icon:
          type: string
          description: A visual icon of the connection, that will be shown in the Vault
          example: https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png
          readOnly: true
        logo:
          type: string
          description: The logo of the connection, that will be shown in the Vault
          example: https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg
          readOnly: true
        authorize_url:
          type: string
          example: https://unify.apideck.com/vault/authorize/salesforce/<application-id>?state=<state>
          description: The OAuth redirect URI. Redirect your users to this URI to let them authorize your app in the connector's UI. Before you can use this URI, you must add `redirect_uri` as a query parameter to the `authorize_url`. Be sure to URL encode the `redirect_uri` part. Your users will be redirected to this `redirect_uri` after they granted access to your app in the connector's UI.
          nullable: true
          readOnly: true
        revoke_url:
          type: string
          nullable: true
          description: The OAuth revoke URI. Redirect your users to this URI to revoke this connection. Before you can use this URI, you must add `redirect_uri` as a query parameter. Your users will be redirected to this `redirect_uri` after they granted access to your app in the connector's UI.
          readOnly: true
          example: https://unify.apideck.com/vault/revoke/salesforce/<application-id>?state=<state>
        settings:
          type: object
          description: Connection settings. Values will persist to `form_fields` with corresponding id
          additionalProperties: true
          properties: {}
          nullable: true
          example: &ref_0
            instance_url: https://eu28.salesforce.com
            api_key: 12345xxxxxx
        metadata:
          type: object
          description: Attach your own consumer specific metadata
          additionalProperties: true
          properties: {}
          nullable: true
          example: &ref_1
            account:
              name: My Company
              id: c01458a5-7276-41ce-bc19-639906b0450a
            plan: enterprise
        form_fields:
          type: array
          description: The settings that are wanted to create a connection.
          items:
            $ref: '#/components/schemas/FormField'
          example:
            - id: instance_url
              label: Instance url
              value: https://eu28.salesforce.com
              placeholder: ''
              mask: false
              type: text
              required: true
              disabled: false
              custom_field: false
              sensitive: false
            - id: api_key
              label: API Key
              value: '123455677'
              placeholder: ''
              mask: false
              type: text
              required: true
              disabled: false
              custom_field: false
              sensitive: true
          readOnly: true
        configuration:
          type: array
          items:
            type: object
            properties:
              resource:
                type: string
                example: leads
              defaults:
                type: array
                items:
                  type: object
                  properties:
                    target:
                      type: string
                      x-apideck-enum-id: connections.configuration.defaults.target
                      enum:
                        - custom_fields
                        - resource
                      example: custom_fields
                      readOnly: true
                    id:
                      type: string
                      example: ProductInterest
                    options:
                      type: array
                      items:
                        $ref: '#/components/schemas/FormFieldOption'
                    value:
                      anyOf:
                        - type: string
                          example: GC5000 series
                        - type: integer
                          example: 10
                        - type: number
                          example: 10.5
                        - type: boolean
                          example: true
                        - type: array
                          items:
                            anyOf:
                              - type: string
                                example: GC6000 series
                              - type: integer
                                example: 10
                              - type: number
                                example: 10.5
        configurable_resources:
          type: array
          items:
            type: string
          example:
            - opportunities
            - companies
            - contacts
            - leads
          readOnly: true
        resource_schema_support:
          type: array
          items:
            type: string
          readOnly: true
          example:
            - leads
        resource_settings_support:
          type: array
          items:
            type: string
          readOnly: true
          example:
            - leads
        validation_support:
          type: boolean
          readOnly: true
        schema_support:
          type: boolean
          readOnly: true
        settings_required_for_authorization:
          type: array
          items:
            type: string
          description: List of settings that are required to be configured on integration before authorization can occur
          readOnly: true
          example:
            - client_id
            - client_secret
        subscriptions:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/WebhookSubscription'
        has_guide:
          type: boolean
          readOnly: true
          description: Whether the connector has a guide available in the developer docs or not (https://docs.apideck.com/connectors/{service_id}/docs/consumer+connection).
          example: true
        custom_mappings:
          type: array
          description: List of custom mappings configured for this connection
          items:
            $ref: '#/components/schemas/CustomMapping'
        consent_state:
          $ref: '#/components/schemas/ConsentState'
        consents:
          type: array
          description: Immutable array of consent records for compliance and audit purposes
          items:
            $ref: '#/components/schemas/ConsentRecord'
          readOnly: true
        latest_consent:
          $ref: '#/components/schemas/ConsentRecord'
        application_data_scopes:
          $ref: '#/components/schemas/DataScopes'
        health:
          type: string
          description: Operational health status of the connection
          x-apideck-enum-id: connections.health
          enum:
            - revoked
            - missing_settings
            - needs_consent
            - needs_auth
            - pending_refresh
            - ok
          readOnly: true
          example: ok
        credentials_expire_at:
          type: number
          description: Unix timestamp in milliseconds when credentials will be deleted if token refresh continues to fail. A value of 0 indicates no active retention window (connection is healthy or not using OAuth token refresh).
          example: 1730172800000
          readOnly: true
        last_refresh_failed_at:
          type: number
          description: Unix timestamp in milliseconds of the last failed token refresh attempt. A value of 0 indicates no recent failures. This field is used internally to enforce cooldown periods between retry attempts.
          example: 1730000000000
          readOnly: true
        created_at:
          type: number
          readOnly: true
          example: 1615563533390
        updated_at:
          type: number
          example: 1616662325753
          readOnly: true
          nullable: true
    ConnectionEvent:
      type: object
      x-sdk-exclude: true
      properties:
        event_id:
          type: string
          description: Unique reference to this request event
          example: 9755c355-56c3-4a2f-a2da-86ff4411fccb
        service_id:
          type: string
          description: Service provider identifier
          example: close
        entity_id:
          type: string
          description: The service provider's ID of the entity that triggered this event
          example: 123456ASDF
        entity_type:
          type: string
          description: The type entity that triggered this event
          example: Connection
        entity:
          $ref: '#/components/schemas/ConsumerConnection'
        event_type:
          $ref: '#/components/schemas/VaultEventType'
        execution_attempt:
          type: number
          description: The current count this request event has been attempted
          example: 2
        occurred_at:
          type: string
          description: ISO Datetime for when the original event occurred
          example: '2021-10-01T03:14:55.419Z'
    ConnectionHealth:
      type: string
      x-apideck-schema-id: ConnectionHealth
      description: The operational health status of the connection
      x-apideck-enum-id: connections.health
      enum:
        - ok
        - pending_refresh
        - needs_auth
        - needs_consent
        - revoked
        - missing_settings
      example: ok
      readOnly: true
    ConnectionImportData:
      type: object
      x-apideck-schema-id: ConnectionImportData
      properties:
        credentials:
          type: object
          additionalProperties: false
          properties:
            refresh_token:
              type: string
              description: The refresh token can be used to obtain a new access token.
              nullable: true
              example: 1234567890abcdefghijklmnopqrstuvwxyz
            access_token:
              type: string
              description: Access token
              example: 1234567890abcdefghijklmnopqrstuvwxyz
            issued_at:
              type: string
              description: The datetime at which the token was issued. If omitted the token will be queued for refresh.
              nullable: true
              format: date-time
              example: '2020-01-01T00:00:00Z'
            expires_in:
              type: integer
              description: The number of seconds until the token expires. If omitted the token will be queued for refresh.
              nullable: true
              example: 3600
          example: &ref_3
            access_token: <access_token>
            refresh_token: <refresh_token>
        settings:
          type: object
          description: Connection settings. Values will persist to `form_fields` with corresponding id
          nullable: true
          additionalProperties: true
          properties: {}
          example: &ref_4
            instance_url: https://eu28.salesforce.com
        metadata:
          type: object
          description: Attach your own consumer specific metadata
          additionalProperties: true
          properties: {}
          nullable: true
          example: &ref_5
            account:
              name: My Company
              id: c01458a5-7276-41ce-bc19-639906b0450a
            plan: enterprise
    ConnectionMetadata:
      type: object
      x-apideck-schema-id: ConnectionMetadata
      properties:
        id:
          type: string
        name:
          type: string
    ConnectionState:
      type: string
      x-apideck-schema-id: ConnectionState
      description: '[Connection state flow](#section/Connection-state)'
      x-apideck-enum-id: connections.state
      enum:
        - available
        - callable
        - added
        - authorized
        - invalid
      example: authorized
      readOnly: true
    ConnectionWebhook:
      type: object
      x-apideck-schema-id: Webhook
      additionalProperties: false
      required:
        - delivery_url
        - status
        - events
        - unified_api
        - execute_base_url
      properties:
        id:
          type: string
          example: '1234'
          readOnly: true
        description:
          type: string
          title: Description
          description: A description of the object.
          example: A description
          nullable: true
        unified_api:
          $ref: '#/components/schemas/UnifiedApiId'
        status:
          type: string
          description: The status of the webhook.
          example: enabled
          x-apideck-enum-id: webhooks.status
          enum:
            - enabled
            - disabled
        disabled_reason:
          type: string
          x-apideck-enum-id: webhook.disabled_reasons
          description: 'Indicates why the webhook has been disabled. `retry_limit`: webhook reached its retry limit. `usage_limit`: account is over its usage limit. `delivery_url_validation_failed`: delivery URL failed validation during webhook creation or update.'
          enum:
            - none
            - retry_limit
            - usage_limit
            - delivery_url_validation_failed
          example: retry_limit
        delivery_url:
          type: string
          format: uri
          description: The delivery url of the webhook endpoint.
          pattern: ^(https?)://
          example: https://example.com/my/webhook/endpoint
        execute_base_url:
          type: string
          format: uri
          description: The Unify Base URL events from connectors will be sent to after service id is appended.
          pattern: ^(https?)://
          readOnly: true
          example: https://unify.apideck.com/webhook/webhooks/1234/execute
        events:
          type: array
          title: Subscribed events
          description: The list of subscribed events for this webhook. [`*`] indicates that all events are enabled.
          example:
            - vault.connection.created
            - vault.connection.updated
          items:
            x-apideck-enum-id: webhooks.event_type
            enum:
              - '*'
              - crm.activity.created
              - crm.activity.updated
              - crm.activity.deleted
              - crm.company.created
              - crm.company.updated
              - crm.company.deleted
              - crm.contact.created
              - crm.contact.updated
              - crm.contact.deleted
              - crm.lead.created
              - crm.lead.updated
              - crm.lead.deleted
              - crm.note.created
              - crm.note.updated
              - crm.note.deleted
              - crm.opportunity.created
              - crm.opportunity.updated
              - crm.opportunity.deleted
              - lead.lead.created
              - lead.lead.updated
              - lead.lead.deleted
              - vault.connection.created
              - vault.connection.updated
              - vault.connection.disabled
              - vault.connection.deleted
              - vault.connection.callable
              - vault.connection.revoked
              - vault.connection.token_refresh.failed
              - vault.connection.token_refresh.pending
              - vault.connection.token_refresh.recovered
              - ats.job.created
              - ats.job.updated
              - ats.job.deleted
              - ats.applicant.created
              - ats.applicant.updated
              - ats.applicant.deleted
              - accounting.customer.created
              - accounting.customer.updated
              - accounting.customer.deleted
              - accounting.invoice.created
              - accounting.invoice.updated
              - accounting.invoice.deleted
              - accounting.invoice_item.created
              - accounting.invoice_item.updated
              - accounting.invoice_item.deleted
              - accounting.ledger_account.created
              - accounting.ledger_account.updated
              - accounting.ledger_account.deleted
              - accounting.tax_rate.created
              - accounting.tax_rate.updated
              - accounting.tax_rate.deleted
              - accounting.bill.created
              - accounting.bill.updated
              - accounting.bill.deleted
              - accounting.bill_payment.created
              - accounting.bill_payment.updated
              - accounting.bill_payment.deleted
              - accounting.payment.created
              - accounting.payment.updated
              - accounting.payment.deleted
              - accounting.supplier.created
              - accounting.supplier.updated
              - accounting.supplier.deleted
              - accounting.purchase_order.created
              - accounting.purchase_order.updated
              - accounting.purchase_order.deleted
              - accounting.credit_note.created
              - accounting.credit_note.updated
              - accounting.credit_note.deleted
              - pos.order.created
              - pos.order.updated
              - pos.order.deleted
              - pos.product.created
              - pos.product.updated
              - pos.product.deleted
              - pos.payment.created
              - pos.payment.updated
              - pos.payment.deleted
              - pos.merchant.created
              - pos.merchant.updated
              - pos.merchant.deleted
              - pos.location.created
              - pos.location.updated
              - pos.location.deleted
              - pos.item.created
              - pos.item.updated
              - pos.item.deleted
              - pos.modifier.created
              - pos.modifier.updated
              - pos.modifier.deleted
              - pos.modifier-group.created
              - pos.modifier-group.updated
              - pos.modifier-group.deleted
              - hris.employee.created
              - hris.employee.updated
              - hris.employee.deleted
              - hris.employee.terminated
              - hris.company.created
              - hris.company.updated
              - hris.company.deleted
              - file-storage.file.created
              - file-storage.file.updated
              - file-storage.file.deleted
              - file-storage.drive.updated
              - issue-tracking.ticket.created
              - issue-tracking.ticket.updated
              - issue-tracking.ticket.deleted
              - ats.application.created
              - ats.application.updated
              - ats.application.deleted
              - accounting.expense.created
              - accounting.expense.updated
              - accounting.expense.deleted
              - ecommerce.order.created
              - ecommerce.order.updated
              - ecommerce.order.deleted
              - ecommerce.product.created
              - ecommerce.product.updated
              - ecommerce.product.deleted
              - ecommerce.customer.created
              - ecommerce.customer.updated
              - ecommerce.customer.deleted
              - accounting.quote.created
              - accounting.quote.updated
              - accounting.quote.deleted
              - accounting.project.created
              - accounting.project.updated
              - accounting.project.deleted
            example: crm.company.created
            type: string
        updated_at:
          type: string
          title: Updated at (timestamp)
          description: The date and time when the object was last updated.
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
          readOnly: true
          nullable: true
        created_at:
          type: string
          title: Created at (timestamp)
          description: The date and time when the object was created.
          format: date-time
          example: '2020-09-30T07:43:32.000Z'
          readOnly: true
          nullable: true
    Consumer:
      type: object
      x-apideck-schema-id: Consumer
      required:
        - consumer_id
      properties:
        consumer_id:
          $ref: '#/components/schemas/ConsumerId'
        application_id:
          type: string
          readOnly: true
          description: ID of your Apideck Application
          example: dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
        metadata:
          $ref: '#/components/schemas/ConsumerMetadata'
        connections:
          type: array
          items:
            $ref: '#/components/schemas/ConsumerConnection'
          readOnly: true
        services:
          type: array
          items:
            type: string
            example: salesforce
          example:
            - salesforce
            - stripe
          readOnly: true
        aggregated_request_count:
          type: number
          example: 101
          readOnly: true
        request_counts:
          $ref: '#/components/schemas/RequestCountAllocation'
        created:
          type: string
          example: '2021-05-07T12:55:42.242Z'
          readOnly: true
        modified:
          type: string
          example: '2021-05-07T12:55:42.242Z'
          readOnly: true
        request_count_updated:
          type: string
          example: '2021-05-07T12:55:42.242Z'
          readOnly: true
    ConsumerConnection:
      type: object
      x-apideck-schema-id: ConsumerConnection
      properties:
        id:
          type: string
          example: 1111+test_user_id
          readOnly: true
        name:
          type: string
          example: Salesforce
        icon:
          type: string
          example: https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png
        logo:
          type: string
          example: https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg
        website:
          type: string
          example: https://www.salesforce.com
          readOnly: true
        tag_line:
          type: string
          example: CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.
          readOnly: true
        service_id:
          type: string
          example: teamleader
        unified_api:
          type: string
          example: crm
        consumer_id:
          type: string
          example: test_user_id
        auth_type:
          $ref: '#/components/schemas/AuthType'
        enabled:
          type: boolean
          example: true
        settings:
          type: object
          description: Connection settings. Values will persist to `form_fields` with corresponding id
          nullable: true
          example:
            instance_url: https://eu28.salesforce.com
          additionalProperties: true
          properties: {}
        metadata:
          type: object
          description: Attach your own consumer specific metadata
          additionalProperties: true
          properties: {}
          nullable: true
          example:
            account:
              name: My Company
              id: c01458a5-7276-41ce-bc19-639906b0450a
            plan: enterprise
        created_at:
          type: string
          example: '2020-09-19T12:18:37.071Z'
        updated_at:
          type: string
          example: '2020-09-19T12:18:37.071Z'
          nullable: true
        state:
          $ref: '#/components/schemas/ConnectionState'
        health:
          $ref: '#/components/schemas/ConnectionHealth'
        credentials_expire_at:
          type: string
          description: ISO 8601 timestamp indicating when credentials will be cleared if token refresh continues to fail. Only present when connection health is pending_refresh and a retention window is active.
          nullable: true
        last_refresh_failed_at:
          type: string
          description: ISO 8601 timestamp of the most recent token refresh failure. Only present when connection has experienced refresh failures.
          nullable: true
    ConsumerId:
      type: string
      example: test_consumer_id
      description: Unique consumer identifier. You can freely choose a consumer ID yourself. Most of the time, this is an ID of your internal data model that represents a user or account in your system (for example account:12345). If the consumer doesn't exist yet, Vault will upsert a consumer based on your ID.
    ConsumerMetadata:
      type: object
      description: The metadata of the consumer. This is used to display the consumer in the sidebar. This is optional, but recommended.
      x-apideck-schema-id: ConsumerMetadata
      properties:
        account_name:
          example: SpaceX
          type: string
          title: Account name
          description: The name of the account as shown in the sidebar.
        user_name:
          example: Elon Musk
          type: string
          title: User name
          description: The name of the user as shown in the sidebar.
        email:
          example: elon@musk.com
          type: string
          title: Email
          description: The email of the user as shown in the sidebar.
        image:
          example: https://www.spacex.com/static/images/share.jpg
          type: string
          title: Image
          description: The avatar of the user in the sidebar. Must be a valid URL
    ConsumersFilter:
      type: object
      x-apideck-schema-id: ConsumersFilter
      properties:
        consumer_id:
          type: string
          example: test-consumer
          nullable: true
          description: Filter by consumer ID using a prefix match (beginsWith).
        search:
          type: string
          example: john
          nullable: true
          description: Search across consumer ID, email, account name, and user name using a substring match (contains). Matches any field (OR logic).
    ConsumerRequestCountsInDateRangeResponse:
      type: object
      x-apideck-schema-id: ConsumerRequestCountsInDateRangeResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          type: object
          x-apideck-schema-id: ConsumerRequestCountsInDateRange
          properties:
            application_id:
              type: string
              example: '1111'
            consumer_id:
              type: string
              example: test_user_id
            start_datetime:
              type: string
              example: '2021-05-01T12:00:00.000Z'
            end_datetime:
              type: string
              example: '2021-05-10T12:00:00.000Z'
            aggregated_request_count:
              type: number
              example: 40
            request_counts:
              $ref: '#/components/schemas/RequestCountAllocation'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateCallbackState:
      type: object
      x-apideck-schema-id: CreateCallbackState
      properties:
        redirect_uri:
          type: string
          description: The redirect URI to be used after the connection is created.
          example: https://example.com/callback
    CreateCallbackStateResponse:
      type: object
      x-apideck-schema-id: CreateCallbackStateResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          type: object
          properties:
            state:
              type: string
              description: Callback state
              example: 123e4567-e89b-12d3-a456-426614174000
              readOnly: true
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateConnectionResponse:
      type: object
      x-apideck-schema-id: CreateConnectionResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 201
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/Connection'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateConsumerRequest:
      type: object
      x-apideck-schema-id: CreateConsumerRequest
      additionalProperties: false
      required:
        - consumer_id
      properties:
        consumer_id:
          $ref: '#/components/schemas/ConsumerId'
        metadata:
          $ref: '#/components/schemas/ConsumerMetadata'
    CreateConsumerResponse:
      type: object
      x-apideck-schema-id: GetConsumerResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/Consumer'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateCustomMappingRequest:
      type: object
      x-apideck-schema-id: CreateCustomMappingRequest
      additionalProperties: false
      required:
        - value
      properties:
        value:
          type: string
          description: Target Field Mapping value
          example: $.root.training.first_aid
    CreateCustomMappingResponse:
      type: object
      x-apideck-schema-id: CreateCustomMappingResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 201
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/CustomMapping'
        _raw:
          $ref: '#/components/schemas/Raw'
    CreateSessionResponse:
      type: object
      x-apideck-schema-id: CreateSessionResponse
      required:
        - status_code
        - status
        - data
      additionalProperties: false
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          type: object
          required:
            - session_uri
            - session_token
          properties:
            session_uri:
              example: https://vault.apideck.com/session/<session_token>
              readOnly: true
              type: string
            session_token:
              example: <session_token>
              readOnly: true
              type: string
          additionalProperties: false
        _raw:
          $ref: '#/components/schemas/Raw'
    CustomFieldFinder:
      type: object
      x-apideck-schema-id: CustomFieldFinder
      properties:
        id:
          type: string
          description: Custom Field ID
          example: '123456'
          readOnly: true
        name:
          type: string
          description: Custom Field name to use as a label if provided
          example: SSN
          readOnly: true
          nullable: true
        description:
          title: Description
          type: string
          description: More information about the custom field
          example: Employee Level
          nullable: true
        value:
          description: Custom Field value
          example: '495172776'
        finder:
          type: string
          description: JSONPath finder for retrieving this value when mapping a response payload from downstream
          readOnly: true
      additionalProperties: false
    CustomMapping:
      type: object
      x-apideck-schema-id: CustomMapping
      properties:
        id:
          type: string
          description: Target Field ID
          example: hris+employees+first_aid_training
          readOnly: true
        label:
          type: string
          description: Target Field name to use as a label
          example: First Aid Training
          readOnly: true
        description:
          type: string
          description: Target Field description
          example: First Aid Training completed after 2019-01-01
          readOnly: true
          nullable: true
        value:
          type: string
          description: Target Field Mapping value
          example: $.root.training.first_aid
        key:
          type: string
          description: Target Field Key
          example: first_aid_training
          readOnly: true
        required:
          type: boolean
          description: Target Field Mapping is required
          example: false
          readOnly: true
        custom_field:
          type: boolean
          description: This mapping represents a finder for a custom field
          example: true
          readOnly: true
        consumer_id:
          type: string
          description: Consumer ID
          example: test_user_id
          readOnly: true
          nullable: true
        example:
          type: string
          description: Target Field Mapping example value from downstream
          example: Some value
          readOnly: true
          nullable: true
      additionalProperties: false
    DataScopesResources:
      x-apideck-schema-id: DataScopesResources
      description: Data scopes resource configuration that can be either detailed field permissions or a wildcard
      oneOf:
        - type: object
          x-apideck-schema-id: DataScopesFields
          description: Map of resources to field-level permissions
          additionalProperties:
            type: object
            description: Field paths with read/write permissions
            additionalProperties:
              type: object
              properties:
                read:
                  type: boolean
                  description: Whether the field can be read
                  example: true
                write:
                  type: boolean
                  description: Whether the field can be written to
                  example: true
          example:
            hris.employees:
              id:
                read: true
                write: false
              first_name:
                read: true
                write: true
              last_name:
                read: true
                write: true
              email:
                read: true
                write: true
              addresses[].street:
                read: true
                write: false
              addresses[].city:
                read: true
                write: false
              employment.job_title:
                read: true
                write: true
              custom_fields[].employee_number:
                read: true
                write: false
            hris.departments:
              id:
                read: true
                write: false
              name:
                read: true
                write: true
              code:
                read: true
                write: false
        - type: string
          enum:
            - '*'
          description: Wildcard indicating all resources and fields when Data Scopes is selected
          example: '*'
      example: &ref_2
        hris.employees:
          id:
            read: true
            write: false
          first_name:
            read: true
            write: true
          last_name:
            read: true
            write: true
          email:
            read: true
            write: true
          addresses[].street:
            read: true
            write: false
          addresses[].city:
            read: true
            write: false
          employment.job_title:
            read: true
            write: true
          custom_fields[].employee_number:
            read: true
            write: false
        hris.departments:
          id:
            read: true
            write: false
          name:
            read: true
            write: true
          code:
            read: true
            write: false
    DataScopes:
      type: object
      x-apideck-schema-id: DataScopes
      properties:
        enabled:
          type: boolean
          description: Whether Data Scopes is enabled for this application
          example: true
        updated_at:
          type: string
          description: ISO timestamp of when the Data Scopes configuration was last modified
          example: '2025-04-15T14:30:00Z'
          readOnly: true
        resources:
          $ref: '#/components/schemas/DataScopesResources'
    DeleteConsumerResponse:
      type: object
      x-apideck-schema-id: GetConsumerResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          properties:
            consumer_id:
              $ref: '#/components/schemas/ConsumerId'
        _raw:
          $ref: '#/components/schemas/Raw'
    FormField:
      type: object
      x-apideck-schema-id: FormField
      properties:
        id:
          type: string
          description: The unique identifier of the form field.
          example: channel
        label:
          type: string
          description: The label of the field
          example: Channel
        placeholder:
          type: string
          description: The placeholder for the form field
          example: Select a channel
          nullable: true
        description:
          type: string
          description: The description of the form field
          example: Slack channel to push notification to
          nullable: true
        type:
          x-apideck-enum-id: form_field.type
          enum:
            - text
            - checkbox
            - tel
            - email
            - url
            - textarea
            - select
            - filtered-select
            - multi-select
            - datetime
            - date
            - time
            - number
            - password
          example: select
        required:
          description: Indicates if the form field is required, which means it must be filled in before the form can be submitted
          type: boolean
          example: true
        custom_field:
          type: boolean
          example: false
        allow_custom_values:
          title: Allow custom values
          description: Only applicable to select fields. Allow the user to add a custom value though the option select if the desired value is not in the option select list.
          type: boolean
          example: false
          default: false
        disabled:
          type: boolean
          description: Indicates if the form field is displayed in a “read-only” mode.
          nullable: true
          example: false
        hidden:
          type: boolean
          description: Indicates if the form field is not displayed but the value that is being stored on the connection.
          nullable: true
          example: false
        deprecated:
          type: boolean
          description: When the setting is deprecated, it should be hidden from the user interface. The value will still be stored on the connection for the sake of backwards compatibility.
          nullable: true
          example: false
        sensitive:
          type: boolean
          description: Indicates if the form field contains sensitive data, which will display the value as a masked input.
          nullable: true
          example: false
        prefix:
          type: string
          description: Prefix to display in front of the form field.
          nullable: true
          example: https://
        suffix:
          type: string
          description: Suffix to display next to the form field.
          nullable: true
          example: .shopify.com
        options:
          type: array
          items:
            $ref: '#/components/schemas/FormFieldOption'
          example:
            - label: General Channel
              value: general
              option_type: simple
    FormFieldOption:
      oneOf:
        - $ref: '#/components/schemas/SimpleFormFieldOption'
        - $ref: '#/components/schemas/FormFieldOptionGroup'
      discriminator:
        propertyName: option_type
        mapping:
          simple: '#/components/schemas/SimpleFormFieldOption'
          group: '#/components/schemas/FormFieldOptionGroup'
    FormFieldOptionGroup:
      type: object
      x-apideck-schema-id: FormFieldOptionGroup
      properties:
        id:
          type: string
          example: '1234'
        label:
          type: string
          example: General Channel
        options:
          type: array
          items:
            $ref: '#/components/schemas/SimpleFormFieldOption'
        option_type:
          type: string
          enum:
            - group
          x-apideck-enum-id: form_field.option_type
      required:
        - label
        - option_type
        - options
    GetConnectionResponse:
      type: object
      x-apideck-schema-id: GetConnectionResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/Connection'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetConnectionsResponse:
      type: object
      x-apideck-schema-id: GetConnectionsResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          type: array
          items:
            $ref: '#/components/schemas/Connection'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetConsentRecordsResponse:
      type: object
      x-apideck-schema-id: GetConsentRecordsResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          type: array
          items:
            $ref: '#/components/schemas/ConsentRecord'
        _raw:
          $ref: '#/components/schemas/Raw'
      additionalProperties: false
    GetConsumerResponse:
      type: object
      x-apideck-schema-id: GetConsumerResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/Consumer'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetConsumersResponse:
      type: object
      x-apideck-schema-id: GetConsumersResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          type: array
          items:
            type: object
            properties:
              consumer_id:
                type: string
                example: test_consumer_id
              application_id:
                type: string
                example: '1111'
              metadata:
                $ref: '#/components/schemas/ConsumerMetadata'
              aggregated_request_count:
                type: number
                example: 101
              request_counts:
                $ref: '#/components/schemas/RequestCountAllocation'
              created:
                type: string
                example: '2021-05-07T12:55:42.242Z'
              modified:
                type: string
                example: '2021-05-07T12:55:42.242Z'
              request_count_updated:
                type: string
                example: '2021-05-07T12:55:42.242Z'
              services:
                type: array
                items:
                  type: string
                  example: salesforce
                example:
                  - salesforce
                  - stripe
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetCustomFieldsResponse:
      type: object
      x-apideck-schema-id: GetCustomFieldsResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldFinder'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetCustomMappingsResponse:
      type: object
      x-apideck-schema-id: GetCustomMappingsResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomMapping'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetCustomMappingResponse:
      type: object
      x-apideck-schema-id: GetCustomMappingResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/CustomMapping'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetLogsResponse:
      type: object
      x-apideck-schema-id: GetLogsResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          type: array
          items:
            $ref: '#/components/schemas/Log'
        meta:
          $ref: '#/components/schemas/Meta'
        links:
          $ref: '#/components/schemas/Links'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetResourceExampleResponse:
      type: object
      x-apideck-schema-id: GetResourceExampleResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/ResourceExample'
        _raw:
          $ref: '#/components/schemas/Raw'
    GetResourceSchemaResponse:
      type: object
      x-apideck-schema-id: GetResourceSchemaResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/ResourceSchema'
        _raw:
          $ref: '#/components/schemas/Raw'
    IntegrationState:
      type: string
      x-apideck-schema-id: IntegrationState
      description: The current state of the Integration.
      x-apideck-enum-id: integrations.state
      enum:
        - disabled
        - needs_configuration
        - configured
      example: configured
      readOnly: true
    LinkedConnectorResource:
      type: object
      x-apideck-schema-id: LinkedConnectorResource
      properties:
        id:
          $ref: '#/components/schemas/ResourceId'
        name:
          type: string
          description: Name of the resource (plural)
          example: Companies
        status:
          $ref: '#/components/schemas/ResourceStatus'
        downstream_id:
          type: string
          description: ID of the resource in the Connector's API (downstream)
          example: accounts
        downstream_name:
          type: string
          description: Name of the resource in the Connector's API (downstream)
          example: Accounts
    Links:
      type: object
      x-apideck-schema-id: Links
      description: Links to navigate to previous or next pages through the API
      properties:
        previous:
          type: string
          description: Link to navigate to the previous page through the API
          example: https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D
          nullable: true
        current:
          type: string
          description: Link to navigate to the current page through the API
          example: https://unify.apideck.com/crm/companies
        next:
          type: string
          description: Link to navigate to the previous page through the API
          example: https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM
          nullable: true
    Log:
      type: object
      x-apideck-schema-id: Log
      additionalProperties: false
      properties:
        api_style:
          description: Indicates if the request was made via REST or Graphql endpoint.
          example: REST
          type: string
        base_url:
          description: The Apideck base URL the request was made to.
          example: unify.apideck.com
          type: string
        child_request:
          description: Indicates whether or not this is a child or parent request.
          example: false
          type: boolean
        consumer_id:
          description: The consumer Id associated with the request.
          example: test-consumer
          type: string
        duration:
          description: The entire execution time in milliseconds it took to call the Apideck service provider.
          example: 2220.379304
          type: number
        error_message:
          description: If error occurred, this is brief explanation
          example: Refresh token is invalid
          type: string
          nullable: true
        execution:
          description: The entire execution time in milliseconds it took to make the request.
          example: 2248
          type: integer
        has_children:
          description: When request is a parent request, this indicates if there are child requests associated.
          example: false
          type: boolean
        http_method:
          description: HTTP Method of request.
          example: GET
          type: string
        id:
          description: UUID acting as Request Identifier.
          example: 0b5f7480-5550-4f5c-a5fc-3c01ac43dd0f
          type: string
        latency:
          description: Latency added by making this request via Unified Api.
          example: 27.620695999999953
          type: number
        operation:
          additionalProperties: false
          description: The request as defined in OpenApi Spec.
          properties:
            id:
              description: The OpenApi Operation Id associated with the request
              example: connectionsAll
              type: string
            name:
              description: The OpenApi Operation name associated with the request
              example: Get All Connections
              type: string
          required:
            - id
            - name
          type: object
        parent_id:
          description: When request is a child request, this UUID indicates it's parent request.
          example: 0b5f7480-5550-4f5c-a5fc-3c01ac43dd0f
          type: string
          nullable: true
        path:
          description: The path component of the URI the request was made to.
          example: /vault/connections
          type: string
        sandbox:
          description: Indicates whether the request was made using Apidecks sandbox credentials or not.
          example: false
          type: boolean
        service:
          additionalProperties: false
          description: Apideck service provider associated with request.
          properties:
            id:
              description: Apideck service provider id.
              example: apideck-vault
              type: string
            name:
              description: Apideck service provider name.
              example: Apideck Vault
              type: string
          required:
            - id
            - name
          type: object
        source_ip:
          description: The IP address of the source of the request.
          example: 94.227.131.238
          type: string
          nullable: true
        status_code:
          description: HTTP Status code that was returned.
          example: 200
          type: integer
        success:
          description: Whether or not the request was successful.
          example: true
          type: boolean
        timestamp:
          description: ISO Date and time when the request was made.
          example: '2021-07-12T14:26:17.420Z'
          type: string
        unified_api:
          description: Which Unified Api request was made to.
          example: vault
          x-apideck-enum-id: logs.unified_api
          enum:
            - crm
            - lead
            - proxy
            - vault
            - accounting
            - hris
            - ats
            - ecommerce
            - issue-tracking
            - pos
            - file-storage
            - sms
          type: string
      required:
        - id
        - parent_id
        - api_style
        - base_url
        - child_request
        - consumer_id
        - duration
        - execution
        - has_children
        - http_method
        - latency
        - operation
        - path
        - sandbox
        - service
        - status_code
        - success
        - timestamp
        - unified_api
    LogsFilter:
      type: object
      x-apideck-schema-id: LogsFilter
      properties:
        connector_id:
          type: string
          example: crm+salesforce
          nullable: true
        status_code:
          type: number
          example: 201
          nullable: true
          description: Filter by a single HTTP status code. For backward compatibility - use status_codes for multiple values.
        status_codes:
          type: array
          items:
            type: number
            minimum: 100
            maximum: 599
          example:
            - 200
            - 201
            - 204
          nullable: true
          description: Filter by multiple HTTP status codes. Values must be between 100-599. Maximum 50 status codes allowed.
          maxItems: 50
        exclude_unified_apis:
          type: string
          nullable: true
          example: vault,proxy
    Meta:
      type: object
      x-apideck-schema-id: Meta
      description: Response metadata
      properties:
        items_on_page:
          type: integer
          description: Number of items returned in the data property of the response
          example: 50
        cursors:
          type: object
          description: Cursors to navigate to previous or next pages through the API
          properties:
            previous:
              type: string
              description: Cursor to navigate to the previous page of results through the API
              example: em9oby1jcm06OnBhZ2U6OjE=
              nullable: true
            current:
              type: string
              description: Cursor to navigate to the current page of results through the API
              example: em9oby1jcm06OnBhZ2U6OjI=
              nullable: true
            next:
              type: string
              description: Cursor to navigate to the next page of results through the API
              example: em9oby1jcm06OnBhZ2U6OjM=
              nullable: true
    NotFoundResponse:
      type: object
      x-apideck-schema-id: NotFound
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 404
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Not Found
        type_name:
          type: string
          description: The type of error returned
          example: EntityNotFoundError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Unknown Widget
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: "Could not find widget with id: '123'"
            - type: object
              x-speakeasy-detail: true
              example:
                not_found:
                  entity: widget
                  id: '123'
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#entitynotfounderror
    NotImplementedResponse:
      type: object
      x-apideck-schema-id: NotImplemented
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 501
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Not Implemented
        type_name:
          type: string
          description: The type of error returned
          example: MappingError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Unmapped Attribute
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: Failed to retrieve Widget tokenUrl from 'components.securitySchemes.OAuth2.flows'
            - type: object
              x-speakeasy-detail: true
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#mappingerror
    OAuthGrantType:
      type: string
      x-apideck-enum-id: oauth_grant_types
      enum:
        - authorization_code
        - client_credentials
        - password
      example: authorization_code
      description: 'OAuth grant type used by the connector. More info: https://oauth.net/2/grant-types'
      readOnly: true
    PaymentRequiredResponse:
      type: object
      x-apideck-schema-id: PaymentRequired
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 402
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Payment Required
        type_name:
          type: string
          description: The type of error returned
          example: RequestLimitError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Request Limit Reached
          x-speakeasy-error-message: true
        detail:
          type: string
          description: Contains parameter or domain specific information related to the error and why it occurred.
          example: You have reached your limit of 2000
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#requestlimiterror
    ProxyRequest:
      type: object
      x-apideck-schema-id: ProxyRequest
      properties: {}
      example:
        account_sid: ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
        api_version: '2010-04-01'
        body: This is the ship that made the Kessel Run in fourteen parsecs?
        date_created: Thu, 30 Jul 2015 20:12:31 +0000
        date_sent: Thu, 30 Jul 2015 20:12:33 +0000
        date_updated: Thu, 30 Jul 2015 20:12:33 +0000
        direction: outbound-api
        from: '+15017122661'
        messaging_service_sid: MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
        num_media: '0'
        num_segments: '1'
        sid: SMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
        status: sent
        subresource_uris:
          media: /2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/SMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media.json
        to: '+15558675310'
        uri: /2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/SMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json
    ValidateConnectionStateResponse:
      type: object
      x-apideck-schema-id: ValidateConnectionStateResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          type: object
          properties:
            id:
              type: string
              description: The unique identifier of the connection.
              example: crm+salesforce
              readOnly: true
            state:
              $ref: '#/components/schemas/ConnectionState'
        _raw:
          $ref: '#/components/schemas/Raw'
    RequestCountAllocation:
      type: object
      x-apideck-schema-id: RequestCountAllocation
      readOnly: true
      properties:
        unify:
          type: number
          example: 100
        proxy:
          type: number
          example: 10
        vault:
          type: number
          example: 21
    ResourceExample:
      type: object
      x-apideck-schema-id: ResourceExample
      properties:
        unified_api:
          $ref: '#/components/schemas/UnifiedApiId'
        service_id:
          $ref: '#/components/schemas/ServiceId'
        resource:
          $ref: '#/components/schemas/LinkedConnectorResource'
        example_response:
          type: object
          description: Example response from the downstream API
    ResourceId:
      type: string
      description: ID of the resource, typically a lowercased version of name.
      example: companies
    ResourceSchema:
      type: object
      x-apideck-schema-id: ResourceSchema
    ResourceStatus:
      x-apideck-enum-id: connector.resource.status
      type: string
      enum:
        - live
        - beta
        - development
        - upcoming
        - considering
      description: Status of the resource. Resources with status live or beta are callable.
    ServiceId:
      type: string
      description: Service provider identifier
      example: close
    Session:
      type: object
      x-apideck-schema-id: Session
      additionalProperties: false
      properties:
        consumer_metadata:
          $ref: '#/components/schemas/ConsumerMetadata'
        redirect_uri:
          title: Redirect URI
          example: https://mysaas.com/dashboard
          description: The URL to redirect the user to after the session has been configured.
          type: string
        settings:
          description: Settings to change the way the Vault is displayed.
          additionalProperties: false
          properties:
            unified_apis:
              type: array
              items:
                $ref: '#/components/schemas/UnifiedApiId'
              description: Provide the IDs of the Unified APIs you want to be visible. Leaving it empty or omitting this field will show all Unified APIs.
            hide_resource_settings:
              title: Hide resource settings
              default: false
              type: boolean
              description: A boolean that controls the display of the configurable resources for an integration. When set to true, the resource configuration options will be hidden and not shown to the user. When set to false, the resource configuration options will be displayed to the user.
            sandbox_mode:
              title: Sandbox mode
              default: false
              type: boolean
              description: Configure [Vault](/apis/vault/reference#section/Get-Started) to show a banner informing the logged in user is in a test environment.
            isolation_mode:
              title: Isolation mode
              type: boolean
              default: false
              description: Configure [Vault](/apis/vault/reference#section/Get-Started) to run in isolation mode, meaning it only shows the connection settings and hides the navigation items.
            session_length:
              title: Session Length
              default: 1h
              description: The duration of time the session is valid for (maximum 1 week).
              example: 30m
              type: string
            show_logs:
              title: Show logs
              default: true
              type: boolean
              description: Configure [Vault](/apis/vault/reference#section/Get-Started) to show the logs page. Defaults to `true`.
            show_suggestions:
              title: Show suggestions
              default: false
              type: boolean
              description: Configure [Vault](/apis/vault/reference#section/Get-Started) to show the suggestions page. Defaults to `false`.
            show_sidebar:
              title: Show sidebar
              default: true
              type: boolean
              description: Configure [Vault](/apis/vault/reference#section/Get-Started) to show the sidebar. Defaults to `true`.
            auto_redirect:
              title: Auto-redirect
              default: false
              type: boolean
              description: Automatically redirect to redirect uri after the connection has been configured as callable. Defaults to `false`.
            hide_guides:
              title: Hide guides
              default: false
              type: boolean
              description: Hide Apideck connection guides in [Vault](/apis/vault/reference#section/Get-Started). Defaults to `false`.
            allow_actions:
              title: Allow actions
              type: array
              description: |-
                Hide actions from your users in [Vault](/apis/vault/reference#section/Get-Started). Actions in `allow_actions` will be shown on a connection in Vault.
                Available actions are: `delete`, `disconnect`, `reauthorize` and `disable`.
                Empty array will hide all actions. By default all actions are visible.
              items:
                type: string
                enum:
                  - delete
                  - disconnect
                  - reauthorize
                  - disable
          type: object
        theme:
          description: Theming options to change the look and feel of Vault.
          properties:
            favicon:
              title: Favicon
              description: The URL to the favicon to use for Vault.
              example: https://res.cloudinary.com/apideck/icons/intercom
              type: string
            logo:
              title: Logo
              description: The URL to the logo to use for Vault.
              example: https://res.cloudinary.com/apideck/icons/intercom
              type: string
            primary_color:
              title: Primary color
              description: The primary color to use for Vault.
              example: '#286efa'
              type: string
            sidepanel_background_color:
              title: Sidebar background color
              description: The background color to use for the sidebar.
              example: '#286efa'
              type: string
            sidepanel_text_color:
              title: Sidebar text color
              description: The text color to use for the sidebar.
              example: '#FFFFFF'
              type: string
            vault_name:
              title: Vault name
              description: The name that will be shown in the sidebar.
              example: Intercom
              type: string
            privacy_url:
              title: Privacy URL
              description: The URL to the privacy policy that will be shown in the sidebar.
              example: https://compliance.apideck.com/privacy-policy
              type: string
            terms_url:
              title: Terms URL
              description: The URL to the terms and conditions that will be shown in the sidebar.
              example: https://www.termsfeed.com/terms-conditions/957c85c1b089ae9e3219c83eff65377e
              type: string
          type: object
        custom_consumer_settings:
          additionalProperties: true
          description: Custom consumer settings that are passed as part of the session.
          example: &ref_6
            feature_flag_1: true
            tax_rates:
              - id: '6'
                label: 6%
              - id: '21'
                label: 21%
          title: Custom consumer settings
          type: object
    SimpleFormFieldOption:
      type: object
      x-apideck-schema-id: SimpleFormFieldOption
      properties:
        label:
          type: string
          example: General Channel
        value:
          oneOf:
            - type: string
              example: general
            - type: integer
              example: 123
            - type: number
              example: 12.5
            - type: boolean
              example: true
            - type: array
              items:
                oneOf:
                  - type: string
                  - type: integer
                  - type: number
              example:
                - team
                - general
        option_type:
          type: string
          enum:
            - simple
          x-apideck-enum-id: form_field.option_type
      required:
        - label
        - option_type
    UnauthorizedResponse:
      type: object
      x-apideck-schema-id: Unauthorized
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 401
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Unauthorized
        type_name:
          type: string
          description: The type of error returned
          example: UnauthorizedError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Unauthorized Request
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: Missing authentication
            - type: object
              x-speakeasy-detail: true
              properties:
                type:
                  type: string
                  description: Error type identifier
                  example: refresh_token_connector_error
                message:
                  type: string
                  description: Detailed error message
                  example: Token refresh failed
                debug:
                  type: object
                  description: Debug information including request/response details and OAuth timing metadata
                  properties:
                    request:
                      type: object
                      description: HTTP request details
                    response:
                      type: object
                      description: HTTP response details
                    message:
                      type: string
                      description: Error message from downstream provider or network layer
                    code:
                      type: string
                      description: Error code (e.g., ETIMEDOUT, ECONNREFUSED)
                    credentials_expire_at_ms:
                      type: number
                      description: Unix timestamp (milliseconds) when credentials will be deleted if not refreshed. Only present for non-recoverable errors (401, 400). Credentials are preserved indefinitely for recoverable/network errors.
                      example: 1620172800000
                    retry_after_ms:
                      type: number
                      description: Unix timestamp (milliseconds) when token refresh retry is allowed after cooldown period expires.
                      example: 1620000030000
                    cooldown_remaining_ms:
                      type: number
                      description: Milliseconds remaining in cooldown period before retry is allowed.
                      example: 30000
              example:
                type: refresh_token_connector_error
                message: Token refresh failed with 401 error
                debug:
                  response:
                    statusCode: 401
                    data:
                      error: invalid_grant
                  credentials_expire_at_ms: 1620172800000
                  retry_after_ms: 1620000030000
                  cooldown_remaining_ms: 30000
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#unauthorizederror
    UnexpectedErrorResponse:
      type: object
      x-apideck-schema-id: Error
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 400
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Bad Request
        type_name:
          type: string
          description: The type of error returned
          example: RequestHeadersValidationError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Invalid Params
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: 'Missing Header: x-apideck-consumer-id'
            - type: object
              x-speakeasy-detail: true
              example:
                missing:
                  - x-apideck-consumer-id: required
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#unauthorizederror
    UnifiedApiId:
      description: Name of Apideck Unified API
      x-apideck-enum-id: unified_api
      enum:
        - accounting
        - ats
        - calendar
        - crm
        - csp
        - customer-support
        - ecommerce
        - email
        - email-marketing
        - expense-management
        - file-storage
        - form
        - hris
        - lead
        - payroll
        - pos
        - procurement
        - project-management
        - script
        - sms
        - spreadsheet
        - team-messaging
        - issue-tracking
        - time-registration
        - transactional-email
        - vault
        - data-warehouse
      example: crm
      type: string
    UnprocessableResponse:
      type: object
      x-apideck-schema-id: Unprocessable
      properties:
        status_code:
          type: number
          description: HTTP status code
          example: 422
        error:
          type: string
          description: Contains an explanation of the status_code as defined in HTTP/1.1 standard (RFC 7231)
          example: Unprocessable Entity
        type_name:
          type: string
          description: The type of error returned
          example: InvalidStateError
        message:
          type: string
          description: A human-readable message providing more details about the error.
          example: Invalid State
          x-speakeasy-error-message: true
        detail:
          anyOf:
            - type: string
              example: Unprocessable request, please verify your request headers and body.
            - type: object
              x-speakeasy-detail: true
              example:
                error: Unprocessable
                message: Unprocessable request, please verify your request headers and body.
          description: Contains parameter or domain specific information related to the error and why it occurred.
        ref:
          type: string
          description: Link to documentation of error type
          example: https://developers.apideck.com/errors#invalidstateerror
    UpdateConnectionResponse:
      type: object
      x-apideck-schema-id: UpdateConnectionResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/Connection'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateConsentRequest:
      type: object
      x-apideck-schema-id: UpdateConsentRequest
      additionalProperties: false
      required:
        - granted
        - resources
      properties:
        resources:
          oneOf:
            - type: object
              description: Map of resources to field-level permissions that are being consented to
              additionalProperties:
                type: object
                description: Field paths with read/write permissions
                additionalProperties:
                  type: object
                  properties:
                    read:
                      type: boolean
                      description: Whether the field can be read
                      example: true
                    write:
                      type: boolean
                      description: Whether the field can be written to
                      example: true
            - type: string
              enum:
                - '*'
              description: Wildcard indicating all resources and fields when Data Scopes is disabled
              example: '*'
        granted:
          type: boolean
          description: Whether consent is being granted (true) or denied/revoked (false)
          example: true
    UpdateConsentResponse:
      type: object
      x-apideck-schema-id: UpdateConsentResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/ConsentRecord'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateConsumerRequest:
      type: object
      x-apideck-schema-id: UpdateConsumerRequest
      additionalProperties: false
      properties:
        metadata:
          $ref: '#/components/schemas/ConsumerMetadata'
    UpdateConsumerResponse:
      type: object
      x-apideck-schema-id: GetConsumerResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/Consumer'
        _raw:
          $ref: '#/components/schemas/Raw'
    UpdateCustomMappingRequest:
      type: object
      x-apideck-schema-id: UpdateCustomMappingRequest
      additionalProperties: false
      required:
        - value
      properties:
        value:
          type: string
          description: Target Field Mapping value
          example: $.root.training.first_aid
    UpdateCustomMappingResponse:
      type: object
      x-apideck-schema-id: UpdateCustomMappingResponse
      required:
        - status_code
        - status
        - data
      properties:
        status_code:
          type: integer
          description: HTTP Response Status Code
          example: 200
        status:
          type: string
          description: HTTP Response Status
          example: OK
        data:
          $ref: '#/components/schemas/CustomMapping'
        _raw:
          $ref: '#/components/schemas/Raw'
    VaultEventType:
      type: string
      x-apideck-enum-id: vault.events
      enum:
        - '*'
        - vault.connection.created
        - vault.connection.updated
        - vault.connection.disabled
        - vault.connection.deleted
        - vault.connection.callable
        - vault.connection.revoked
        - vault.connection.token_refresh.failed
        - vault.connection.token_refresh.pending
        - vault.connection.token_refresh.recovered
      example: vault.connection.created
    WebhookSubscription:
      type: object
      x-apideck-schema-id: WebhookSubscription
      additionalProperties: false
      readOnly: true
      properties:
        downstream_id:
          type: string
          description: The ID of the downstream service
          example: 5f5f5f5f5f5f5f5f5f5f5f5f
        unify_event_types:
          type: array
          description: The list of Unify Events this connection is subscribed to
          items:
            type: string
            description: The Unify Event Type
            example: crm.contact.created
        downstream_event_types:
          type: array
          description: The list of downstream Events this connection is subscribed to
          items:
            type: string
            description: The Downstream Event Type
            example: contacts.CREATED
        execute_url:
          type: string
          description: The URL the downstream is sending to when the event is triggered
          example: https://unify.apideck.com/webhook/w/{lookupIdToken}/{serviceId}?e={downstreamEventType}
        created_at:
          type: string
          description: The date and time the webhook subscription was created downstream
          example: '2020-10-01T12:00:00.000Z'
    Raw:
      title: raw
      type: object
      x-apideck-schema-id: Raw
      description: Raw response from the integration when raw=true query param is provided
      nullable: true
      additionalProperties: true
  responses:
    BadRequestResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestResponse'
      description: Bad Request
    ConsumerRequestCountsInDateRangeResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ConsumerRequestCountsInDateRangeResponse'
      description: Consumers Request Counts within Date Range
    CreateConnectionResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateConnectionResponse'
      description: Connection created
    CreateConsumerResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateConsumerResponse'
      description: Consumer created
    CreateCustomMappingResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateCustomMappingResponse'
      description: Custom mapping created
    Created:
      content:
        application/json:
          example: {}
          schema: {}
      description: Resource created
    CreateSessionResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateSessionResponse'
      description: Session created
    DeleteConsumerResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeleteConsumerResponse'
      description: Consumer deleted
    Deleted:
      content:
        application/json:
          example: {}
          schema: {}
      description: Resource successfully deleted
    GetConsentRecordsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetConsentRecordsResponse'
      description: Consent records
    GetConnectionResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetConnectionResponse'
      description: Connection
    GetConnectionsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetConnectionsResponse'
      description: Connections
    GetConsumerResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetConsumerResponse'
      description: Consumer
    GetConsumersResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetConsumersResponse'
      description: Consumers
    GetCustomFieldsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCustomFieldsResponse'
      description: Custom mapping
    GetCustomMappingsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCustomMappingsResponse'
      description: Custom mapping
    GetCustomMappingResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCustomMappingResponse'
      description: Custom mapping
    GetLogsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetLogsResponse'
      description: Logs
    GetResourceExampleResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetResourceExampleResponse'
      description: Resource Schema
    GetResourceSchemaResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetResourceSchemaResponse'
      description: Resource Schema
    NoContent:
      content:
        application/json:
          example: {}
          schema: {}
      description: No content
    NotFoundResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFoundResponse'
      description: The specified resource was not found
    NotImplementedResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotImplementedResponse'
      description: Not Implemented
    Ok:
      content:
        application/json:
          example: {}
          schema: {}
      description: Ok
    PaymentRequiredResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentRequiredResponse'
      description: Payment Required
    ProxyError:
      content:
        application/json:
          schema: {}
      description: Proxy error
      headers:
        x-apideck-downstream-error:
          schema:
            description: Indicates if the error returned in the body is from the downstream
            type: boolean
    ValidateConnectionStateResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidateConnectionStateResponse'
      description: Connection access token refreshed
    UnauthorizedResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedResponse'
      description: Unauthorized
    UnexpectedErrorResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnexpectedErrorResponse'
      description: Unexpected error
    UnprocessableResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnprocessableResponse'
      description: Unprocessable
    UpdateConnectionResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateConnectionResponse'
      description: Connection updated
    UpdateConsumerResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateConsumerResponse'
      description: Consumer updated
    UpdateCustomMappingResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateCustomMappingResponse'
      description: Custom mapping updated
    Updated:
      content:
        application/json:
          example: {}
          schema: {}
      description: Resource updated
    CreateCallbackStateResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateCallbackStateResponse'
      description: Callback state created
    UpdateConsentResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateConsentResponse'
      description: Consent updated
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: |
        To access our API, you need to sign up and obtain your unique API key. Each Unify application is assigned a single API key. You can locate your API key in the Configuration Settings section of your Apideck application. Additionally, your application’s application_id is available on the same page.

        Authenticate your API requests by including your test or live secret API key in the request header.

        - Bearer authorization header: `Authorization: Bearer "YOUR_API_KEY_HERE"`
        - Application id header: `x-apideck-app-id: "YOUR_APP_ID_HERE"`

        You should use the public keys on the SDKs and the secret keys to authenticate API requests.

        **Do not share or include your secret API keys on client side code.** Your API keys carry significant privileges. Please ensure to keep them 100% secure and be sure to not share your secret API keys in areas that are publicly accessible like GitHub.

        Learn how to set the Authorization header inside Postman https://learning.postman.com/docs/postman/sending-api-requests/authorization/#api-key

        Go to Unify to grab your API KEY https://app.apideck.com/unify/api-keys
    applicationId:
      type: apiKey
      in: header
      name: x-apideck-app-id
      description: The ID of your Unify application
security:
  - apiKey: []
    applicationId: []
paths:
  /vault/consumers:
    post:
      summary: Create consumer
      operationId: consumersAdd
      description: Create a consumer
      tags:
        - Consumers
      parameters:
        - $ref: '#/components/parameters/applicationId'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConsumerRequest'
      responses:
        '200':
          $ref: '#/components/responses/CreateConsumerResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            consumer:
              consumer_id: test_consumer_id
              metadata:
                account_name: SpaceX
                user_name: Elon Musk
                email: elon@musk.com
                image: https://www.spacex.com/static/images/share.jpg
    get:
      summary: Get all consumers
      operationId: consumersAll
      description: |
        This endpoint includes all application consumers, along with an aggregated count of requests made.
      tags:
        - Consumers
      parameters:
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/consumers_filter'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetConsumersResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
  /vault/consumers/{consumer_id}:
    get:
      summary: Get consumer
      operationId: consumersOne
      description: |
        Consumer detail including their aggregated counts with the connections they have authorized.
      tags:
        - Consumers
      parameters:
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/consumer_id'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetConsumerResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            consumerId: test_user_id
    patch:
      summary: Update consumer
      operationId: consumersUpdate
      description: Update consumer metadata such as name and email.
      tags:
        - Consumers
      parameters:
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/consumer_id'
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConsumerRequest'
      responses:
        '200':
          $ref: '#/components/responses/UpdateConsumerResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            consumerId: test_user_id
            consumer:
              metadata:
                account_name: SpaceX
                user_name: Elon Musk
                email: elon@musk.com
                image: https://www.spacex.com/static/images/share.jpg
    delete:
      summary: Delete consumer
      operationId: consumersDelete
      description: Delete consumer and all their connections, including credentials.
      tags:
        - Consumers
      parameters:
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/consumer_id'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/DeleteConsumerResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            consumerId: test_user_id
  /vault/consumers/{consumer_id}/stats:
    get:
      summary: Consumer request counts
      operationId: consumerRequestCountsAll
      description: |
        Get consumer request counts within a given datetime range.
      tags:
        - Consumers
      parameters:
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/consumer_id'
        - $ref: '#/components/parameters/start_datetime'
        - $ref: '#/components/parameters/end_datetime'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/ConsumerRequestCountsInDateRangeResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            consumerId: test_user_id
            startDatetime: '2021-05-01T12:00:00.000Z'
            endDatetime: '2021-05-30T12:00:00.000Z'
  /vault/connections:
    get:
      summary: Get all connections
      operationId: connectionsAll
      description: |
        This endpoint includes all the configured integrations and contains the required assets
        to build an integrations page where your users can install integrations.
        OAuth2 supported integrations will contain authorize and revoke links to handle the authentication flows.
      tags:
        - Connections
      parameters:
        - $ref: '#/components/parameters/optionalConsumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/api'
        - $ref: '#/components/parameters/configured'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetConnectionsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
  /vault/connections/{unified_api}/{service_id}:
    get:
      tags:
        - Connections
      summary: Get connection
      description: Get a connection
      operationId: connectionsOne
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/unified_api'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetConnectionResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            unifiedApi: crm
    post:
      summary: Create connection
      operationId: connectionsAdd
      description: |
        Create an authorized connection
      tags:
        - Connections
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/unified_api'
      security:
        - apiKey: []
      requestBody:
        description: Fields that need to be persisted on the resource
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Connection'
      responses:
        '200':
          $ref: '#/components/responses/CreateConnectionResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            unifiedApi: crm
            connection:
              enabled: true
              settings: *ref_0
              metadata: *ref_1
              configuration:
                - resource: leads
                  defaults:
                    - id: ProductInterest
                      options:
                        - label: General Channel
                          value: general
                          option_type: simple
                      value: GC5000 series
              custom_mappings:
                - value: $.root.training.first_aid
              consent_state: granted
              latest_consent:
                granted: true
                resources: *ref_2
              application_data_scopes:
                enabled: true
                resources: *ref_2
    patch:
      tags:
        - Connections
      summary: Update connection
      description: Update a connection
      operationId: connectionsUpdate
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/unified_api'
      security:
        - apiKey: []
      requestBody:
        description: Fields that need to be updated on the resource
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Connection'
      responses:
        '200':
          $ref: '#/components/responses/UpdateConnectionResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            unifiedApi: crm
            connection:
              enabled: true
              settings: *ref_0
              metadata: *ref_1
              configuration:
                - resource: leads
                  defaults:
                    - id: ProductInterest
                      options:
                        - label: General Channel
                          value: general
                          option_type: simple
                      value: GC5000 series
              custom_mappings:
                - value: $.root.training.first_aid
              consent_state: granted
              latest_consent:
                granted: true
                resources: *ref_2
              application_data_scopes:
                enabled: true
                resources: *ref_2
    delete:
      tags:
        - Connections
      summary: Deletes a connection
      description: Deletes a connection
      operationId: connectionsDelete
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/unified_api'
      security:
        - apiKey: []
      responses:
        '204':
          description: Resource deleted
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            unifiedApi: crm
  /vault/connections/{unified_api}/{service_id}/import:
    post:
      summary: Import connection
      operationId: connectionsImport
      description: |
        Import an authorized connection.
      tags:
        - Connections
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/unified_api'
      security:
        - apiKey: []
      requestBody:
        description: Fields that need to be persisted on the resource
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionImportData'
      responses:
        '200':
          $ref: '#/components/responses/CreateConnectionResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            unifiedApi: crm
            connection:
              credentials: *ref_3
              settings: *ref_4
              metadata: *ref_5
  /vault/connections/{unified_api}/{service_id}/token:
    post:
      tags:
        - Connections
      summary: Authorize Access Token
      operationId: connectionsToken
      description: |
        Triggers exchanging persisted connection credentials for an access token and store it in Vault. Currently supported for connections with the `client_credentials` or `password` OAuth grant type.

        Note:
          - Do not include any credentials in the request body. This operation does not persist changes, but only triggers the exchange of persisted connection credentials for an access token.
          - The access token will not be returned in the response. A 200 response code indicates the authorization was successful and that a valid access token was stored on the connection.
          - The access token will be used for subsequent API requests.
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/unified_api'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: {}
              additionalProperties: false
      responses:
        '200':
          $ref: '#/components/responses/GetConnectionResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            unifiedApi: crm
            connectionsToken: {}
  /vault/connections/{unified_api}/{service_id}/validate:
    post:
      tags:
        - Connections
      summary: Validate Connection State
      operationId: validateConnectionState
      description: |
        This endpoint validates the current state of a given connection. This will perform different checks based on the connection auth type. For basic and apiKey auth types, the presence of required fields is checked.
        For connectors that implement OAuth2, this operation forces the refresh flow for an access token regardless of its expiry.

        Note:
          - Do not include any credentials in the request body. This operation does not persist changes, but only triggers the validation of connection state.
          - If a refresh token flow was performed and successful, the new access token will then be used for subsequent API requests.
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/unified_api'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: {}
              additionalProperties: false
      responses:
        '200':
          $ref: '#/components/responses/ValidateConnectionStateResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            unifiedApi: crm
            validateConnectionState: {}
  /vault/connections/{unified_api}/{service_id}/consent:
    get:
      tags:
        - Connections
      summary: Get consent records
      description: Get all consent records for a connection
      operationId: connectionConsentsAll
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/unified_api'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetConsentRecordsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            unifiedApi: crm
    patch:
      tags:
        - Connections
      summary: Update consent state
      description: Update the consent state of a connection
      operationId: connectionConsentUpdate
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/unified_api'
      security:
        - apiKey: []
      requestBody:
        description: New consent state
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConsentRequest'
      responses:
        '200':
          $ref: '#/components/responses/UpdateConsentResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            unifiedApi: crm
            connectionConsent:
              resources:
                property1:
                  property1:
                    read: true
                    write: true
                  property2:
                    read: true
                    write: true
                property2:
                  property1:
                    read: true
                    write: true
                  property2:
                    read: true
                    write: true
              granted: true
  /vault/connections/{unified_api}/{service_id}/callback-state:
    post:
      tags:
        - Connections
      summary: Create Callback State
      operationId: createCallbackState
      description: |
        This endpoint creates a callback state that can be used to issue requests to the callback endpoint.
      security:
        - apiKey: []
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/unified_api'
      requestBody:
        description: Callback state data
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCallbackState'
      responses:
        '200':
          $ref: '#/components/responses/CreateCallbackStateResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            unifiedApi: crm
            createCallbackState:
              redirect_uri: https://example.com/callback
  /vault/connections/{unified_api}/{service_id}/{resource}/config:
    get:
      tags:
        - Connections
      summary: Get resource settings
      description: |
        This endpoint returns custom settings and their defaults required by connection for a given resource.
      operationId: connectionSettingsAll
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/unified_api'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/resource'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetConnectionResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            unifiedApi: crm
            serviceId: pipedrive
            resource: leads
    patch:
      tags:
        - Connections
      summary: Update settings
      description: Update default values for a connection's resource settings
      operationId: connectionSettingsUpdate
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/unified_api'
        - $ref: '#/components/parameters/resource'
      security:
        - apiKey: []
      requestBody:
        description: Fields that need to be updated on the resource
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Connection'
      responses:
        '200':
          $ref: '#/components/responses/UpdateConnectionResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            unifiedApi: crm
            resource: leads
            connection:
              enabled: true
              settings: *ref_0
              metadata: *ref_1
              configuration:
                - resource: leads
                  defaults:
                    - id: ProductInterest
                      options:
                        - label: General Channel
                          value: general
                          option_type: simple
                      value: GC5000 series
              custom_mappings:
                - value: $.root.training.first_aid
              consent_state: granted
              latest_consent:
                granted: true
                resources: *ref_2
              application_data_scopes:
                enabled: true
                resources: *ref_2
  /vault/connections/{unified_api}/{service_id}/{resource}/schema:
    get:
      tags:
        - Connections
      summary: Get resource schema
      description: |
        This endpoint returns an approximate JSONSchema of a given resource.
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      x-internal: true
      operationId: connectionsSchema
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/unified_api'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/resource'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetResourceSchemaResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            unifiedApi: crm
            serviceId: pipedrive
            resource: leads
  /vault/connections/{unified_api}/{service_id}/{resource}/example:
    get:
      tags:
        - Connections
      summary: Get resource example
      description: |
        This endpoint returns a downstream example of a given resource.
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      x-internal: true
      operationId: connectionsExample
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/unified_api'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/resource'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetResourceExampleResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            unifiedApi: crm
            serviceId: pipedrive
            resource: leads
  /vault/connections/{unified_api}/{service_id}/{resource}/custom-fields:
    get:
      tags:
        - Connections
      summary: Get resource custom fields
      description: |
        This endpoint returns an custom fields on a connection resource.
      operationId: customFieldsAll
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/unified_api'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/resource'
        - $ref: '#/components/parameters/resource_id'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetCustomFieldsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            unifiedApi: crm
            serviceId: pipedrive
            resource: leads
  /vault/connections/{unified_api}/{service_id}/{resource}/custom-mappings:
    get:
      tags:
        - Connections
      summary: List connection custom mappings
      description: This endpoint returns a list of custom mappings for a connection.
      operationId: connectionCustomMappingsAll
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/unified_api'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/resource'
        - $ref: '#/components/parameters/resource_id'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetCustomMappingsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            unifiedApi: crm
            serviceId: pipedrive
            resource: leads
  /vault/authorize/{service_id}/{application_id}:
    get:
      tags:
        - Connections
      summary: Authorize
      operationId: connectionsAuthorize
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      description: |
        __In most cases the authorize link is provided in the ``/connections`` endpoint. Normally you don't need to manually generate these links.__

        Use this endpoint to authenticate a user with a connector. It will return a 301 redirect to the downstream connector endpoints.

        Auth links will have a state parameter included to verify the validity of the request. This is the url your users will use to activate OAuth supported integration providers.

        Vault handles the complete Authorization Code Grant Type Flow for you and will redirect you to the dynamic redirect uri you have appended to the url in case this is missing the default redirect uri you have configured for your Unify application.
      parameters:
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/application_id'
        - $ref: '#/components/parameters/state'
        - $ref: '#/components/parameters/redirect_uri'
        - $ref: '#/components/parameters/scope'
      security: []
      responses:
        '301':
          description: redirect
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            applicationId: dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
            state: <jwt_token>
            redirectUri: http://example.com/integrations
  /vault/revoke/{service_id}/{application_id}:
    get:
      tags:
        - Connections
      summary: Revoke connection
      operationId: connectionsRevoke
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      description: |
        __In most cases the authorize link is provided in the ``/connections`` endpoint. Normally you don't need to manually generate these links.__

        Use this endpoint to revoke an existing OAuth connector.

        Auth links will have a state parameter included to verify the validity of the request. This is the url your users will use to activate OAuth supported integration providers.

        Vault handles the complete revoke flow for you and will redirect you to the dynamic redirect uri you have appended to the url.
      parameters:
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/application_id'
        - $ref: '#/components/parameters/state'
        - $ref: '#/components/parameters/redirect_uri_revoke'
      security: []
      responses:
        '301':
          description: redirect
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            serviceId: pipedrive
            applicationId: dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
            state: <jwt_token>
            redirectUri: http://example.com/integrations
  /vault/custom-mappings/{unified_api}/{service_id}/{target_field_id}:
    get:
      tags:
        - Custom Mappings
      summary: Get custom mapping
      description: Get a custom mapping
      operationId: customMappingsOne
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      x-internal: true
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/unified_api'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/target_field_id'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetCustomMappingResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            unifiedApi: crm
            serviceId: pipedrive
            targetFieldId: hris+employees+first_aid_training
    post:
      tags:
        - Custom Mappings
      summary: Create custom mapping
      description: Create a custom mapping
      operationId: customMappingsAdd
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      x-internal: true
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/unified_api'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/target_field_id'
      security:
        - apiKey: []
      requestBody:
        description: Fields that need to be updated on the resource
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomMappingRequest'
      responses:
        '200':
          $ref: '#/components/responses/CreateCustomMappingResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            unifiedApi: crm
            serviceId: pipedrive
            targetFieldId: hris+employees+first_aid_training
            customMapping:
              value: $.root.training.first_aid
    patch:
      tags:
        - Custom Mappings
      summary: Update custom mapping
      description: Update a custom mapping
      operationId: customMappingsUpdate
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      x-internal: true
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/unified_api'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/target_field_id'
      security:
        - apiKey: []
      requestBody:
        description: Fields that need to be updated on the resource
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomMappingRequest'
      responses:
        '200':
          $ref: '#/components/responses/UpdateCustomMappingResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            unifiedApi: crm
            serviceId: pipedrive
            targetFieldId: hris+employees+first_aid_training
            customMapping:
              value: $.root.training.first_aid
    delete:
      tags:
        - Custom Mappings
      summary: Deletes a custom mapping
      description: Deletes a custom mapping
      operationId: customMappingsDelete
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      x-internal: true
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/unified_api'
        - $ref: '#/components/parameters/service_id'
        - $ref: '#/components/parameters/target_field_id'
      security:
        - apiKey: []
      responses:
        '204':
          description: Resource deleted
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            unifiedApi: crm
            serviceId: pipedrive
            targetFieldId: hris+employees+first_aid_training
  /vault/custom-mappings/{unified_api}/{service_id}:
    get:
      tags:
        - Custom Mappings
      summary: List custom mappings
      description: This endpoint returns a list of custom mappings.
      operationId: customMappingsAll
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/unified_api'
        - $ref: '#/components/parameters/service_id'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetCustomMappingsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            unifiedApi: crm
            serviceId: pipedrive
  /vault/callback:
    get:
      tags:
        - Connections
      summary: Callback
      operationId: connectionsCallback
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      description: |
        This endpoint gets called after the triggering the authorize flow.

        Callback links need a state and code parameter to verify the validity of the request.

        When an error occurs during the OAuth flow, providers will optionally include error parameters
        in the callback request instead of the code parameter.
      parameters:
        - $ref: '#/components/parameters/state'
        - $ref: '#/components/parameters/code'
        - name: error
          in: query
          description: Error code returned by the OAuth provider when authorization fails
          required: false
          schema:
            type: string
            example: access_denied
        - name: error_description
          in: query
          description: Human-readable description of the error from the OAuth provider
          required: false
          schema:
            type: string
            example: The user denied access to your application
      security: []
      responses:
        '301':
          description: callback
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            state: <jwt_token>
            code: g0ZGZmNjVmOWI
  /vault/sessions:
    post:
      summary: Create Session
      operationId: sessionsCreate
      description: |
        Making a POST request to this endpoint will initiate a Hosted Vault session. Redirect the consumer to the returned
        URL to allow temporary access to manage their integrations and settings.

        Note: This is a short lived token that will expire after 1 hour (TTL: 3600).
      tags:
        - Sessions
      parameters:
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/applicationId'
      security:
        - apiKey: []
      requestBody:
        description: Additional redirect uri and/or consumer metadata
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Session'
      responses:
        '200':
          $ref: '#/components/responses/CreateSessionResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            session:
              consumer_metadata:
                account_name: SpaceX
                user_name: Elon Musk
                email: elon@musk.com
                image: https://www.spacex.com/static/images/share.jpg
              redirect_uri: https://mysaas.com/dashboard
              settings:
                unified_apis:
                  - crm
                hide_resource_settings: false
                sandbox_mode: false
                isolation_mode: false
                session_length: 30m
                show_logs: true
                show_suggestions: false
                show_sidebar: true
                auto_redirect: false
                hide_guides: false
                allow_actions:
                  - delete
              theme:
                favicon: https://res.cloudinary.com/apideck/icons/intercom
                logo: https://res.cloudinary.com/apideck/icons/intercom
                primary_color: '#286efa'
                sidepanel_background_color: '#286efa'
                sidepanel_text_color: '#FFFFFF'
                vault_name: Intercom
                privacy_url: https://compliance.apideck.com/privacy-policy
                terms_url: https://www.termsfeed.com/terms-conditions/957c85c1b089ae9e3219c83eff65377e
              custom_consumer_settings: *ref_6
  /vault/logs:
    get:
      summary: Get all consumer request logs
      operationId: logsAll
      description: |
        This endpoint includes all consumer request logs.
      tags:
        - Logs
      parameters:
        - $ref: '#/components/parameters/applicationId'
        - $ref: '#/components/parameters/consumerId'
        - $ref: '#/components/parameters/filter'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
      security:
        - apiKey: []
      responses:
        '200':
          $ref: '#/components/responses/GetLogsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '402':
          $ref: '#/components/responses/PaymentRequiredResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
  /vault/oauth/disconnect/{jwt}/{service_id}:
    get:
      tags:
        - Connections
      summary: Provider disconnect callback
      operationId: vaultOAuthDisconnect
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      x-internal: true
      description: |
        Endpoint that receives browser redirect notifications from downstream providers
        when a user disconnects their OAuth integration. The JWT in the path encodes
        the application identity. The service_id identifies the connector.
      parameters:
        - name: jwt
          in: path
          required: true
          schema:
            type: string
        - name: service_id
          in: path
          required: true
          schema:
            type: string
      security: []
      responses:
        '200':
          description: Static HTML disconnected page
          content:
            text/html:
              schema:
                type: string
        '302':
          description: Redirect to the application's configured post-disconnect URL
          headers:
            Location:
              schema:
                type: string
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source: {}
    post:
      tags:
        - Connections
      summary: Provider disconnect server callback
      operationId: vaultOAuthDisconnectCallback
      x-sdk-exclude: true
      x-speakeasy-ignore: true
      x-internal: true
      description: |
        Endpoint that receives server-to-server POST callbacks from downstream providers
        when a user disconnects their OAuth integration. The JWT in the path encodes
        the application identity. The service_id identifies the connector. The request
        body contains the provider-specific identifier.
      parameters:
        - name: jwt
          in: path
          required: true
          schema:
            type: string
        - name: service_id
          in: path
          required: true
          schema:
            type: string
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: Disconnect acknowledged
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        default:
          $ref: '#/components/responses/UnexpectedErrorResponse'
      x-apideck-api: vault
      x-codeSamples:
        - lang: TypeScript
          label: Node
          source:
            vaultOAuthDisconnectCallback: {}
x-webhooks:
  x-sdk-exclude: true
  x-speakeasy-ignore: true
  ConnectionCreated:
    post:
      summary: Connection Created
      description: Event broadcast when a connection has been created.
      operationId: connectionCreated
      x-apideck-event-type: vault.connection.created
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/VaultEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/ConnectionEvent'
            example:
              payload:
                event_id: 9755c355-56c3-4a2f-a2da-86ff4411fccb
                event_type: vault.connection.created
                service_id: apideck-vault
                entity_id: 1111+test_user_id
                entity_type: Connection
                entity:
                  id: 1111+test_user_id
                  consumer_id: test_user_id
                  unified_api: crm
                  service_id: salesforce
                  name: Salesforce
                  icon: https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png
                  logo: https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg
                  website: https://www.salesforce.com
                  tag_line: CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.
                  auth_type: oauth2
                  enabled: true
                  created_at: '2020-09-19T12:18:37.071Z'
                  updated_at: '2020-09-19T12:18:37.071Z'
                  state: added
                execution_attempt: 2
                occurred_at: '2021-10-01T03:14:55.419Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
  ConnectionUpdated:
    post:
      summary: Connection Updated
      description: Event broadcast when a connection has been updated.
      operationId: connectionUpdated
      x-apideck-event-type: vault.connection.updated
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/VaultEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/ConnectionEvent'
            example:
              payload:
                event_id: 9755c355-56c3-4a2f-a2da-86ff4411fccb
                event_type: vault.connection.updated
                service_id: apideck-vault
                entity_id: 1111+test_user_id
                entity_type: Connection
                entity:
                  id: 1111+test_user_id
                  consumer_id: test_user_id
                  unified_api: crm
                  service_id: salesforce
                  name: Salesforce
                  icon: https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png
                  logo: https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg
                  website: https://www.salesforce.com
                  tag_line: CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.
                  auth_type: oauth2
                  enabled: true
                  created_at: '2020-09-19T12:18:37.071Z'
                  updated_at: '2020-09-19T12:18:37.071Z'
                  state: authorized
                execution_attempt: 2
                occurred_at: '2021-10-01T03:14:55.419Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
  ConnectionDisabled:
    post:
      summary: Connection Disabled
      description: Event broadcast when a connection has been disabled.
      operationId: connectionDisabled
      x-apideck-event-type: vault.connection.disabled
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/VaultEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/ConnectionEvent'
            example:
              payload:
                event_id: 9755c355-56c3-4a2f-a2da-86ff4411fccb
                event_type: vault.connection.disabled
                service_id: apideck-vault
                entity_id: 1111+test_user_id
                entity_type: Connection
                entity:
                  id: 1111+test_user_id
                  consumer_id: test_user_id
                  unified_api: crm
                  service_id: salesforce
                  name: Salesforce
                  icon: https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png
                  logo: https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg
                  website: https://www.salesforce.com
                  tag_line: CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.
                  auth_type: oauth2
                  enabled: false
                  created_at: '2020-09-19T12:18:37.071Z'
                  updated_at: '2020-09-19T12:18:37.071Z'
                  state: authorized
                execution_attempt: 2
                occurred_at: '2021-10-01T03:14:55.419Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
  ConnectionDeleted:
    post:
      summary: Connection Deleted
      description: Event broadcast when a connection has been deleted.
      operationId: connectionDeleted
      x-apideck-event-type: vault.connection.deleted
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/VaultEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/ConnectionEvent'
            example:
              payload:
                event_id: 9755c355-56c3-4a2f-a2da-86ff4411fccb
                event_type: vault.connection.deleted
                service_id: apideck-vault
                entity_id: 1111+test_user_id
                entity_type: Connection
                entity:
                  id: 1111+test_user_id
                  consumer_id: test_user_id
                  unified_api: crm
                  service_id: salesforce
                  name: Salesforce
                  icon: https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png
                  logo: https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg
                  website: https://www.salesforce.com
                  tag_line: CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.
                  auth_type: oauth2
                  enabled: true
                  created_at: '2020-09-19T12:18:37.071Z'
                  updated_at: '2020-09-19T12:18:37.071Z'
                  state: available
                execution_attempt: 2
                occurred_at: '2021-10-01T03:14:55.419Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
  ConnectionCallable:
    post:
      summary: Connection Callable
      description: Event broadcast when a connection is now callable.
      operationId: connectionCallable
      x-apideck-event-type: vault.connection.callable
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/VaultEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/ConnectionEvent'
            example:
              payload:
                event_id: 9755c355-56c3-4a2f-a2da-86ff4411fccb
                event_type: vault.connection.callable
                service_id: apideck-vault
                entity_id: 1111+test_user_id
                entity_type: Connection
                entity:
                  id: 1111+test_user_id
                  consumer_id: test_user_id
                  unified_api: crm
                  service_id: salesforce
                  name: Salesforce
                  icon: https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png
                  logo: https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg
                  website: https://www.salesforce.com
                  tag_line: CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.
                  auth_type: oauth2
                  enabled: true
                  created_at: '2020-09-19T12:18:37.071Z'
                  updated_at: '2020-09-19T12:18:37.071Z'
                  state: callable
                execution_attempt: 2
                occurred_at: '2021-10-01T03:14:55.419Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
  ConnectionRevoked:
    post:
      summary: Connection Revoked
      description: Event broadcast when a connection has been revoked.
      operationId: connectionRevoked
      x-apideck-event-type: vault.connection.revoked
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/VaultEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/ConnectionEvent'
            example:
              payload:
                event_id: 9755c355-56c3-4a2f-a2da-86ff4411fccb
                event_type: vault.connection.revoked
                service_id: apideck-vault
                entity_id: 1111+test_user_id
                entity_type: Connection
                entity:
                  id: 1111+test_user_id
                  consumer_id: test_user_id
                  unified_api: crm
                  service_id: salesforce
                  name: Salesforce
                  icon: https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png
                  logo: https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg
                  website: https://www.salesforce.com
                  tag_line: CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.
                  auth_type: oauth2
                  enabled: true
                  created_at: '2020-09-19T12:18:37.071Z'
                  updated_at: '2020-09-19T12:18:37.071Z'
                  state: added
                execution_attempt: 2
                occurred_at: '2021-10-01T03:14:55.419Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
  TokenRefreshFailed:
    post:
      summary: Connection Token Refresh Failed
      description: Event broadcast when a connection token refresh has failed.
      operationId: connectionTokenRefreshFailed
      x-apideck-event-type: vault.connection.token_refresh.failed
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/VaultEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/ConnectionEvent'
            example:
              payload:
                event_id: 9755c355-56c3-4a2f-a2da-86ff4411fccb
                event_type: vault.connection.token_refresh.failed
                service_id: apideck-vault
                entity_id: 1111+test_user_id
                entity_type: Connection
                entity:
                  id: 1111+test_user_id
                  consumer_id: test_user_id
                  unified_api: crm
                  service_id: salesforce
                  name: Salesforce
                  icon: https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png
                  logo: https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg
                  website: https://www.salesforce.com
                  tag_line: CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.
                  auth_type: oauth2
                  enabled: true
                  created_at: '2020-09-19T12:18:37.071Z'
                  updated_at: '2020-09-19T12:18:37.071Z'
                  state: added
                execution_attempt: 2
                occurred_at: '2021-10-01T03:14:55.419Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
  TokenRefreshPending:
    post:
      summary: Connection Token Refresh Pending
      description: Event broadcast when a connection has been token refresh pending.
      operationId: connectionTokenRefreshPending
      x-apideck-event-type: vault.connection.token_refresh.pending
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/VaultEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/ConnectionEvent'
            example:
              payload:
                event_id: 9755c355-56c3-4a2f-a2da-86ff4411fccb
                event_type: vault.connection.token_refresh.pending
                service_id: apideck-vault
                entity_id: 1111+test_user_id
                entity_type: Connection
                entity:
                  id: 1111+test_user_id
                  consumer_id: test_user_id
                  unified_api: crm
                  service_id: salesforce
                  name: Salesforce
                  icon: https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png
                  logo: https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg
                  website: https://www.salesforce.com
                  tag_line: CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.
                  auth_type: oauth2
                  enabled: true
                  created_at: '2020-09-19T12:18:37.071Z'
                  updated_at: '2020-09-19T12:18:37.071Z'
                  state: added
                execution_attempt: 2
                occurred_at: '2021-10-01T03:14:55.419Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
  TokenRefreshRecovered:
    post:
      summary: Connection Token Refresh Recovered
      description: Event broadcast when a connection has been token refresh recovered.
      operationId: connectionTokenRefreshRecovered
      x-apideck-event-type: vault.connection.token_refresh.recovered
      parameters:
        - name: x-apideck-event-type
          in: header
          required: true
          description: The type of event that was triggered
          schema:
            $ref: '#/components/schemas/VaultEventType'
        - name: x-apideck-signature
          in: header
          required: true
          description: HMAC SHA-256 signature of the request body, used to verify the webhook came from Apideck
          schema:
            type: string
          example: 2c3b38f1a9b3349afe38829713dcd9722f47dec3ce8906ad93ce803a33f2a8a3
        - name: x-apideck-idempotency-key
          in: header
          required: true
          description: A unique identifier for the webhook event, can be used to prevent duplicate processing
          schema:
            type: string
          example: e91dea5d-8ff6-4099-8b33-d3162fb4a042
      tags:
        - Webhook Events
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payload:
                  $ref: '#/components/schemas/ConnectionEvent'
            example:
              payload:
                event_id: 9755c355-56c3-4a2f-a2da-86ff4411fccb
                event_type: vault.connection.token_refresh.recovered
                service_id: apideck-vault
                entity_id: 1111+test_user_id
                entity_type: Connection
                entity:
                  id: 1111+test_user_id
                  consumer_id: test_user_id
                  unified_api: crm
                  service_id: salesforce
                  name: Salesforce
                  icon: https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png
                  logo: https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg
                  website: https://www.salesforce.com
                  tag_line: CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.
                  auth_type: oauth2
                  enabled: true
                  created_at: '2020-09-19T12:18:37.071Z'
                  updated_at: '2020-09-19T12:18:37.071Z'
                  state: added
                execution_attempt: 2
                occurred_at: '2021-10-01T03:14:55.419Z'
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully.
      security: []
