cURL
curl --request PUT \ --url https://api.example.com/api/functions/{slug} \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "code": "<string>", "description": "<string>", "status": "draft" } '
{ "success": true, "function": { "id": "123e4567-e89b-12d3-a456-426614174000", "slug": "hello-world", "name": "Hello World Function v2", "description": "Returns a greeting message", "status": "active", "updated_at": "2024-01-21T11:00:00Z" } }
Update an existing function’s code or metadata
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Function slug identifier
New display name
Updated function code
Updated description
Function status
draft
active
error
Function updated successfully
Show child attributes