GET
/
api
/
functions
/
{slug}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "slug": "hello-world",
  "name": "Hello World Function",
  "description": "Returns a greeting message",
  "code": "export default async function(request) {\n  const { name = 'World' } = await request.json();\n  return new Response(\n    JSON.stringify({ message: `Hello, ${name}!` }),\n    { headers: { 'Content-Type': 'application/json' } }\n  );\n}\n",
  "status": "active",
  "created_at": "2024-01-21T10:30:00Z",
  "updated_at": "2024-01-21T10:35:00Z",
  "deployed_at": "2024-01-21T10:35:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

slug
string
required

Function slug identifier

Response

Function details with code

id
string<uuid>
required

Unique identifier for the function

slug
string
required

URL-friendly identifier

Example:

"hello-world"

name
string
required

Display name for the function

Example:

"Hello World Function"

status
enum<string>
required

Current status of the function

Available options:
draft,
active,
error
created_at
string<date-time>
required

When the function was created

updated_at
string<date-time>
required

When the function was last updated

code
string
required

The function's JavaScript/TypeScript code

description
string | null

Description of what the function does

deployed_at
string<date-time> | null

When the function was last deployed (null if never deployed)