Reference
60 min read
Vercel REST API Interfaces
Shared interfaces referenced across multiple endpoints.Table of Contents
Choose a framework to optimize documentation to:
ACLAction
1/** Enum containing the actions that can be performed against a resource. Group operations are included. */2ACLAction: "create" | "delete" | "read" | "update" | "list"
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:16 | "saml"17 | "github"18 | "gitlab"19 | "bitbucket"20 | "email"21 | "manual"22 | "passkey"23 createdAt: number24 expiresAt?: number25 }26 | {27 type: "team"28 teamId: string29 origin:30 | "saml"31 | "github"32 | "gitlab"33 | "bitbucket"34 | "email"35 | "manual"36 | "passkey"37 createdAt: number38 expiresAt?: number39 }40 )[]41 /** Timestamp (in milliseconds) of when the token expires. */42 expiresAt?: number43 /** Timestamp (in milliseconds) of when the token was most recently used. */44 activeAt: number45 /** Timestamp (in milliseconds) of when the token was created. */46 createdAt: number47}
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 | "SUBSCRIPTION_CANCELED"10 | "SUBSCRIPTION_EXPIRED"11 | "UNPAID_INVOICE"12 | "ENTERPRISE_TRIAL_ENDED"13 | "FAIR_USE_LIMITS_EXCEEDED"14 | "BLOCKED_FOR_PLATFORM_ABUSE"15 blockedDueToOverageType?:16 | "blobStores"17 | "analyticsUsage"18 | "artifacts"19 | "bandwidth"20 | "dataCacheRead"21 | "dataCacheRevalidation"22 | "dataCacheWrite"23 | "edgeConfigRead"24 | "edgeConfigWrite"25 | "edgeFunctionExecutionUnits"26 | "edgeMiddlewareInvocations"27 | "monitoringMetric"28 | "postgresComputeTime"29 | "postgresDatabase"30 | "postgresDataStorage"31 | "postgresDataTransfer"32 | "postgresWrittenData"33 | "serverlessFunctionExecution"34 | "sourceImages"35 | "storageRedisTotalBandwidthInBytes"36 | "storageRedisTotalCommands"37 | "storageRedisTotalDailyAvgStorageInBytes"38 | "storageRedisTotalDatabases"39 | "webAnalyticsEvent"40 | "blobTotalSimpleRequests"41 | "blobTotalAdvancedRequests"42 | "blobTotalAvgSizeInBytes"43 | "blobTotalGetResponseObjectSizeInBytes"44 } | null45 /** An object containing billing infomation associated with the User account. */46 billing: {47 currency?: "usd" | "eur"48 cancelation?: number | null49 period: {50 start: number51 end: number52 } | null53 contract?: {54 start: number55 end: number56 } | null57 plan: "pro" | "enterprise" | "hobby"58 platform?: "stripe" | "stripeTestMode"59 orbCustomerId?: string60 syncedAt?: number61 programType?: "startup" | "agency"62 trial?: {63 start: number64 end: number65 } | null66 email?: string | null67 tax?: {68 type: string69 id: string70 } | null71 language?: string | null72 address?: {73 line1?: string74 line2?: string75 postalCode?: string76 city?: string77 country?: string78 state?: string79 } | null80 name?: string | null81 invoiceItems?: {82 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */83 concurrentBuilds?: {84 tier?: number85 price: number86 quantity: number87 highestQuantity?: 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 webAnalytics?: {100 tier?: number101 price: number102 quantity: number103 highestQuantity?: number104 name?: string105 hidden: boolean106 createdAt?: number107 disabledAt?: number | null108 frequency?: {109 interval: "month"110 intervalCount: 1 | 2 | 3 | 6 | 12111 }112 maxQuantity?: number113 }114 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */115 pro?: {116 tier?: number117 price: number118 quantity: number119 highestQuantity?: number120 name?: string121 hidden: boolean122 createdAt?: number123 disabledAt?: number | null124 frequency?: {125 interval: "month"126 intervalCount: 1 | 2 | 3 | 6 | 12127 }128 maxQuantity?: number129 }130 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */131 enterprise?: {132 tier?: number133 price: number134 quantity: number135 highestQuantity?: number136 name?: string137 hidden: boolean138 createdAt?: number139 disabledAt?: number | null140 frequency?: {141 interval: "month"142 intervalCount: 1 | 2 | 3 | 6 | 12143 }144 maxQuantity?: number145 }146 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */147 analytics?: {148 tier?: number149 price: number150 quantity: number151 highestQuantity?: number152 name?: string153 hidden: boolean154 createdAt?: number155 disabledAt?: number | null156 frequency?: {157 interval: "month"158 intervalCount: 1 | 2 | 3 | 6 | 12159 }160 maxQuantity?: number161 }162 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */163 monitoring?: {164 tier?: number165 price: number166 quantity: number167 highestQuantity?: number168 name?: string169 hidden: boolean170 createdAt?: number171 disabledAt?: number | null172 frequency?: {173 interval: "month"174 intervalCount: 1 | 2 | 3 | 6 | 12175 }176 maxQuantity?: number177 }178 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */179 passwordProtection?: {180 tier?: number181 price: number182 quantity: number183 highestQuantity?: number184 name?: string185 hidden: boolean186 createdAt?: number187 disabledAt?: number | null188 frequency?: {189 interval: "month"190 intervalCount: 1 | 2 | 3 | 6 | 12191 }192 maxQuantity?: number193 }194 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */195 previewDeploymentSuffix?: {196 tier?: number197 price: number198 quantity: number199 highestQuantity?: number200 name?: string201 hidden: boolean202 createdAt?: number203 disabledAt?: number | null204 frequency?: {205 interval: "month"206 intervalCount: 1 | 2 | 3 | 6 | 12207 }208 maxQuantity?: number209 }210 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */211 saml?: {212 tier?: number213 price: number214 quantity: number215 highestQuantity?: number216 name?: string217 hidden: boolean218 createdAt?: number219 disabledAt?: number | null220 frequency?: {221 interval: "month"222 intervalCount: 1 | 2 | 3 | 6 | 12223 }224 maxQuantity?: number225 }226 /** Will be used to create an invoice item. The price must be in cents: 2000 for $20. */227 teamSeats?: {228 tier?: number229 price: number230 quantity: number231 highestQuantity?: number232 name?: string233 hidden: boolean234 createdAt?: number235 disabledAt?: number | null236 frequency?: {237 interval: "month"238 intervalCount: 1 | 2 | 3 | 6 | 12239 }240 maxQuantity?: number241 }242 analyticsUsage?: {243 tier?: number244 price: number245 batch: number246 threshold: number247 name?: string248 hidden: boolean249 disabledAt?: number | null250 enabledAt?: number | null251 }252 artifacts?: {253 tier?: number254 price: number255 batch: number256 threshold: number257 name?: string258 hidden: boolean259 disabledAt?: number | null260 enabledAt?: number | null261 }262 bandwidth?: {263 tier?: number264 price: number265 batch: number266 threshold: number267 name?: string268 hidden: boolean269 disabledAt?: number | null270 enabledAt?: number | null271 }272 dataCacheRead?: {273 tier?: number274 price: number275 batch: number276 threshold: number277 name?: string278 hidden: boolean279 disabledAt?: number | null280 enabledAt?: number | null281 }282 dataCacheRevalidation?: {283 tier?: number284 price: number285 batch: number286 threshold: number287 name?: string288 hidden: boolean289 disabledAt?: number | null290 enabledAt?: number | null291 }292 dataCacheWrite?: {293 tier?: number294 price: number295 batch: number296 threshold: number297 name?: string298 hidden: boolean299 disabledAt?: number | null300 enabledAt?: number | null301 }302 edgeConfigRead?: {303 tier?: number304 price: number305 batch: number306 threshold: number307 name?: string308 hidden: boolean309 disabledAt?: number | null310 enabledAt?: number | null311 }312 edgeConfigWrite?: {313 tier?: number314 price: number315 batch: number316 threshold: number317 name?: string318 hidden: boolean319 disabledAt?: number | null320 enabledAt?: number | null321 }322 edgeFunctionExecutionUnits?: {323 tier?: number324 price: number325 batch: number326 threshold: number327 name?: string328 hidden: boolean329 disabledAt?: number | null330 enabledAt?: number | null331 }332 edgeMiddlewareInvocations?: {333 tier?: number334 price: number335 batch: number336 threshold: number337 name?: string338 hidden: boolean339 disabledAt?: number | null340 enabledAt?: number | null341 }342 monitoringMetric?: {343 tier?: number344 price: number345 batch: number346 threshold: number347 name?: string348 hidden: boolean349 disabledAt?: number | null350 enabledAt?: number | null351 }352 postgresComputeTime?: {353 tier?: number354 price: number355 batch: number356 threshold: number357 name?: string358 hidden: boolean359 disabledAt?: number | null360 enabledAt?: number | null361 }362 postgresDatabase?: {363 tier?: number364 price: number365 batch: number366 threshold: number367 name?: string368 hidden: boolean369 disabledAt?: number | null370 enabledAt?: number | null371 }372 postgresDataStorage?: {373 tier?: number374 price: number375 batch: number376 threshold: number377 name?: string378 hidden: boolean379 disabledAt?: number | null380 enabledAt?: number | null381 }382 postgresDataTransfer?: {383 tier?: number384 price: number385 batch: number386 threshold: number387 name?: string388 hidden: boolean389 disabledAt?: number | null390 enabledAt?: number | null391 }392 postgresWrittenData?: {393 tier?: number394 price: number395 batch: number396 threshold: number397 name?: string398 hidden: boolean399 disabledAt?: number | null400 enabledAt?: number | null401 }402 serverlessFunctionExecution?: {403 tier?: number404 price: number405 batch: number406 threshold: number407 name?: string408 hidden: boolean409 disabledAt?: number | null410 enabledAt?: number | null411 }412 sourceImages?: {413 tier?: number414 price: number415 batch: number416 threshold: number417 name?: string418 hidden: boolean419 disabledAt?: number | null420 enabledAt?: number | null421 }422 storageRedisTotalBandwidthInBytes?: {423 tier?: number424 price: number425 batch: number426 threshold: number427 name?: string428 hidden: boolean429 disabledAt?: number | null430 enabledAt?: number | null431 }432 storageRedisTotalCommands?: {433 tier?: number434 price: number435 batch: number436 threshold: number437 name?: string438 hidden: boolean439 disabledAt?: number | null440 enabledAt?: number | null441 }442 storageRedisTotalDailyAvgStorageInBytes?: {443 tier?: number444 price: number445 batch: number446 threshold: number447 name?: string448 hidden: boolean449 disabledAt?: number | null450 enabledAt?: number | null451 }452 storageRedisTotalDatabases?: {453 tier?: number454 price: number455 batch: number456 threshold: number457 name?: string458 hidden: boolean459 disabledAt?: number | null460 enabledAt?: number | null461 }462 webAnalyticsEvent?: {463 tier?: number464 price: number465 batch: number466 threshold: number467 name?: string468 hidden: boolean469 disabledAt?: number | null470 enabledAt?: number | null471 }472 } | null473 invoiceSettings?: {474 footer?: string475 }476 subscriptions?:477 | {478 id: string479 trial: {480 start: number481 end: number482 } | null483 period: {484 start: number485 end: number486 }487 frequency: {488 interval: "month" | "day" | "week" | "year"489 intervalCount: number490 }491 discount: {492 id: string493 coupon: {494 id: string495 name: string | null496 amountOff: number | null497 percentageOff: number | null498 durationInMonths: number | null499 duration: "forever" | "repeating" | "once"500 }501 } | null502 items: {503 id: string504 priceId: string505 productId: string506 amount: number507 quantity: number508 }[]509 }[]510 | null511 controls?: {512 analyticsSampleRateInPercent?: number | null513 analyticsSpendLimitInDollars?: number | null514 } | null515 purchaseOrder?: string | null516 status?: "active" | "trialing" | "overdue" | "expired" | "canceled"517 pricingExperiment?: "august-2022"518 orbMigrationScheduledAt?: number | null519 } | null520 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */521 resourceConfig: {522 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */523 nodeType?: string524 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */525 concurrentBuilds?: number526 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */527 awsAccountType?: string528 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */529 awsAccountIds?: string[]530 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */531 cfZoneName?: string532 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */533 edgeConfigs?: number534 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */535 edgeConfigSize?: number536 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */537 edgeFunctionMaxSizeBytes?: number538 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */539 edgeFunctionExecutionTimeoutMs?: number540 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */541 serverlessFunctionDefaultMaxExecutionTime?: number542 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */543 kvDatabases?: number544 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */545 postgresDatabases?: number546 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */547 blobStores?: number548 /** An object containing infomation related to the amount of platform resources may be allocated to the User account. */549 cronJobs?: number550 }551 /** Prefix that will be used in the URL of "Preview" deployments created by the User account. */552 stagingPrefix: string553 /** set of dashboard view preferences (cards or list) per scopeId */554 activeDashboardViews?: {555 scopeId: string556 viewPreference: "cards" | "list"557 }[]558 importFlowGitNamespace?: (string | number) | null559 importFlowGitNamespaceId?: (string | number) | null560 importFlowGitProvider?: "github" | "gitlab" | "bitbucket"561 preferredScopesAndGitNamespaces?: {562 scopeId: string563 gitNamespaceId: (string | number) | null564 }[]565 /** A record of when, under a certain scopeId, a toast was dismissed */566 dismissedToasts?: {567 name: string568 dismissals: {569 scopeId: string570 createdAt: number571 }[]572 }[]573 /** A list of projects and spaces across teams that a user has marked as a favorite. */574 favoriteProjectsAndSpaces?: (575 | {576 projectId: string577 scopeSlug: string578 scopeId: string579 }580 | {581 spaceId: string582 scopeSlug: string583 scopeId: string584 }585 )[]586 /** Whether the user has a trial available for a paid plan subscription. */587 hasTrialAvailable: boolean588 /** remote caching settings */589 remoteCaching?: {590 enabled?: boolean591 }592 /** data cache settings */593 dataCache?: {594 excessBillingEnabled?: boolean595 }596 /** Feature blocks for the user */597 featureBlocks?: {598 webAnalytics?: {599 blockedFrom?: number600 blockedUntil?: number601 isCurrentlyBlocked: boolean602 }603 }604 /** The User's unique identifier. */605 id: string606 /** Email address associated with the User account. */607 email: string608 /** Name associated with the User account, or `null` if none has been provided. */609 name: string | null610 /** Unique username associated with the User account. */611 username: string612 /** SHA1 hash of the avatar for the User account. Can be used in conjuction with the ... endpoint to retrieve the avatar image. */613 avatar: string | null614 /** The user's default team. Only applies if the user's `version` is `'northstar'`. */615 defaultTeamId: string | null616 /** The user's version. Will either be unset or `northstar`. */617 version: "northstar" | null618}
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 /** The user's default team. Only applies if the user's `version` is `'northstar'`. */16 defaultTeamId: string | null17 /** The user's version. Will either be unset or `northstar`. */18 version: "northstar" | null19}
EdgeConfigItem
1/** The EdgeConfig. */2interface EdgeConfigItem {3 key: string4 value: __REF__EdgeConfigItemValue__5 description?: string6 edgeConfigId: string7 createdAt: number8 updatedAt: number9}
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 | "OWNER"51 | "MEMBER"52 | "VIEWER"53 | "DEVELOPER"54 | "BILLING"55 | "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 | "OWNER"91 | "MEMBER"92 | "VIEWER"93 | "DEVELOPER"94 | "BILLING"95 | "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 | "author"12 | "bitbucket_login"13 | "bold"14 | "deployment_host"15 | "dns_record"16 | "git_link"17 | "github_login"18 | "gitlab_login"19 | "hook_name"20 | "integration"21 | "edge-config"22 | "link"23 | "project_name"24 | "scaling_rules"25 | "env_var_name"26 | "target"27 | "store"28 | "system"29 /** The index of where the entity begins within the `text` (inclusive). */30 start: number31 /** The index of where the entity ends within the `text` (non-inclusive). */32 end: number33 }[]34 /** Timestamp (in milliseconds) of when the event was generated. */35 createdAt: number36 /** Metadata for the User who generated the event. */37 user?: {38 avatar: string39 email: string40 slug?: string41 uid: string42 username: string43 }44 /** The unique identifier of the User who generated the event. */45 userId: string46}
Last updated on December 3, 2023
Was this helpful?