-
Notifications
You must be signed in to change notification settings - Fork 3
/
vault.yml
5156 lines (4998 loc) · 179 KB
/
vault.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
version: 10.8.1
title: Vault API
description: |+
Welcome to the Vault API 👋
When you're looking to connect to an API, the first step is authentication.
Vault helps you handle OAuth flows, store API keys, and refresh access tokens from users (called consumers in Apideck).
## Base URL
The base URL for all API requests is `https://unify.apideck.com`
## Get Started
To use the Apideck APIs, you need to sign up for free at [https://app.apideck.com/signup](). Follow the steps below to get started.
- [Create a free account.](https://app.apideck.com/signup)
- Go to the [Dashboard](https://app.apideck.com/unify/unified-apis/dashboard).
- Get your API key and the application ID.
- Select and configure the integrations you want to make available to your users. Through the Unify dashboard, you can configure which connectors you want to support as integrations.
- Retrieve the client_id and client_secret for the integration you want to activate (Only needed for OAuth integrations).
- Register the redirect URI for the example app (https://unify.apideck.com/vault/callback) in the list of redirect URIs under your app's settings.
### 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#tag/Sessions/operation/sessionsCreate). This can be achieved by making a POST request to the Vault API to create a valid session for a user, hereafter referred to as the consumer ID.
### Vault API
_Beware, this 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)
## 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
- [How to build an integrations UI with Vault](https://github.com/apideck-samples/vault?tab=readme-ov-file#integration-settings)
- How to configure the OAuth credentials for integration providers (COMING SOON)
## 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. (COMING SOON)
### 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
- Apideck Ecosystem _(COMING SOON)_
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?
What auth strategies does Vault handle? We currently support three flows so your customers can activate an integration.
#### 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: [email protected]
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-speakeasy-name-override: appId
x-speakeasy-globals-hidden: true
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
example: test-consumer
x-speakeasy-name-override: customerId
x-speakeasy-globals-hidden: true
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/<application-id>?state=<state>
description: The OAuth redirect URI. Redirect your users to this URI to let them authorize your app in the connector's UI. Before you can use this URI, you must add `redirect_uri` as a query parameter to the `authorize_url`. Be sure to URL encode the `redirect_uri` part. Your users will be redirected to this `redirect_uri` after they granted access to your app in the connector's UI.
nullable: true
readOnly: true
revoke_url:
type: string
nullable: true
description: The OAuth revoke URI. Redirect your users to this URI to revoke this connection. Before you can use this URI, you must add `redirect_uri` as a query parameter. Your users will be redirected to this `redirect_uri` after they granted access to your app in the connector's UI.
readOnly: true
example: https://unify.apideck.com/vault/revoke/salesforce/<application-id>?state=<state>
settings:
type: object
description: Connection settings. Values will persist to `form_fields` with corresponding id
additionalProperties: true
properties: {}
nullable: true
example:
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
- accounting.expense.created
- accounting.expense.updated
- accounting.expense.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