Skip to content
post

Create function

Endpoint

posthttps://<REGION>.cloud.appwrite.io/v1/functions

Description

Required scopes

functions.write

Authentication

Initialize the Appwrite client with setProject() and a server API key (setKey()). For direct REST calls, send X-Appwrite-Project and X-Appwrite-Key.

Parameters

string
Required
string
Required
enum
Required
array
array
string
integer
boolean
boolean
string
string
array
string
string
string
boolean
string
string
string
string
string
string
Status
Content type
201
application/json

Function

Name
Type
Description
string
string
string
arrayof string
string
boolean
boolean
boolean
string
string
arrayof string
arrayof Variable

Object type

arrayof string
string
integer
string
string
string
string
string
string
string
boolean
string
HTTP
POST /v1/functions HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
X-Appwrite-Key: <YOUR_API_KEY>
{
"functionId": "<FUNCTION_ID>",
"name": "<NAME>",
"runtime": "node-14.5",
"execute": ["any"],
"events": [],
"schedule": ,
"timeout": 1,
"enabled": false,
"logging": false,
"entrypoint": "<ENTRYPOINT>",
"commands": "<COMMANDS>",
"scopes": [],
"installationId": "<INSTALLATION_ID>",
"providerRepositoryId": "<PROVIDER_REPOSITORY_ID>",
"providerBranch": "<PROVIDER_BRANCH>",
"providerSilentMode": false,
"providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>",
"templateRepository": "<TEMPLATE_REPOSITORY>",
"templateOwner": "<TEMPLATE_OWNER>",
"templateRootDirectory": "<TEMPLATE_ROOT_DIRECTORY>",
"templateVersion": "<TEMPLATE_VERSION>",
"specification":
}