v1

latestOpenAPI 3.0.02026-07-14169146300.3 KB
Edge Functions

Create a function

This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.

post/v1/projects/{ref}/functions

Path parameters

refstring required
Example:abcdefghijklmnopqrst

Project ref

Query parameters

slugstring
Example:hello-world
namestring
Example:Hello World
verify_jwtboolean
Example:true

Boolean string, true or false

import_mapboolean

Boolean string, true or false

entrypoint_pathstring
Example:index.ts
import_map_pathstring
Example:import_map.json
ezbr_sha256string
Example:44c691990518d25498f0fd80cf6631ecf2b58eb9c5eb2a087dd1688f2904dac7

Request body

slugstring required
namestring required
bodystring required
verify_jwtboolean

Example request

{
  "slug": "hello-world",
  "name": "Hello World",
  "body": "Deno.serve(() => new Response('Hello, world!'))",
  "verify_jwt": true
}

Response

idstring required
slugstring required
namestring required
status'ACTIVE' | 'REMOVED' | 'THROTTLED' required
versioninteger required
created_atinteger required
updated_atinteger required
verify_jwtboolean
import_mapboolean
entrypoint_pathstring
import_map_pathstring
ezbr_sha256string