openapi: 3.0.3 info: version: 10.4.0 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). - Soon, you can skip the previous step and use the Apideck sandbox credentials to get you started instead (upcoming) - 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 - Use the [publishing guides](/app-listing-requirements) to get your integration listed across app marketplaces. ### 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 - Search for integrations (upcoming) - Give integration suggestions based on provided metadata (email or website) when creating the session (upcoming) To use Hosted Vault, you will need to first [**create a session**](https://developers.apideck.com/apis/vault/reference#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. Example using curl: ``` curl -X POST https://unify.apideck.com/vault/sessions -H "Content-Type: application/json" -H "Authorization: Bearer " -H "X-APIDECK-CONSUMER-ID: " -H "X-APIDECK-APP-ID: " -d '{"consumer_metadata": { "account_name" : "Sample", "user_name": "Sand Box", "email": "sand@box.com", "image": "https://unavatar.now.sh/jake" }, "theme": { "vault_name": "Intercom", "primary_color": "#286efa", "sidepanel_background_color": "#286efa","sidepanel_text_color": "#FFFFFF", "favicon": "https://res.cloudinary.com/apideck/icons/intercom" }}' ``` ### Vault API _Beware, this is strategy takes more time to implement in comparison to 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 (upcoming). ## 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) More information about the connection state can be found in the [Connection state](https://developers.apideck.com/guides/connection-states) guide. ## 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. | ## Guides - [Get started with Apideck](https://developers.apideck.com/getting-started) - [Get started with Vault](https://developers.apideck.com/guides/vault) - [Authorize connection via Vault](https://developers.apideck.com/guides/authorize-connections) - [Vault connection status](https://developers.apideck.com/guides/connection-states) - [How to build an integrations UI with Vault](https://github.com/apideck-samples/integration-settings) ## 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 API, you can migrate the access tokens and accounts to Apideck Vault. ### Can I use Vault in combination with existing integrations? Yes, you can. The flexibility of Unify allows you to quickly the use cases you need while keeping a gradual migration path based on your timeline and requirements. ### How does Vault work for Apideck Ecosystem customers? Once logged in, pick your ecosystem; on the left-hand side of the screen, you'll have the option to create an application underneath the Unify section. ### How to integrate Apideck Vault This section covers everything you need to know to authenticate your customers through Vault. Vault provides **three auth strategies** to use API tokens from your customers: - Vault API - Hosted Vault - Vault Widget (JS, React, Vue) You can also opt to bypass Vault and still take care of authentication flows yourself. Make sure to put the right safeguards in place to protect your customers' tokens and other sensitive data. ### What auth types does Vault support? We support all the common authentication types, including: API keys, OAuth, Basic auth, and more. #### API keys For Services supporting the API key strategy, you can use Hosted Vault will need to provide an in-app form where users can configure their API keys provided by the integration service. #### OAuth 2.0 ##### Authorization Code Grant Type Flow 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 being 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 below. 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. x-apideck-app-id: name: x-apideck-app-id in: header required: true description: The ID of your Unify application schema: type: string example: dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX x-apideck-consumer-id: 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 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 XXXXXXXXXXXXXXXXX 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: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsInVuaWZpZWRfYXBpIjoiZGVmYXVsdCIsInNlcnZpY2VfaWQiOiJ0ZWFtbGVhZGVyIiwiYXBwbGljYXRpb25faWQiOiIxMTExIiwiaWF0IjoxNjIyMTI2Nzg3fQ.97_pn1UAXc7mctXBdr15czUNO1jjdQ9sJUOIE_Myzbk 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' schemas: ApplicationId: type: string description: ID of your Apideck Application example: dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX 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 detail: anyOf: - type: string example: Missing property foobar - type: object 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 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/?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/?state= settings: type: object description: Connection settings. Values will persist to `form_fields` with corresponding id additionalProperties: true properties: {} nullable: true example: 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: 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 created_at: type: number readOnly: true example: 1615563533390 custom_mappings: type: array description: List of custom mappings configured for this connection items: $ref: '#/components/schemas/CustomMapping' 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' 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: access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c refresh_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.cThIIoDvwdueQB468K5xDc5633seEFoqwxjF_xSJyQQ settings: type: object description: Connection settings. Values will persist to `form_fields` with corresponding id nullable: true example: instance_url: https://eu28.salesforce.com 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 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 if the webhook has has been disabled as it reached its retry limit or if account is over the usage allocated by it's plan. enum: - none - retry_limit - usage_limit 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.notes.updated - crm.notes.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 - 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.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 - 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 - issue-tracking.ticket.created - issue-tracking.ticket.updated - issue-tracking.ticket.deleted - ats.application.created - ats.application.updated - ats.application.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 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' 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 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' 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' 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' 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' 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: http://vault.apideck.com/session/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsImFwcGxpY2F0aW9uX2lkIj readOnly: true type: string session_token: example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsImFwcGxpY2F0aW9uX2lkIj readOnly: true type: string additionalProperties: false 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 additionalProperties: false 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' 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: enum: - text - checkbox - tel - email - url - textarea - select - filtered-select - multi-select - datetime - date - time - number 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 FormFieldOption: anyOf: - $ref: '#/components/schemas/SimpleFormFieldOption' - $ref: '#/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' 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' 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' 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' 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' 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' 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' 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' 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' 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' 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 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 detail: anyOf: - type: string example: "Could not find widget with id: '123'" - type: object 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 detail: anyOf: - type: string example: Failed to retrieve Widget tokenUrl from 'components.securitySchemes.OAuth2.flows' - type: object 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 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 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 ResourceSchema: type: object x-apideck-schema-id: ResourceSchema ResourceId: type: string description: ID of the resource, typically a lowercased version of name. example: companies 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: 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: anyOf: - type: string example: general - type: integer example: 123 - type: number example: 12.5 - type: boolean example: true - type: array items: anyOf: - type: string - type: integer - type: number example: - team - general 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 detail: anyOf: - type: string example: Missing authentication - type: object example: statusCode: 401 error: Unauthorized message: Missing authentication 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 detail: anyOf: - type: string example: 'Missing Header: x-apideck-consumer-id' - type: object 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 detail: anyOf: - type: string example: Unprocessable request, please verify your request headers and body. - type: object 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' 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' 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' 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 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' 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 CreateSessionResponse: content: application/json: schema: $ref: '#/components/schemas/CreateSessionResponse' description: Session created Created: content: application/json: example: {} schema: {} description: Resource created DeleteConsumerResponse: content: application/json: schema: $ref: '#/components/schemas/DeleteConsumerResponse' description: Consumer deleted Deleted: content: application/json: example: {} schema: {} description: Resource successfully deleted 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 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 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 securitySchemes: apiKey: type: apiKey in: header name: Authorization description: | To use API you have to sign up and get your own API key. Unify API accounts have sandbox mode and live mode API keys. To change modes just use the appropriate key to get a live or test object. You can find your API keys on the unify settings of your Apideck app. Your Apideck application_id can also be found 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 ` - Application id header: `x-apideck-app-id: ` 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/x-apideck-app-id' security: - apiKey: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Consumer' 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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID' }) const params = { 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' } } } try { const { data } = await apideck.vault.consumersAdd(params) console.log('API called successfully', data) } catch (error) { console.error(error) } 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/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID' }) try { const { data } = await apideck.vault.consumersAll({}) console.log('API called successfully', data) } catch (error) { console.error(error) } /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/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID' }) try { const { data } = await apideck.vault.consumersOne({ consumerId: 'test_user_id' }) console.log('API called successfully', data) } catch (error) { console.error(error) } patch: summary: Update consumer operationId: consumersUpdate description: Update consumer metadata such as name and email. tags: - Consumers parameters: - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID' }) const params = { 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' } } } try { const { data } = await apideck.vault.consumersUpdate(params) console.log('API called successfully', data) } catch (error) { console.error(error) } delete: summary: Delete consumer operationId: consumersDelete description: Delete consumer and all their connections, including credentials. tags: - Consumers parameters: - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID' }) try { const { data } = await apideck.vault.consumersDelete({ consumerId: 'test_user_id' }) console.log('API called successfully', data) } catch (error) { console.error(error) } /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/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID' }) const params = { consumerId: 'test_user_id', startDatetime: '2021-05-01T12:00:00.000Z', endDatetime: '2021-05-30T12:00:00.000Z' } try { const { data } = await apideck.vault.consumerRequestCountsAll(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /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/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) try { const { data } = await apideck.vault.connectionsAll({}) console.log('API called successfully', data) } catch (error) { console.error(error) } /vault/connections/{unified_api}/{service_id}: get: tags: - Connections summary: Get connection description: Get a connection operationId: connectionsOne parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) try { const { data } = await apideck.vault.connectionsOne({ serviceId: 'pipedrive', unifiedApi: 'crm' }) console.log('API called successfully', data) } catch (error) { console.error(error) } post: summary: Create connection operationId: connectionsAdd description: | Create an authorized connection tags: - Connections x-sdk-exclude: true parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { serviceId: 'pipedrive', unifiedApi: 'crm', connection: { enabled: true, settings: { instance_url: 'https://eu28.salesforce.com', api_key: '12345xxxxxx' }, metadata: { account: { name: 'My Company', id: 'c01458a5-7276-41ce-bc19-639906b0450a' }, plan: 'enterprise' }, configuration: [ { resource: 'leads', defaults: [ { id: 'ProductInterest', options: [Array], value: 'GC5000 series' } ] } ], custom_mappings: [ { value: '$.root.training.first_aid' } ] } } try { const { data } = await apideck.vault.connectionsAdd(params) console.log('API called successfully', data) } catch (error) { console.error(error) } patch: tags: - Connections summary: Update connection description: Update a connection operationId: connectionsUpdate parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { serviceId: 'pipedrive', unifiedApi: 'crm', connection: { enabled: true, settings: { instance_url: 'https://eu28.salesforce.com', api_key: '12345xxxxxx' }, metadata: { account: { name: 'My Company', id: 'c01458a5-7276-41ce-bc19-639906b0450a' }, plan: 'enterprise' }, configuration: [ { resource: 'leads', defaults: [ { id: 'ProductInterest', options: [Array], value: 'GC5000 series' } ] } ], custom_mappings: [ { value: '$.root.training.first_aid' } ] } } try { const { data } = await apideck.vault.connectionsUpdate(params) console.log('API called successfully', data) } catch (error) { console.error(error) } delete: tags: - Connections summary: Deletes a connection description: Deletes a connection operationId: connectionsDelete parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) try { const { data } = await apideck.vault.connectionsDelete({ serviceId: 'pipedrive', unifiedApi: 'crm' }) console.log('API called successfully', data) } catch (error) { console.error(error) } /vault/connections/{unified_api}/{service_id}/import: post: summary: Import connection operationId: connectionsImport description: | Import an authorized connection. tags: - Connections parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { serviceId: 'pipedrive', unifiedApi: 'crm', connection: { credentials: { access_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c', refresh_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.cThIIoDvwdueQB468K5xDc5633seEFoqwxjF_xSJyQQ' }, settings: { instance_url: 'https://eu28.salesforce.com' }, metadata: { account: { name: 'My Company', id: 'c01458a5-7276-41ce-bc19-639906b0450a' }, plan: 'enterprise' } } } try { const { data } = await apideck.vault.connectionsImport(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /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/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { serviceId: 'pipedrive', unifiedApi: 'crm', connectionsToken: {} } try { const { data } = await apideck.vault.connectionsToken(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /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/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { unifiedApi: 'crm', serviceId: 'pipedrive', resource: 'leads' } try { const { data } = await apideck.vault.connectionSettingsAll(params) console.log('API called successfully', data) } catch (error) { console.error(error) } patch: tags: - Connections summary: Update settings description: Update default values for a connection's resource settings operationId: connectionSettingsUpdate parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { serviceId: 'pipedrive', unifiedApi: 'crm', resource: 'leads', connection: { enabled: true, settings: { instance_url: 'https://eu28.salesforce.com', api_key: '12345xxxxxx' }, metadata: { account: { name: 'My Company', id: 'c01458a5-7276-41ce-bc19-639906b0450a' }, plan: 'enterprise' }, configuration: [ { resource: 'leads', defaults: [ { id: 'ProductInterest', options: [Array], value: 'GC5000 series' } ] } ], custom_mappings: [ { value: '$.root.training.first_aid' } ] } } try { const { data } = await apideck.vault.connectionSettingsUpdate(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /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-internal: true operationId: connectionsSchema parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { unifiedApi: 'crm', serviceId: 'pipedrive', resource: 'leads' } try { const { data } = await apideck.vault.connectionsSchema(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /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-internal: true operationId: connectionsExample parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { unifiedApi: 'crm', serviceId: 'pipedrive', resource: 'leads' } try { const { data } = await apideck.vault.connectionsExample(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /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/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { unifiedApi: 'crm', serviceId: 'pipedrive', resource: 'leads' } try { const { data } = await apideck.vault.customFieldsAll(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /vault/authorize/{service_id}/{application_id}: get: tags: - Connections summary: Authorize operationId: connectionsAuthorize x-sdk-exclude: 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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY' }) const params = { serviceId: 'pipedrive', applicationId: 'dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX', state: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsInVuaWZpZWRfYXBpIjoiZGVmYXVsdCIsInNlcnZpY2VfaWQiOiJ0ZWFtbGVhZGVyIiwiYXBwbGljYXRpb25faWQiOiIxMTExIiwiaWF0IjoxNjIyMTI2Nzg3fQ.97_pn1UAXc7mctXBdr15czUNO1jjdQ9sJUOIE_Myzbk', redirectUri: 'http://example.com/integrations' } try { const { data } = await apideck.vault.connectionsAuthorize(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /vault/revoke/{service_id}/{application_id}: get: tags: - Connections summary: Revoke connection operationId: connectionsRevoke x-sdk-exclude: 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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY' }) const params = { serviceId: 'pipedrive', applicationId: 'dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX', state: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsInVuaWZpZWRfYXBpIjoiZGVmYXVsdCIsInNlcnZpY2VfaWQiOiJ0ZWFtbGVhZGVyIiwiYXBwbGljYXRpb25faWQiOiIxMTExIiwiaWF0IjoxNjIyMTI2Nzg3fQ.97_pn1UAXc7mctXBdr15czUNO1jjdQ9sJUOIE_Myzbk', redirectUri: 'http://example.com/integrations' } try { const { data } = await apideck.vault.connectionsRevoke(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /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-internal: true parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { unifiedApi: 'crm', serviceId: 'pipedrive', targetFieldId: 'hris+employees+first_aid_training' } try { const { data } = await apideck.vault.customMappingsOne(params) console.log('API called successfully', data) } catch (error) { console.error(error) } post: tags: - Custom Mappings summary: Create custom mapping description: Create a custom mapping operationId: customMappingsAdd x-sdk-exclude: true x-internal: true parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { unifiedApi: 'crm', serviceId: 'pipedrive', targetFieldId: 'hris+employees+first_aid_training', customMapping: { value: '$.root.training.first_aid' } } try { const { data } = await apideck.vault.customMappingsAdd(params) console.log('API called successfully', data) } catch (error) { console.error(error) } patch: tags: - Custom Mappings summary: Update custom mapping description: Update a custom mapping operationId: customMappingsUpdate x-sdk-exclude: true x-internal: true parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { unifiedApi: 'crm', serviceId: 'pipedrive', targetFieldId: 'hris+employees+first_aid_training', customMapping: { value: '$.root.training.first_aid' } } try { const { data } = await apideck.vault.customMappingsUpdate(params) console.log('API called successfully', data) } catch (error) { console.error(error) } delete: tags: - Custom Mappings summary: Deletes a custom mapping description: Deletes a custom mapping operationId: customMappingsDelete x-sdk-exclude: true x-internal: true parameters: - $ref: '#/components/parameters/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { unifiedApi: 'crm', serviceId: 'pipedrive', targetFieldId: 'hris+employees+first_aid_training' } try { const { data } = await apideck.vault.customMappingsDelete(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /vault/callback: get: tags: - Connections summary: Callback operationId: connectionsCallback x-sdk-exclude: 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. parameters: - $ref: '#/components/parameters/state' - $ref: '#/components/parameters/code' 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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY' }) const params = { state: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsInVuaWZpZWRfYXBpIjoiZGVmYXVsdCIsInNlcnZpY2VfaWQiOiJ0ZWFtbGVhZGVyIiwiYXBwbGljYXRpb25faWQiOiIxMTExIiwiaWF0IjoxNjIyMTI2Nzg3fQ.97_pn1UAXc7mctXBdr15czUNO1jjdQ9sJUOIE_Myzbk', code: 'g0ZGZmNjVmOWI' } try { const { data } = await apideck.vault.connectionsCallback(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /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/x-apideck-consumer-id' - $ref: '#/components/parameters/x-apideck-app-id' 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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) const params = { 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: { feature_flag_1: true, tax_rates: [ { id: '6', label: '6%' }, { id: '21', label: '21%' } ] } } } try { const { data } = await apideck.vault.sessionsCreate(params) console.log('API called successfully', data) } catch (error) { console.error(error) } /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/x-apideck-app-id' - $ref: '#/components/parameters/x-apideck-consumer-id' - $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: | import { Apideck } from '@apideck/node' const apideck = new Apideck({ apiKey: 'REPLACE_WITH_API_KEY', appId: 'REPLACE_WITH_APP_ID', consumerId: 'REPLACE_WITH_CONSUMER_ID' }) try { const { data } = await apideck.vault.logsAll({}) console.log('API called successfully', data) } catch (error) { console.error(error) } x-webhooks: x-sdk-exclude: 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-idempotency-key in: header required: true description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request. schema: type: string format: uuid example: d290f1ee-6c54-4b01-90e6-d701748f0851 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-idempotency-key in: header required: true description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request. schema: type: string format: uuid example: d290f1ee-6c54-4b01-90e6-d701748f0851 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-idempotency-key in: header required: true description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request. schema: type: string format: uuid example: d290f1ee-6c54-4b01-90e6-d701748f0851 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-idempotency-key in: header required: true description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request. schema: type: string format: uuid example: d290f1ee-6c54-4b01-90e6-d701748f0851 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-idempotency-key in: header required: true description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request. schema: type: string format: uuid example: d290f1ee-6c54-4b01-90e6-d701748f0851 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-idempotency-key in: header required: true description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request. schema: type: string format: uuid example: d290f1ee-6c54-4b01-90e6-d701748f0851 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-idempotency-key in: header required: true description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request. schema: type: string format: uuid example: d290f1ee-6c54-4b01-90e6-d701748f0851 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: []