Skip to content
Last updated on May 23, 2023
57 min read

Vercel REST API Interfaces

Shared interfaces referenced across multiple endpoints.

ACLAction

1
/** Enum containing the actions that can be performed against a resource. Group operations are included. */
2
ACLAction: "create" | "delete" | "read" | "update" | "list" | "count"

AuthToken

1
/** Authentication token metadata. */
2
interface AuthToken {
3
/** The unique identifier of the token. */
4
id: string
5
/** The human-readable name of the token. */
6
name: string
7
/** The type of the token. */
8
type: string
9
/** The origin of how the token was created. */
10
origin?: string
11
/** The access scopes granted to the token. */
12
scopes?: (
13
| {
14
type: "user"
15
origin: "saml" | "github" | "gitlab" | "bitbucket" | "email" | "manual"
16
createdAt: number
17
expiresAt?: number
18
}
19
| {
20
type: "team"
21
teamId: string
22
origin: "saml" | "github" | "gitlab" | "bitbucket" | "email" | "manual"
23
createdAt: number
24
expiresAt?: number
25
}
26
)[]
27
/** Timestamp (in milliseconds) of when the token expires. */
28
expiresAt?: number
29
/** Timestamp (in milliseconds) of when the token was most recently used. */
30
activeAt: number
31
/** Timestamp (in milliseconds) of when the token was created. */
32
createdAt: number
33
}

AuthUser

1
/** Data for the currently authenticated User. */
2
interface AuthUser {
3
/** UNIX timestamp (in milliseconds) when the User account was created. */
4
createdAt: number
5
/** When the User account has been "soft blocked", this property will contain the date when the restriction was enacted, and the identifier for why. */
6
softBlock: {
7
blockedAt: number
8
reason:
9
| "FAIR_USE_LIMITS_EXCEEDED"
10
| "ENTERPRISE_TRIAL_ENDED"
11
| "BLOCKED_FOR_PLATFORM_ABUSE"
12
| "UNPAID_INVOICE"
13
| "SUBSCRIPTION_EXPIRED"
14
| "SUBSCRIPTION_CANCELED"
15
} | null
16
/** An object containing billing infomation associated with the User account. */
17
billing: {
18
currency?: "usd" | "eur"
19
cancelation?: number | null
20
period: {
21
start: number
22
end: number
23
} | null
24
contract?: {
25
start: number
26
end: number
27
} | null
28
plan: "hobby" | "enterprise" | "pro"
29
platform?: "stripe" | "stripeTestMode"
30
orbCustomerId?: string
31
programType?: "startup" | "agency"
32
trial?: {
33
start: number
34
end: number
35
} | null
36
email?: string | null
37
tax?: {
38
type: string
39
id: string
40
} | null
41
language?: string | null
42
address?: {
43
line1: string
44
line2?: string
45
postalCode?: string
46
city?: string
47
country?: string
48
state?: string
49
} | null
50
name?: string | null
51
overdue?: boolean | null
52
invoiceItems?: {
53
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
54
pro?: {
55
tier?: number
56
price: number
57
quantity: number
58
name?: string
59
hidden: boolean
60
createdAt?: number
61
disabledAt?: number | null
62
frequency?: {
63
interval: "month"
64
intervalCount: 1 | 2 | 3 | 6 | 12
65
}
66
maxQuantity?: number
67
}
68
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
69
enterprise?: {
70
tier?: number
71
price: number
72
quantity: number
73
name?: string
74
hidden: boolean
75
createdAt?: number
76
disabledAt?: number | null
77
frequency?: {
78
interval: "month"
79
intervalCount: 1 | 2 | 3 | 6 | 12
80
}
81
maxQuantity?: number
82
}
83
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
84
concurrentBuilds?: {
85
tier?: number
86
price: number
87
quantity: number
88
name?: string
89
hidden: boolean
90
createdAt?: number
91
disabledAt?: number | null
92
frequency?: {
93
interval: "month"
94
intervalCount: 1 | 2 | 3 | 6 | 12
95
}
96
maxQuantity?: number
97
}
98
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
99
saml?: {
100
tier?: number
101
price: number
102
quantity: number
103
name?: string
104
hidden: boolean
105
createdAt?: number
106
disabledAt?: number | null
107
frequency?: {
108
interval: "month"
109
intervalCount: 1 | 2 | 3 | 6 | 12
110
}
111
maxQuantity?: number
112
}
113
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
114
teamSeats?: {
115
tier?: number
116
price: number
117
quantity: number
118
name?: string
119
hidden: boolean
120
createdAt?: number
121
disabledAt?: number | null
122
frequency?: {
123
interval: "month"
124
intervalCount: 1 | 2 | 3 | 6 | 12
125
}
126
maxQuantity?: number
127
}
128
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
129
customCerts?: {
130
tier?: number
131
price: number
132
quantity: number
133
name?: string
134
hidden: boolean
135
createdAt?: number
136
disabledAt?: number | null
137
frequency?: {
138
interval: "month"
139
intervalCount: 1 | 2 | 3 | 6 | 12
140
}
141
maxQuantity?: number
142
}
143
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
144
previewDeploymentSuffix?: {
145
tier?: number
146
price: number
147
quantity: number
148
name?: string
149
hidden: boolean
150
createdAt?: number
151
disabledAt?: number | null
152
frequency?: {
153
interval: "month"
154
intervalCount: 1 | 2 | 3 | 6 | 12
155
}
156
maxQuantity?: number
157
}
158
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
159
passwordProtection?: {
160
tier?: number
161
price: number
162
quantity: number
163
name?: string
164
hidden: boolean
165
createdAt?: number
166
disabledAt?: number | null
167
frequency?: {
168
interval: "month"
169
intervalCount: 1 | 2 | 3 | 6 | 12
170
}
171
maxQuantity?: number
172
}
173
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
174
ssoProtection?: {
175
tier?: number
176
price: number
177
quantity: number
178
name?: string
179
hidden: boolean
180
createdAt?: number
181
disabledAt?: number | null
182
frequency?: {
183
interval: "month"
184
intervalCount: 1 | 2 | 3 | 6 | 12
185
}
186
maxQuantity?: number
187
}
188
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
189
analytics?: {
190
tier?: number
191
price: number
192
quantity: number
193
name?: string
194
hidden: boolean
195
createdAt?: number
196
disabledAt?: number | null
197
frequency?: {
198
interval: "month"
199
intervalCount: 1 | 2 | 3 | 6 | 12
200
}
201
maxQuantity?: number
202
}
203
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
204
monitoring?: {
205
tier?: number
206
price: number
207
quantity: number
208
name?: string
209
hidden: boolean
210
createdAt?: number
211
disabledAt?: number | null
212
frequency?: {
213
interval: "month"
214
intervalCount: 1 | 2 | 3 | 6 | 12
215
}
216
maxQuantity?: number
217
}
218
/** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */
219
webAnalytics?: {
220
tier?: number
221
price: number
222
quantity: number
223
name?: string
224
hidden: boolean
225
createdAt?: number
226
disabledAt?: number | null
227
frequency?: {
228
interval: "month"
229
intervalCount: 1 | 2 | 3 | 6 | 12
230
}
231
maxQuantity?: number
232
}
233
analyticsUsage?: {
234
tier?: number
235
price: number
236
batch: number
237
threshold: number
238
name?: string
239
hidden: boolean
240
disabledAt?: number | null
241
}
242
artifacts?: {
243
tier?: number
244
price: number
245
batch: number
246
threshold: number
247
name?: string
248
hidden: boolean
249
disabledAt?: number | null
250
}
251
bandwidth?: {
252
tier?: number
253
price: number
254
batch: number
255
threshold: number
256
name?: string
257
hidden: boolean
258
disabledAt?: number | null
259
}
260
builds?: {
261
tier?: number
262
price: number
263
batch: number
264
threshold: number
265
name?: string
266
hidden: boolean
267
disabledAt?: number | null
268
}
269
edgeMiddlewareInvocations?: {
270
tier?: number
271
price: number
272
batch: number
273
threshold: number
274
name?: string
275
hidden: boolean
276
disabledAt?: number | null
277
}
278
edgeFunctionExecutionUnits?: {
279
tier?: number
280
price: number
281
batch: number
282
threshold: number
283
name?: string
284
hidden: boolean
285
disabledAt?: number | null
286
}
287
monitoringMetric?: {
288
tier?: number
289
price: number
290
batch: number
291
threshold: number
292
name?: string
293
hidden: boolean
294
disabledAt?: number | null
295
}
296
serverlessFunctionExecution?: {
297
tier?: number
298
price: number
299
batch: number
300
threshold: number
301
name?: string
302
hidden: boolean
303
disabledAt?: number | null
304
}
305
sourceImages?: {
306
tier?: number
307
price: number
308
batch: number
309
threshold: number
310
name?: string
311
hidden: boolean
312
disabledAt?: number | null
313
}
314
webAnalyticsEvent?: {
315
tier?: number
316
price: number
317
batch: number
318
threshold: number
319
name?: string
320
hidden: boolean
321
disabledAt?: number | null
322
}
323
edgeConfigRead?: {
324
tier?: number
325
price: number
326
batch: number
327
threshold: number
328
name?: string
329
hidden: boolean
330
disabledAt?: number | null
331
}
332
edgeConfigWrite?: {
333
tier?: number
334
price: number
335
batch: number
336
threshold: number
337
name?: string
338
hidden: boolean
339
disabledAt?: number | null
340
}
341
cronJobInvocation?: {
342
tier?: number
343
price: number
344
batch: number
345
threshold: number
346
name?: string
347
hidden: boolean
348
disabledAt?: number | null
349
}
350
postgresComputeTime?: {
351
tier?: number
352
price: number
353
batch: number
354
threshold: number
355
name?: string
356
hidden: boolean
357
disabledAt?: number | null
358
}
359
postgresDataStorage?: {
360
tier?: number
361
price: number
362
batch: number
363
threshold: number
364
name?: string
365
hidden: boolean
366
disabledAt?: number | null
367
}
368
postgresDataTransfer?: {
369
tier?: number
370
price: number
371
batch: number
372
threshold: number
373
name?: string
374
hidden: boolean
375
disabledAt?: number | null
376
}
377
postgresWrittenData?: {
378
tier?: number
379
price: number
380
batch: number
381
threshold: number
382
name?: string
383
hidden: boolean
384
disabledAt?: number | null
385
}
386
storageRedisTotalCommands?: {
387
tier?: number
388
price: number
389
batch: number
390
threshold: number
391
name?: string
392
hidden: boolean
393
disabledAt?: number | null
394
}
395
storageRedisTotalBandwidthInBytes?: {
396
tier?: number
397
price: number
398
batch: number
399
threshold: number
400
name?: string
401
hidden: boolean
402
disabledAt?: number | null
403
}
404
storageRedisTotalDailyAvgStorageInBytes?: {
405
tier?: number
406
price: number
407
batch: number
408
threshold: number
409
name?: string
410
hidden: boolean
411
disabledAt?: number | null
412
}
413
storageRedisTotalDatabases?: {
414
tier?: number
415
price: number
416
batch: number
417
threshold: number
418
name?: string
419
hidden: boolean
420
disabledAt?: number | null
421
}
422
dataCacheRead?: {
423
tier?: number
424
price: number
425
batch: number
426
threshold: number
427
name?: string
428
hidden: boolean
429
disabledAt?: number | null
430
}
431
dataCacheRevalidation?: {
432
tier?: number
433
price: number
434
batch: number
435
threshold: number
436
name?: string
437
hidden: boolean
438
disabledAt?: number | null
439
}
440
dataCacheWrite?: {
441
tier?: number
442
price: number
443
batch: number
444
threshold: number
445
name?: string
446
hidden: boolean
447
disabledAt?: number | null
448
}
449
} | null
450
invoiceSettings?: {
451
footer?: string
452
}
453
subscriptions?:
454
| {
455
id: string
456
trial: {
457
start: number
458
end: number
459
} | null
460
period: {
461
start: number
462
end: number
463
}
464
frequency: {
465
interval: "month" | "day" | "week" | "year"
466
intervalCount: number
467
}
468
discount: {
469
id: string
470
coupon: {
471
id: string
472
name: string | null
473
amountOff: number | null
474
percentageOff: number | null
475
durationInMonths: number | null
476
duration: "forever" | "repeating" | "once"
477
}
478
} | null
479
items: {
480
id: string
481
priceId: string
482
productId: string
483
amount: number
484
quantity: number
485
}[]
486
}[]
487
| null
488
controls?: {
489
analyticsSampleRateInPercent?: number | null
490
analyticsSpendLimitInDollars?: number | null
491
} | null
492
purchaseOrder?: string | null
493
status?: "active" | "canceled" | "trialing" | "overdue" | "expired"
494
pricingExperiment?: "august-2022"
495
} | null
496
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
497
resourceConfig: {
498
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
499
nodeType?: string
500
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
501
concurrentBuilds?: number
502
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
503
awsAccountType?: string
504
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
505
awsAccountIds?: string[]
506
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
507
cfZoneName?: string
508
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
509
edgeConfigs?: number
510
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
511
edgeConfigSize?: number
512
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
513
edgeFunctionMaxSizeBytes?: number
514
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
515
edgeFunctionExecutionTimeoutMs?: number
516
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
517
kvDatabases?: number
518
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
519
postgresDatabases?: number
520
/** An object containing infomation related to the amount of platform resources may be allocated to the User account. */
521
blobStores?: number
522
}
523
/** Prefix that will be used in the URL of "Preview" deployments created by the User account. */
524
stagingPrefix: string
525
/** set of dashboard view preferences (cards or list) per scopeId */
526
activeDashboardViews?: {
527
scopeId: string
528
viewPreference: "list" | "cards"
529
}[]
530
importFlowGitNamespace?: (string | number) | null
531
importFlowGitNamespaceId?: (string | number) | null
532
importFlowGitProvider?: "github" | "gitlab" | "bitbucket"
533
preferredScopesAndGitNamespaces?: {
534
scopeId: string
535
gitNamespaceId: (string | number) | null
536
}[]
537
/** A record of when, under a certain scopeId, a toast was dismissed */
538
dismissedToasts?: {
539
name: string
540
dismissals: {
541
scopeId: string
542
createdAt: number
543
}[]
544
}[]
545
/** A list of projects and spaces across teams that a user has marked as a favorite. */
546
favoriteProjectsAndSpaces?: (
547
| {
548
projectId: string
549
scopeSlug: string
550
scopeId: string
551
}
552
| {
553
spaceId: string
554
scopeSlug: string
555
scopeId: string
556
}
557
)[]
558
/** Whether the user has a trial available for a paid plan subscription. */
559
hasTrialAvailable: boolean
560
/** remote caching settings */
561
remoteCaching?: {
562
enabled?: boolean
563
}
564
/** data cache settings */
565
dataCache?: {
566
excessBillingEnabled?: boolean
567
}
568
/** The User's unique identifier. */
569
id: string
570
/** Email address associated with the User account. */
571
email: string
572
/** Name associated with the User account, or `null` if none has been provided. */
573
name: string | null
574
/** Unique username associated with the User account. */
575
username: string
576
/** SHA1 hash of the avatar for the User account. Can be used in conjuction with the ... endpoint to retrieve the avatar image. */
577
avatar: string | null
578
}

AuthUserLimited

1
/** A limited form of data for the currently authenticated User, due to the authentication token missing privileges to read the full User data. */
2
interface AuthUserLimited {
3
/** Property indicating that this User data contains only limited information, due to the authentication token missing privileges to read the full User data. Re-login with email, GitHub, GitLab or Bitbucket in order to upgrade the authentication token with the necessary privileges. */
4
limited: boolean
5
/** The User's unique identifier. */
6
id: string
7
/** Email address associated with the User account. */
8
email: string
9
/** Name associated with the User account, or `null` if none has been provided. */
10
name: string | null
11
/** Unique username associated with the User account. */
12
username: string
13
/** SHA1 hash of the avatar for the User account. Can be used in conjuction with the ... endpoint to retrieve the avatar image. */
14
avatar: string | null
15
}

EdgeConfigItem

1
/** The EdgeConfig. */
2
interface EdgeConfigItem {
3
key: string
4
value: __REF__EdgeConfigItemValue__
5
edgeConfigId: string
6
createdAt: number
7
updatedAt: number
8
}

EdgeConfigItemValue

1
EdgeConfigItemValue:
2
| (
3
| string
4
| number
5
| boolean
6
| { [key: string]: __REF__EdgeConfigItemValue__ }
7
| __REF__EdgeConfigItemValue__[]
8
)
9
| null;

EdgeConfigToken

1
/** The EdgeConfig. */
2
interface EdgeConfigToken {
3
token: string
4
label: string
5
/** This is not the token itself, but rather an id to identify the token by */
6
id: string
7
edgeConfigId: string
8
createdAt: number
9
}

FileTree

1
/** A deployment file tree entry */
2
interface FileTree {
3
/** The name of the file tree entry */
4
name: string
5
/** String indicating the type of file tree entry. */
6
type: "directory" | "file" | "symlink" | "lambda" | "middleware" | "invalid"
7
/** The unique identifier of the file (only valid for the `file` type) */
8
uid?: string
9
/** The list of children files of the directory (only valid for the `directory` type) */
10
children?: __REF__FileTree__[]
11
/** The content-type of the file (only valid for the `file` type) */
12
contentType?: string
13
/** The file "mode" indicating file type and permissions. */
14
mode: number
15
/** Not currently used. See `file-list-to-tree.ts`. */
16
symlink?: string
17
}

Pagination

1
/** This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data. */
2
interface Pagination {
3
/** Amount of items in the current page. */
4
count: number
5
/** Timestamp that must be used to request the next page. */
6
next: number | null
7
/** Timestamp that must be used to request the previous page. */
8
prev: number | null
9
}

Team

1
/** Data representing a Team. */
2
interface Team {
3
[key: string]: unknown
4
}

TeamLimited

1
/** A limited form of data representing a Team, due to the authentication token missing privileges to read the full Team data. */
2
interface TeamLimited {
3
/** Property indicating that this Team data contains only limited information, due to the authentication token missing privileges to read the full Team data. Re-login with the Team's configured SAML Single Sign-On provider in order to upgrade the authentication token with the necessary privileges. */
4
limited: boolean
5
/** When "Single Sign-On (SAML)" is configured, this object contains information that allows the client-side to identify whether or not this Team has SAML enforced. */
6
saml?: {
7
/** Information for the SAML Single Sign-On configuration. */
8
connection?: {
9
/** The Identity Provider "type", for example Okta. */
10
type: string
11
/** Current status of the connection. */
12
status: string
13
/** Current state of the connection. */
14
state: string
15
/** Timestamp (in milliseconds) of when the configuration was connected. */
16
connectedAt: number
17
/** Timestamp (in milliseconds) of when the last webhook event was received from WorkOS. */
18
lastReceivedWebhookEvent?: number
19
}
20
/** Information for the SAML Single Sign-On configuration. */
21
directory?: {
22
/** The Identity Provider "type", for example Okta. */
23
type: string
24
/** Current status of the connection. */
25
status: string
26
/** Current state of the connection. */
27
state: string
28
/** Timestamp (in milliseconds) of when the configuration was connected. */
29
connectedAt: number
30
/** Timestamp (in milliseconds) of when the last webhook event was received from WorkOS. */
31
lastReceivedWebhookEvent?: number
32
}
33
/** When `true`, interactions with the Team **must** be done with an authentication token that has been authenticated with the Team's SAML Single Sign-On provider. */
34
enforced: boolean
35
}
36
/** The Team's unique identifier. */
37
id: string
38
/** The Team's slug, which is unique across the Vercel platform. */
39
slug: string
40
/** Name associated with the Team account, or `null` if none has been provided. */
41
name: string | null
42
/** The ID of the file used as avatar for this Team. */
43
avatar: string | null
44
membership:
45
| {
46
confirmed: boolean
47
confirmedAt: number
48
accessRequestedAt?: number
49
role: "MEMBER" | "OWNER" | "VIEWER" | "DEVELOPER" | "BILLING"
50
teamId?: string
51
uid: string
52
createdAt: number
53
created: number
54
joinedFrom?: {
55
origin:
56
| "link"
57
| "import"
58
| "saml"
59
| "mail"
60
| "teams"
61
| "github"
62
| "gitlab"
63
| "bitbucket"
64
| "dsync"
65
| "feedback"
66
| "organization-teams"
67
commitId?: string
68
repoId?: string
69
repoPath?: string
70
gitUserId?: string | number
71
gitUserLogin?: string
72
ssoUserId?: string
73
ssoConnectedAt?: number
74
idpUserId?: string
75
dsyncUserId?: string
76
dsyncConnectedAt?: number
77
}
78
}
79
| {
80
confirmed: boolean
81
confirmedAt?: number
82
accessRequestedAt: number
83
role: "MEMBER" | "OWNER" | "VIEWER" | "DEVELOPER" | "BILLING"
84
teamId?: string
85
uid: string
86
createdAt: number
87
created: number
88
joinedFrom?: {
89
origin:
90
| "link"
91
| "import"
92
| "saml"
93
| "mail"
94
| "teams"
95
| "github"
96
| "gitlab"
97
| "bitbucket"
98
| "dsync"
99
| "feedback"
100
| "organization-teams"
101
commitId?: string
102
repoId?: string
103
repoPath?: string
104
gitUserId?: string | number
105
gitUserLogin?: string
106
ssoUserId?: string
107
ssoConnectedAt?: number
108
idpUserId?: string
109
dsyncUserId?: string
110
dsyncConnectedAt?: number
111
}
112
}
113
/** Will remain undocumented. Remove in v3 API. */
114
created: string
115
/** UNIX timestamp (in milliseconds) when the Team was created. */
116
createdAt: number
117
}

UserEvent

1
/** Array of events generated by the User. */
2
interface UserEvent {
3
/** The unique identifier of the Event. */
4
id: string
5
/** The human-readable text of the Event. */
6
text: string
7
/** A list of "entities" within the event `text`. Useful for enhancing the displayed text with additional styling and links. */
8
entities: {
9
/** The type of entity. */
10
type:
11
| "target"
12
| "bold"
13
| "link"
14
| "author"
15
| "bitbucket_login"
16
| "deployment_host"
17
| "dns_record"
18
| "git_link"
19
| "github_login"
20
| "gitlab_login"
21
| "hook_name"
22
| "integration"
23
| "edge-config"
24
| "project_name"
25
| "scaling_rules"
26
| "env_var_name"
27
| "system"
28
/** The index of where the entity begins within the `text` (inclusive). */
29
start: number
30
/** The index of where the entity ends within the `text` (non-inclusive). */
31
end: number
32
}[]
33
/** Timestamp (in milliseconds) of when the event was generated. */
34
createdAt: number
35
/** Metadata for the User who generated the event. */
36
user?: {
37
avatar: string
38
email: string
39
slug?: string
40
uid: string
41
username: string
42
}
43
/** The unique identifier of the User who generated the event. */
44
userId: string
45
}