Last updated on June 6, 2023
58 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. */2ACLAction: "create" | "delete" | "read" | "update" | "list" | "count"
AuthToken
1/** Authentication token metadata. */2interface AuthToken {3 /** The unique identifier of the token. */4 id: string5 /** The human-readable name of the token. */6 name: string7 /** The type of the token. */8 type: string9 /** The origin of how the token was created. */10 origin?: string11 /** The access scopes granted to the token. */12 scopes?: (13 | {14 type: "user"15 origin: "saml" | "github" | "gitlab" | "bitbucket" | "email" | "manual"16 createdAt: number17 expiresAt?: number18 }19 | {20 type: "team"21 teamId: string22 origin: "saml" | "github" | "gitlab" | "bitbucket" | "email" | "manual"23 createdAt: number24 expiresAt?: number25 }26 )[]27 /** Timestamp (in milliseconds) of when the token expires. */28 expiresAt?: number29 /** Timestamp (in milliseconds) of when the token was most recently used. */30 activeAt: number31 /** Timestamp (in milliseconds) of when the token was created. */32 createdAt: number33}
AuthUser
1/** Data for the currently authenticated User. */2interface AuthUser {3 /** UNIX timestamp (in milliseconds) when the User account was created. */4 createdAt: number5 /** 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: number8 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 } | null16 /** An object containing billing infomation associated with the User account. */17 billing: {18 currency?: "usd" | "eur"19 cancelation?: number | null20 period: {21 start: number22 end: number23 } | null24 contract?: {25 start: number26 end: number27 } | null28 plan: "hobby" | "enterprise" | "pro"29 platform?: "stripe" | "stripeTestMode"30 orbCustomerId?: string31 programType?: "startup" | "agency"32 trial?: {33 start: number34 end: number35 } | null36 email?: string | null37 tax?: {38 type: string39 id: string40 } | null41 language?: string | null42 address?: {43 line1: string44 line2?: string45 postalCode?: string46 city?: string47 country?: string48 state?: string49 } | null50 name?: string | null51 overdue?: boolean | null52 invoiceItems?: {53 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */54 pro?: {55 tier?: number56 price: number57 quantity: number58 name?: string59 hidden: boolean60 createdAt?: number61 disabledAt?: number | null62 frequency?: {63 interval: "month"64 intervalCount: 1 | 2 | 3 | 6 | 1265 }66 maxQuantity?: number67 }68 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */69 enterprise?: {70 tier?: number71 price: number72 quantity: number73 name?: string74 hidden: boolean75 createdAt?: number76 disabledAt?: number | null77 frequency?: {78 interval: "month"79 intervalCount: 1 | 2 | 3 | 6 | 1280 }81 maxQuantity?: number82 }83 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */84 concurrentBuilds?: {85 tier?: number86 price: number87 quantity: number88 name?: string89 hidden: boolean90 createdAt?: number91 disabledAt?: number | null92 frequency?: {93 interval: "month"94 intervalCount: 1 | 2 | 3 | 6 | 1295 }96 maxQuantity?: number97 }98 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */99 saml?: {100 tier?: number101 price: number102 quantity: number103 name?: string104 hidden: boolean105 createdAt?: number106 disabledAt?: number | null107 frequency?: {108 interval: "month"109 intervalCount: 1 | 2 | 3 | 6 | 12110 }111 maxQuantity?: number112 }113 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */114 teamSeats?: {115 tier?: number116 price: number117 quantity: number118 name?: string119 hidden: boolean120 createdAt?: number121 disabledAt?: number | null122 frequency?: {123 interval: "month"124 intervalCount: 1 | 2 | 3 | 6 | 12125 }126 maxQuantity?: number127 }128 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */129 customCerts?: {130 tier?: number131 price: number132 quantity: number133 name?: string134 hidden: boolean135 createdAt?: number136 disabledAt?: number | null137 frequency?: {138 interval: "month"139 intervalCount: 1 | 2 | 3 | 6 | 12140 }141 maxQuantity?: number142 }143 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */144 previewDeploymentSuffix?: {145 tier?: number146 price: number147 quantity: number148 name?: string149 hidden: boolean150 createdAt?: number151 disabledAt?: number | null152 frequency?: {153 interval: "month"154 intervalCount: 1 | 2 | 3 | 6 | 12155 }156 maxQuantity?: number157 }158 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */159 passwordProtection?: {160 tier?: number161 price: number162 quantity: number163 name?: string164 hidden: boolean165 createdAt?: number166 disabledAt?: number | null167 frequency?: {168 interval: "month"169 intervalCount: 1 | 2 | 3 | 6 | 12170 }171 maxQuantity?: number172 }173 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */174 ssoProtection?: {175 tier?: number176 price: number177 quantity: number178 name?: string179 hidden: boolean180 createdAt?: number181 disabledAt?: number | null182 frequency?: {183 interval: "month"184 intervalCount: 1 | 2 | 3 | 6 | 12185 }186 maxQuantity?: number187 }188 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */189 analytics?: {190 tier?: number191 price: number192 quantity: number193 name?: string194 hidden: boolean195 createdAt?: number196 disabledAt?: number | null197 frequency?: {198 interval: "month"199 intervalCount: 1 | 2 | 3 | 6 | 12200 }201 maxQuantity?: number202 }203 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */204 monitoring?: {205 tier?: number206 price: number207 quantity: number208 name?: string209 hidden: boolean210 createdAt?: number211 disabledAt?: number | null212 frequency?: {213 interval: "month"214 intervalCount: 1 | 2 | 3 | 6 | 12215 }216 maxQuantity?: number217 }218 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */219 webAnalytics?: {220 tier?: number221 price: number222 quantity: number223 name?: string224 hidden: boolean225 createdAt?: number226 disabledAt?: number | null227 frequency?: {228 interval: "month"229 intervalCount: 1 | 2 | 3 | 6 | 12230 }231 maxQuantity?: number232 }233 analyticsUsage?: {234 tier?: number235 price: number236 batch: number237 threshold: number238 name?: string239 hidden: boolean240 disabledAt?: number | null241 }242 artifacts?: {243 tier?: number244 price: number245 batch: number246 threshold: number247 name?: string248 hidden: boolean249 disabledAt?: number | null250 }251 bandwidth?: {252 tier?: number253 price: number254 batch: number255 threshold: number256 name?: string257 hidden: boolean258 disabledAt?: number | null259 }260 builds?: {261 tier?: number262 price: number263 batch: number264 threshold: number265 name?: string266 hidden: boolean267 disabledAt?: number | null268 }269 edgeMiddlewareInvocations?: {270 tier?: number271 price: number272 batch: number273 threshold: number274 name?: string275 hidden: boolean276 disabledAt?: number | null277 }278 edgeFunctionExecutionUnits?: {279 tier?: number280 price: number281 batch: number282 threshold: number283 name?: string284 hidden: boolean285 disabledAt?: number | null286 }287 monitoringMetric?: {288 tier?: number289 price: number290 batch: number291 threshold: number292 name?: string293 hidden: boolean294 disabledAt?: number | null295 }296 serverlessFunctionExecution?: {297 tier?: number298 price: number299 batch: number300 threshold: number301 name?: string302 hidden: boolean303 disabledAt?: number | null304 }305 sourceImages?: {306 tier?: number307 price: number308 batch: number309 threshold: number310 name?: string311 hidden: boolean312 disabledAt?: number | null313 }314 webAnalyticsEvent?: {315 tier?: number316 price: number317 batch: number318 threshold: number319 name?: string320 hidden: boolean321 disabledAt?: number | null322 }323 edgeConfigRead?: {324 tier?: number325 price: number326 batch: number327 threshold: number328 name?: string329 hidden: boolean330 disabledAt?: number | null331 }332 edgeConfigWrite?: {333 tier?: number334 price: number335 batch: number336 threshold: number337 name?: string338 hidden: boolean339 disabledAt?: number | null340 }341 cronJobInvocation?: {342 tier?: number343 price: number344 batch: number345 threshold: number346 name?: string347 hidden: boolean348 disabledAt?: number | null349 }350 postgresComputeTime?: {351 tier?: number352 price: number353 batch: number354 threshold: number355 name?: string356 hidden: boolean357 disabledAt?: number | null358 }359 postgresDataStorage?: {360 tier?: number361 price: number362 batch: number363 threshold: number364 name?: string365 hidden: boolean366 disabledAt?: number | null367 }368 postgresDataTransfer?: {369 tier?: number370 price: number371 batch: number372 threshold: number373 name?: string374 hidden: boolean375 disabledAt?: number | null376 }377 postgresWrittenData?: {378 tier?: number379 price: number380 batch: number381 threshold: number382 name?: string383 hidden: boolean384 disabledAt?: number | null385 }386 storageRedisTotalCommands?: {387 tier?: number388 price: number389 batch: number390 threshold: number391 name?: string392 hidden: boolean393 disabledAt?: number | null394 }395 storageRedisTotalBandwidthInBytes?: {396 tier?: number397 price: number398 batch: number399 threshold: number400 name?: string401 hidden: boolean402 disabledAt?: number | null403 }404 storageRedisTotalDailyAvgStorageInBytes?: {405 tier?: number406 price: number407 batch: number408 threshold: number409 name?: string410 hidden: boolean411 disabledAt?: number | null412 }413 storageRedisTotalDatabases?: {414 tier?: number415 price: number416 batch: number417 threshold: number418 name?: string419 hidden: boolean420 disabledAt?: number | null421 }422 dataCacheRead?: {423 tier?: number424 price: number425 batch: number426 threshold: number427 name?: string428 hidden: boolean429 disabledAt?: number | null430 }431 dataCacheRevalidation?: {432 tier?: number433 price: number434 batch: number435 threshold: number436 name?: string437 hidden: boolean438 disabledAt?: number | null439 }440 dataCacheWrite?: {441 tier?: number442 price: number443 batch: number444 threshold: number445 name?: string446 hidden: boolean447 disabledAt?: number | null448 }449 } | null450 invoiceSettings?: {451 footer?: string452 }453 subscriptions?:454 | {455 id: string456 trial: {457 start: number458 end: number459 } | null460 period: {461 start: number462 end: number463 }464 frequency: {465 interval: "month" | "day" | "week" | "year"466 intervalCount: number467 }468 discount: {469 id: string470 coupon: {471 id: string472 name: string | null473 amountOff: number | null474 percentageOff: number | null475 durationInMonths: number | null476 duration: "forever" | "repeating" | "once"477 }478 } | null479 items: {480 id: string481 priceId: string482 productId: string483 amount: number484 quantity: number485 }[]486 }[]487 | null488 controls?: {489 analyticsSampleRateInPercent?: number | null490 analyticsSpendLimitInDollars?: number | null491 } | null492 purchaseOrder?: string | null493 status?: "active" | "trialing" | "overdue" | "expired" | "canceled"494 pricingExperiment?: "august-2022"495 } | null496 /** 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?: string500 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */501 concurrentBuilds?: number502 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */503 awsAccountType?: string504 /** 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?: string508 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */509 edgeConfigs?: number510 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */511 edgeConfigSize?: number512 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */513 edgeFunctionMaxSizeBytes?: number514 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */515 edgeFunctionExecutionTimeoutMs?: number516 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */517 kvDatabases?: number518 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */519 postgresDatabases?: number520 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */521 blobStores?: number522 }523 /** Prefix that will be used in the URL of "Preview" deployments created by the User account. */524 stagingPrefix: string525 /** set of dashboard view preferences (cards or list) per scopeId */526 activeDashboardViews?: {527 scopeId: string528 viewPreference: "cards" | "list"529 }[]530 importFlowGitNamespace?: (string | number) | null531 importFlowGitNamespaceId?: (string | number) | null532 importFlowGitProvider?: "github" | "gitlab" | "bitbucket"533 preferredScopesAndGitNamespaces?: {534 scopeId: string535 gitNamespaceId: (string | number) | null536 }[]537 /** A record of when, under a certain scopeId, a toast was dismissed */538 dismissedToasts?: {539 name: string540 dismissals: {541 scopeId: string542 createdAt: number543 }[]544 }[]545 /** A list of projects and spaces across teams that a user has marked as a favorite. */546 favoriteProjectsAndSpaces?: (547 | {548 projectId: string549 scopeSlug: string550 scopeId: string551 }552 | {553 spaceId: string554 scopeSlug: string555 scopeId: string556 }557 )[]558 /** Whether the user has a trial available for a paid plan subscription. */559 hasTrialAvailable: boolean560 /** remote caching settings */561 remoteCaching?: {562 enabled?: boolean563 }564 /** data cache settings */565 dataCache?: {566 excessBillingEnabled?: boolean567 }568 /** Feature blocks for the user */569 featureBlocks?: {570 webAnalytics?: {571 blockedFrom?: number572 blockedUntil?: number573 isCurrentlyBlocked: boolean574 }575 }576 /** The User's unique identifier. */577 id: string578 /** Email address associated with the User account. */579 email: string580 /** Name associated with the User account, or `null` if none has been provided. */581 name: string | null582 /** Unique username associated with the User account. */583 username: string584 /** SHA1 hash of the avatar for the User account. Can be used in conjuction with the ... endpoint to retrieve the avatar image. */585 avatar: string | null586}
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. */2interface 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: boolean5 /** The User's unique identifier. */6 id: string7 /** Email address associated with the User account. */8 email: string9 /** Name associated with the User account, or `null` if none has been provided. */10 name: string | null11 /** Unique username associated with the User account. */12 username: string13 /** 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 | null15}
EdgeConfigItem
1/** The EdgeConfig. */2interface EdgeConfigItem {3 key: string4 value: __REF__EdgeConfigItemValue__5 edgeConfigId: string6 createdAt: number7 updatedAt: number8}
EdgeConfigItemValue
1EdgeConfigItemValue:2 | (3 | string4 | number5 | boolean6 | { [key: string]: __REF__EdgeConfigItemValue__ }7 | __REF__EdgeConfigItemValue__[]8 )9 | null;
EdgeConfigToken
1/** The EdgeConfig. */2interface EdgeConfigToken {3 token: string4 label: string5 /** This is not the token itself, but rather an id to identify the token by */6 id: string7 edgeConfigId: string8 createdAt: number9}
FileTree
1/** A deployment file tree entry */2interface FileTree {3 /** The name of the file tree entry */4 name: string5 /** 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?: string9 /** 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?: string13 /** The file "mode" indicating file type and permissions. */14 mode: number15 /** Not currently used. See `file-list-to-tree.ts`. */16 symlink?: string17}
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. */2interface Pagination {3 /** Amount of items in the current page. */4 count: number5 /** Timestamp that must be used to request the next page. */6 next: number | null7 /** Timestamp that must be used to request the previous page. */8 prev: number | null9}
Team
1/** Data representing a Team. */2interface Team {3 [key: string]: unknown4}
TeamLimited
1/** A limited form of data representing a Team, due to the authentication token missing privileges to read the full Team data. */2interface 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: boolean5 /** 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: string11 /** Current status of the connection. */12 status: string13 /** Current state of the connection. */14 state: string15 /** Timestamp (in milliseconds) of when the configuration was connected. */16 connectedAt: number17 /** Timestamp (in milliseconds) of when the last webhook event was received from WorkOS. */18 lastReceivedWebhookEvent?: number19 }20 /** Information for the SAML Single Sign-On configuration. */21 directory?: {22 /** The Identity Provider "type", for example Okta. */23 type: string24 /** Current status of the connection. */25 status: string26 /** Current state of the connection. */27 state: string28 /** Timestamp (in milliseconds) of when the configuration was connected. */29 connectedAt: number30 /** Timestamp (in milliseconds) of when the last webhook event was received from WorkOS. */31 lastReceivedWebhookEvent?: number32 }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: boolean35 }36 /** The Team's unique identifier. */37 id: string38 /** The Team's slug, which is unique across the Vercel platform. */39 slug: string40 /** Name associated with the Team account, or `null` if none has been provided. */41 name: string | null42 /** The ID of the file used as avatar for this Team. */43 avatar: string | null44 membership:45 | {46 confirmed: boolean47 confirmedAt: number48 accessRequestedAt?: number49 role:50 | "MEMBER"51 | "OWNER"52 | "VIEWER"53 | "DEVELOPER"54 | "BILLING"55 | "PROJECT_CONTRIBUTOR"56 teamId?: string57 uid: string58 createdAt: number59 created: number60 joinedFrom?: {61 origin:62 | "link"63 | "saml"64 | "mail"65 | "import"66 | "teams"67 | "github"68 | "gitlab"69 | "bitbucket"70 | "dsync"71 | "feedback"72 | "organization-teams"73 commitId?: string74 repoId?: string75 repoPath?: string76 gitUserId?: string | number77 gitUserLogin?: string78 ssoUserId?: string79 ssoConnectedAt?: number80 idpUserId?: string81 dsyncUserId?: string82 dsyncConnectedAt?: number83 }84 }85 | {86 confirmed: boolean87 confirmedAt?: number88 accessRequestedAt: number89 role:90 | "MEMBER"91 | "OWNER"92 | "VIEWER"93 | "DEVELOPER"94 | "BILLING"95 | "PROJECT_CONTRIBUTOR"96 teamId?: string97 uid: string98 createdAt: number99 created: number100 joinedFrom?: {101 origin:102 | "link"103 | "saml"104 | "mail"105 | "import"106 | "teams"107 | "github"108 | "gitlab"109 | "bitbucket"110 | "dsync"111 | "feedback"112 | "organization-teams"113 commitId?: string114 repoId?: string115 repoPath?: string116 gitUserId?: string | number117 gitUserLogin?: string118 ssoUserId?: string119 ssoConnectedAt?: number120 idpUserId?: string121 dsyncUserId?: string122 dsyncConnectedAt?: number123 }124 }125 /** Will remain undocumented. Remove in v3 API. */126 created: string127 /** UNIX timestamp (in milliseconds) when the Team was created. */128 createdAt: number129}
UserEvent
1/** Array of events generated by the User. */2interface UserEvent {3 /** The unique identifier of the Event. */4 id: string5 /** The human-readable text of the Event. */6 text: string7 /** 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: number30 /** The index of where the entity ends within the `text` (non-inclusive). */31 end: number32 }[]33 /** Timestamp (in milliseconds) of when the event was generated. */34 createdAt: number35 /** Metadata for the User who generated the event. */36 user?: {37 avatar: string38 email: string39 slug?: string40 uid: string41 username: string42 }43 /** The unique identifier of the User who generated the event. */44 userId: string45}