Skip to content
Management API Reference

Deploy a function

post/v1/projects/{ref}/functions/deploy

A new endpoint to deploy functions. It will create if function does not exist.

OAuth scopes

  • edge_functions:write

The fine-grained token must include the following permissions to access this endpoint:

  • edge_functions_write

Path parameters

  • ref
    Required
    string

    Project ref

Query parameters

  • slug
    Optional
    string
  • bundleOnly
    Optional
    string

Body

  • file
    Required
    Array<string>
  • metadata
    Required
    object

Response codes

  • 201
  • 401
  • 402
  • 403
  • 429
  • 500

Response (201)

{
"id": "lorem",
"slug": "lorem",
"name": "lorem",
"status": "ACTIVE",
"version": -9007199254740991,
"created_at": -9007199254740991,
"updated_at": -9007199254740991,
"verify_jwt": true,
"import_map": true,
"entrypoint_path": "lorem",
"import_map_path": "lorem",
"ezbr_sha256": "lorem"
}