Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

App API key (format: sk_live_app_* or sk_test_app_*) for app-level operations

Path Parameters

slug
string
required

Function slug identifier

Minimum string length: 1
Example:

"my-function"

Body

application/json
entryPointUrl
string
required

URL of the entry point of the application. This is the file that will be executed when the deployment is invoked.

Example:

"main.ts"

assets
object
required

A map whose key represents a file path, and the value is an asset that composes the deployment.

Example:
importMapUrl
string<uri> | null

URL of the import map file. If null, auto-discovery will be performed. If empty string, no import map will be used.

Example:

"import_map.json"

lockFileUrl
string<uri> | null

URL of the lock file. If null, auto-discovery will be performed. If empty string, no lock file will be used.

Example:

"deno.lock"

Response

Create a new deployment for the function

id
string
required

Deployment ID (not UUID v4)

Example:

"abcde12vwxyz"

projectId
string<uuid>
required

Project UUID

Example:

"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"

description
string | null
required

The description of this deployment

Example:

"My deployment"

status
enum<string>
required

The status of the deployment

Available options:
failed,
pending,
success
Example:

"pending"

createdAt
string<date-time>
required

When the deployment was created

Example:

"2021-08-01T00:00:00Z"

updatedAt
string<date-time>
required

When the deployment was last updated

Example:

"2021-08-01T00:00:00Z"