@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Vault API
@base https://unify.apideck.com
@version 10.24.12
@auth ApiKey Authorization in header | ApiKey x-apideck-app-id in header
@endpoints 33
@hint download_for_search
@toc vault(33)

@endpoint POST /vault/consumers
@required {x-apideck-app-id: str, consumer_id: str}
@optional {metadata: map{account_name: str, user_name: str, email: str, image: str}}
@returns(200) {status_code: int, status: str, data: map{consumer_id: str, application_id: str, metadata: map{account_name: str, user_name: str, email: str, image: str}, connections: [map], services: [str], aggregated_request_count: num, request_counts: map{unify: num, proxy: num, vault: num}, created: str, modified: str, request_count_updated: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/consumers
@required {x-apideck-app-id: str}
@optional {filter: map, cursor: str, limit: int=20}
@returns(200) {status_code: int, status: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/consumers/{consumer_id}
@required {x-apideck-app-id: str, consumer_id: str}
@returns(200) {status_code: int, status: str, data: map{consumer_id: str, application_id: str, metadata: map{account_name: str, user_name: str, email: str, image: str}, connections: [map], services: [str], aggregated_request_count: num, request_counts: map{unify: num, proxy: num, vault: num}, created: str, modified: str, request_count_updated: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PATCH /vault/consumers/{consumer_id}
@required {x-apideck-app-id: str, consumer_id: str}
@optional {metadata: map{account_name: str, user_name: str, email: str, image: str}}
@returns(200) {status_code: int, status: str, data: map{consumer_id: str, application_id: str, metadata: map{account_name: str, user_name: str, email: str, image: str}, connections: [map], services: [str], aggregated_request_count: num, request_counts: map{unify: num, proxy: num, vault: num}, created: str, modified: str, request_count_updated: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint DELETE /vault/consumers/{consumer_id}
@required {x-apideck-app-id: str, consumer_id: str}
@returns(200) {status_code: int, status: str, data: any, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/consumers/{consumer_id}/stats
@required {x-apideck-app-id: str, consumer_id: str, start_datetime: str, end_datetime: str}
@returns(200) {status_code: int, status: str, data: map{application_id: str, consumer_id: str, start_datetime: str, end_datetime: str, aggregated_request_count: num, request_counts: map{unify: num, proxy: num, vault: num}}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/connections
@required {x-apideck-app-id: str}
@optional {x-apideck-consumer-id: str, api: str, configured: bool}
@returns(200) {status_code: int, status: str, data: [map], _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/connections/{unified_api}/{service_id}
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, service_id: str, unified_api: str}
@returns(200) {status_code: int, status: str, data: map{id: str, service_id: str, name: str, tag_line: str, unified_api: str, state: str, integration_state: str, auth_type: str, oauth_grant_type: str, status: str, enabled: bool, website: str, icon: str, logo: str, authorize_url: str?, revoke_url: str?, settings: map?, metadata: map?, form_fields: [map], configuration: [map], configurable_resources: [str], resource_schema_support: [str], resource_settings_support: [str], validation_support: bool, schema_support: bool, settings_required_for_authorization: [str], subscriptions: [map], has_guide: bool, custom_mappings: [map], consent_state: str, consents: [map], latest_consent: map{id: str, created_at: str, granted: bool, resources: any}, application_data_scopes: map{enabled: bool, updated_at: str, resources: any}, health: str, credentials_expire_at: num, last_refresh_failed_at: num, created_at: num, updated_at: num?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint POST /vault/connections/{unified_api}/{service_id}
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, service_id: str, unified_api: str}
@optional {id: str, service_id: str, name: str, tag_line: str, unified_api: str, state: str(available/callable/added/authorized/invalid), integration_state: str(disabled/needs_configuration/configured), auth_type: str(oauth2/apiKey/basic/custom/none), oauth_grant_type: str(authorization_code/client_credentials/password), status: str(live/upcoming/requested), enabled: bool, website: str, icon: str, logo: str, authorize_url: str, revoke_url: str, settings: map{}, metadata: map{}, form_fields: [map{id: str, label: str, placeholder: str, description: str, type: any, required: bool, custom_field: bool, allow_custom_values: bool, disabled: bool, hidden: bool, deprecated: bool, sensitive: bool, prefix: str, suffix: str, options: [any]}], configuration: [map{resource: str, defaults: [map]}], configurable_resources: [str], resource_schema_support: [str], resource_settings_support: [str], validation_support: bool, schema_support: bool, settings_required_for_authorization: [str], subscriptions: [map{downstream_id: str, unify_event_types: [str], downstream_event_types: [str], execute_url: str, created_at: str}], has_guide: bool, custom_mappings: [map{id: str, label: str, description: str, value: str, key: str, required: bool, custom_field: bool, consumer_id: str, example: str}], consent_state: str(implicit/pending/granted/denied/revoked/requires_reconsent), consents: [map{id!: str, created_at!: str, granted!: bool, resources!: any}], latest_consent: map{id!: str, created_at!: str, granted!: bool, resources!: any}, application_data_scopes: map{enabled: bool, updated_at: str, resources: any}, health: str(revoked/missing_settings/needs_consent/needs_auth/pending_refresh/ok), credentials_expire_at: num, last_refresh_failed_at: num, created_at: num, updated_at: num}
@returns(200) {status_code: int, status: str, data: map{id: str, service_id: str, name: str, tag_line: str, unified_api: str, state: str, integration_state: str, auth_type: str, oauth_grant_type: str, status: str, enabled: bool, website: str, icon: str, logo: str, authorize_url: str?, revoke_url: str?, settings: map?, metadata: map?, form_fields: [map], configuration: [map], configurable_resources: [str], resource_schema_support: [str], resource_settings_support: [str], validation_support: bool, schema_support: bool, settings_required_for_authorization: [str], subscriptions: [map], has_guide: bool, custom_mappings: [map], consent_state: str, consents: [map], latest_consent: map{id: str, created_at: str, granted: bool, resources: any}, application_data_scopes: map{enabled: bool, updated_at: str, resources: any}, health: str, credentials_expire_at: num, last_refresh_failed_at: num, created_at: num, updated_at: num?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PATCH /vault/connections/{unified_api}/{service_id}
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, service_id: str, unified_api: str}
@optional {id: str, service_id: str, name: str, tag_line: str, unified_api: str, state: str(available/callable/added/authorized/invalid), integration_state: str(disabled/needs_configuration/configured), auth_type: str(oauth2/apiKey/basic/custom/none), oauth_grant_type: str(authorization_code/client_credentials/password), status: str(live/upcoming/requested), enabled: bool, website: str, icon: str, logo: str, authorize_url: str, revoke_url: str, settings: map{}, metadata: map{}, form_fields: [map{id: str, label: str, placeholder: str, description: str, type: any, required: bool, custom_field: bool, allow_custom_values: bool, disabled: bool, hidden: bool, deprecated: bool, sensitive: bool, prefix: str, suffix: str, options: [any]}], configuration: [map{resource: str, defaults: [map]}], configurable_resources: [str], resource_schema_support: [str], resource_settings_support: [str], validation_support: bool, schema_support: bool, settings_required_for_authorization: [str], subscriptions: [map{downstream_id: str, unify_event_types: [str], downstream_event_types: [str], execute_url: str, created_at: str}], has_guide: bool, custom_mappings: [map{id: str, label: str, description: str, value: str, key: str, required: bool, custom_field: bool, consumer_id: str, example: str}], consent_state: str(implicit/pending/granted/denied/revoked/requires_reconsent), consents: [map{id!: str, created_at!: str, granted!: bool, resources!: any}], latest_consent: map{id!: str, created_at!: str, granted!: bool, resources!: any}, application_data_scopes: map{enabled: bool, updated_at: str, resources: any}, health: str(revoked/missing_settings/needs_consent/needs_auth/pending_refresh/ok), credentials_expire_at: num, last_refresh_failed_at: num, created_at: num, updated_at: num}
@returns(200) {status_code: int, status: str, data: map{id: str, service_id: str, name: str, tag_line: str, unified_api: str, state: str, integration_state: str, auth_type: str, oauth_grant_type: str, status: str, enabled: bool, website: str, icon: str, logo: str, authorize_url: str?, revoke_url: str?, settings: map?, metadata: map?, form_fields: [map], configuration: [map], configurable_resources: [str], resource_schema_support: [str], resource_settings_support: [str], validation_support: bool, schema_support: bool, settings_required_for_authorization: [str], subscriptions: [map], has_guide: bool, custom_mappings: [map], consent_state: str, consents: [map], latest_consent: map{id: str, created_at: str, granted: bool, resources: any}, application_data_scopes: map{enabled: bool, updated_at: str, resources: any}, health: str, credentials_expire_at: num, last_refresh_failed_at: num, created_at: num, updated_at: num?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint DELETE /vault/connections/{unified_api}/{service_id}
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, service_id: str, unified_api: str}
@returns(204)
@errors {400, 401, 402, 404, 422}

@endpoint POST /vault/connections/{unified_api}/{service_id}/import
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, service_id: str, unified_api: str}
@optional {credentials: map{refresh_token: str, access_token: str, issued_at: str(date-time), expires_in: int}, settings: map{}, metadata: map{}}
@returns(200) {status_code: int, status: str, data: map{id: str, service_id: str, name: str, tag_line: str, unified_api: str, state: str, integration_state: str, auth_type: str, oauth_grant_type: str, status: str, enabled: bool, website: str, icon: str, logo: str, authorize_url: str?, revoke_url: str?, settings: map?, metadata: map?, form_fields: [map], configuration: [map], configurable_resources: [str], resource_schema_support: [str], resource_settings_support: [str], validation_support: bool, schema_support: bool, settings_required_for_authorization: [str], subscriptions: [map], has_guide: bool, custom_mappings: [map], consent_state: str, consents: [map], latest_consent: map{id: str, created_at: str, granted: bool, resources: any}, application_data_scopes: map{enabled: bool, updated_at: str, resources: any}, health: str, credentials_expire_at: num, last_refresh_failed_at: num, created_at: num, updated_at: num?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint POST /vault/connections/{unified_api}/{service_id}/token
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, service_id: str, unified_api: str}
@returns(200) {status_code: int, status: str, data: map{id: str, service_id: str, name: str, tag_line: str, unified_api: str, state: str, integration_state: str, auth_type: str, oauth_grant_type: str, status: str, enabled: bool, website: str, icon: str, logo: str, authorize_url: str?, revoke_url: str?, settings: map?, metadata: map?, form_fields: [map], configuration: [map], configurable_resources: [str], resource_schema_support: [str], resource_settings_support: [str], validation_support: bool, schema_support: bool, settings_required_for_authorization: [str], subscriptions: [map], has_guide: bool, custom_mappings: [map], consent_state: str, consents: [map], latest_consent: map{id: str, created_at: str, granted: bool, resources: any}, application_data_scopes: map{enabled: bool, updated_at: str, resources: any}, health: str, credentials_expire_at: num, last_refresh_failed_at: num, created_at: num, updated_at: num?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint POST /vault/connections/{unified_api}/{service_id}/validate
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, service_id: str, unified_api: str}
@returns(200) {status_code: int, status: str, data: map{id: str, state: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/connections/{unified_api}/{service_id}/consent
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, service_id: str, unified_api: str}
@returns(200) {status_code: int, status: str, data: [map], _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PATCH /vault/connections/{unified_api}/{service_id}/consent
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, service_id: str, unified_api: str, resources: any, granted: bool}
@returns(200) {status_code: int, status: str, data: map{id: str, created_at: str, granted: bool, resources: any}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint POST /vault/connections/{unified_api}/{service_id}/callback-state
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, service_id: str, unified_api: str}
@optional {redirect_uri: str}
@returns(200) {status_code: int, status: str, data: map{state: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/connections/{unified_api}/{service_id}/{resource}/config
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, unified_api: str, service_id: str, resource: str}
@returns(200) {status_code: int, status: str, data: map{id: str, service_id: str, name: str, tag_line: str, unified_api: str, state: str, integration_state: str, auth_type: str, oauth_grant_type: str, status: str, enabled: bool, website: str, icon: str, logo: str, authorize_url: str?, revoke_url: str?, settings: map?, metadata: map?, form_fields: [map], configuration: [map], configurable_resources: [str], resource_schema_support: [str], resource_settings_support: [str], validation_support: bool, schema_support: bool, settings_required_for_authorization: [str], subscriptions: [map], has_guide: bool, custom_mappings: [map], consent_state: str, consents: [map], latest_consent: map{id: str, created_at: str, granted: bool, resources: any}, application_data_scopes: map{enabled: bool, updated_at: str, resources: any}, health: str, credentials_expire_at: num, last_refresh_failed_at: num, created_at: num, updated_at: num?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PATCH /vault/connections/{unified_api}/{service_id}/{resource}/config
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, service_id: str, unified_api: str, resource: str}
@optional {id: str, service_id: str, name: str, tag_line: str, unified_api: str, state: str(available/callable/added/authorized/invalid), integration_state: str(disabled/needs_configuration/configured), auth_type: str(oauth2/apiKey/basic/custom/none), oauth_grant_type: str(authorization_code/client_credentials/password), status: str(live/upcoming/requested), enabled: bool, website: str, icon: str, logo: str, authorize_url: str, revoke_url: str, settings: map{}, metadata: map{}, form_fields: [map{id: str, label: str, placeholder: str, description: str, type: any, required: bool, custom_field: bool, allow_custom_values: bool, disabled: bool, hidden: bool, deprecated: bool, sensitive: bool, prefix: str, suffix: str, options: [any]}], configuration: [map{resource: str, defaults: [map]}], configurable_resources: [str], resource_schema_support: [str], resource_settings_support: [str], validation_support: bool, schema_support: bool, settings_required_for_authorization: [str], subscriptions: [map{downstream_id: str, unify_event_types: [str], downstream_event_types: [str], execute_url: str, created_at: str}], has_guide: bool, custom_mappings: [map{id: str, label: str, description: str, value: str, key: str, required: bool, custom_field: bool, consumer_id: str, example: str}], consent_state: str(implicit/pending/granted/denied/revoked/requires_reconsent), consents: [map{id!: str, created_at!: str, granted!: bool, resources!: any}], latest_consent: map{id!: str, created_at!: str, granted!: bool, resources!: any}, application_data_scopes: map{enabled: bool, updated_at: str, resources: any}, health: str(revoked/missing_settings/needs_consent/needs_auth/pending_refresh/ok), credentials_expire_at: num, last_refresh_failed_at: num, created_at: num, updated_at: num}
@returns(200) {status_code: int, status: str, data: map{id: str, service_id: str, name: str, tag_line: str, unified_api: str, state: str, integration_state: str, auth_type: str, oauth_grant_type: str, status: str, enabled: bool, website: str, icon: str, logo: str, authorize_url: str?, revoke_url: str?, settings: map?, metadata: map?, form_fields: [map], configuration: [map], configurable_resources: [str], resource_schema_support: [str], resource_settings_support: [str], validation_support: bool, schema_support: bool, settings_required_for_authorization: [str], subscriptions: [map], has_guide: bool, custom_mappings: [map], consent_state: str, consents: [map], latest_consent: map{id: str, created_at: str, granted: bool, resources: any}, application_data_scopes: map{enabled: bool, updated_at: str, resources: any}, health: str, credentials_expire_at: num, last_refresh_failed_at: num, created_at: num, updated_at: num?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/connections/{unified_api}/{service_id}/{resource}/schema
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, unified_api: str, service_id: str, resource: str}
@returns(200) {status_code: int, status: str, data: map, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/connections/{unified_api}/{service_id}/{resource}/example
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, unified_api: str, service_id: str, resource: str}
@returns(200) {status_code: int, status: str, data: map{unified_api: str, service_id: str, resource: map{id: str, name: str, status: str, downstream_id: str, downstream_name: str}, example_response: map}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/connections/{unified_api}/{service_id}/{resource}/custom-fields
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, unified_api: str, service_id: str, resource: str}
@optional {resource_id: str}
@returns(200) {status_code: int, status: str, data: [map], _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/connections/{unified_api}/{service_id}/{resource}/custom-mappings
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, unified_api: str, service_id: str, resource: str}
@optional {resource_id: str}
@returns(200) {status_code: int, status: str, data: [map], _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/authorize/{service_id}/{application_id}
@required {service_id: str, application_id: str, state: str, redirect_uri: str}
@optional {scope: [str]}
@errors {301, 400, 401, 402, 404, 422}

@endpoint GET /vault/revoke/{service_id}/{application_id}
@required {service_id: str, application_id: str, state: str, redirect_uri: str}
@errors {301, 400, 401, 402, 404, 422}

@endpoint GET /vault/custom-mappings/{unified_api}/{service_id}/{target_field_id}
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, unified_api: str, service_id: str, target_field_id: str}
@returns(200) {status_code: int, status: str, data: map{id: str, label: str, description: str?, value: str, key: str, required: bool, custom_field: bool, consumer_id: str?, example: str?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint POST /vault/custom-mappings/{unified_api}/{service_id}/{target_field_id}
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, unified_api: str, service_id: str, target_field_id: str, value: str}
@returns(200) {status_code: int, status: str, data: map{id: str, label: str, description: str?, value: str, key: str, required: bool, custom_field: bool, consumer_id: str?, example: str?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PATCH /vault/custom-mappings/{unified_api}/{service_id}/{target_field_id}
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, unified_api: str, service_id: str, target_field_id: str, value: str}
@returns(200) {status_code: int, status: str, data: map{id: str, label: str, description: str?, value: str, key: str, required: bool, custom_field: bool, consumer_id: str?, example: str?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint DELETE /vault/custom-mappings/{unified_api}/{service_id}/{target_field_id}
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, unified_api: str, service_id: str, target_field_id: str}
@returns(204)
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/custom-mappings/{unified_api}/{service_id}
@required {x-apideck-consumer-id: str, x-apideck-app-id: str, unified_api: str, service_id: str}
@returns(200) {status_code: int, status: str, data: [map], _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/callback
@required {state: str, code: str}
@optional {error: str, error_description: str}
@errors {301, 400, 401, 402, 404, 422}

@endpoint POST /vault/sessions
@required {x-apideck-consumer-id: str, x-apideck-app-id: str}
@optional {consumer_metadata: map{account_name: str, user_name: str, email: str, image: str}, redirect_uri: str, settings: map{unified_apis: [str], hide_resource_settings: bool, sandbox_mode: bool, isolation_mode: bool, session_length: str, show_logs: bool, show_suggestions: bool, show_sidebar: bool, auto_redirect: bool, hide_guides: bool, allow_actions: [str]}, theme: map{favicon: str, logo: str, primary_color: str, sidepanel_background_color: str, sidepanel_text_color: str, vault_name: str, privacy_url: str, terms_url: str}, custom_consumer_settings: map}
@returns(200) {status_code: int, status: str, data: map{session_uri: str, session_token: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /vault/logs
@required {x-apideck-app-id: str, x-apideck-consumer-id: str}
@optional {filter: map, cursor: str, limit: int=20}
@returns(200) {status_code: int, status: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@end
