Create a functiondeprecated
post
/v1/projects/{ref}/functionsThis endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.
OAuth scopes
- edge_functions:write
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_write
Path parameters
- refRequiredstring
Project ref
Query parameters
- slugOptionalstring
- nameOptionalstring
- verify_jwtOptionalstring
- import_mapOptionalstring
- entrypoint_pathOptionalstring
- import_map_pathOptionalstring
- ezbr_sha256Optionalstring
Body
- slugRequiredstring
- nameRequiredstring
- bodyRequiredstring
- verify_jwtOptionalboolean
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"}{ "type": "object", "properties": { "id": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string", "enum": [ "ACTIVE", "REMOVED", "THROTTLED" ] }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "created_at": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "format": "int64" }, "updated_at": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "format": "int64" }, "verify_jwt": { "type": "boolean" }, "import_map": { "type": "boolean" }, "entrypoint_path": { "type": "string" }, "import_map_path": { "type": "string" }, "ezbr_sha256": { "type": "string" } }, "required": [ "id", "slug", "name", "status", "version", "created_at", "updated_at" ]}