Creating an UbiFunction
Step-by-step guide to creating a UbiFunction
ubidots functions new --name my-function --runtime python3.11:base
ubidots functions start --methods POSTUsing the Web UI









Last updated
Was this helpful?
Step-by-step guide to creating a UbiFunction
You can create and develop UbiFunctions in two ways:
Web UI — Create and edit functions directly in your Ubidots account.
CLI — Create, test, and deploy functions locally with full runtime replication. Local development unlocks your preferred IDE and AI-powered tools like Claude Code.
ubidots functions new --name my-function --runtime python3.11:base
ubidots functions start --methods POSTSee the full CLI reference for UbiFunctions for local development workflows, including push, pull, and live testing.
In your Ubidots account, go to Devices and select Functions.

Click the + icon to create your first UbiFunction.

Give your function a name.
Your function name becomes part of its URL. If you rename the function later, the URL stays the same.

Enter the name in the corresponding field:

Scroll down to the Runtime section and select the runtime you need.

Scroll down to the HTTP Method section and select the HTTP method this function will allow.

Configure any additional options:
Token: Select a token from your account to use in your function code.
Environment variables: Select one or more variables from your account's Global Properties to use in the function code.
Max. execution time: Set the maximum time your function can take to execute.
Time-based trigger: Create a cron UbiFunction based on a time interval or a crontab expression.
Raw function: Pass HTTP headers and URL paths to the function. Use content types other than application/json. Return custom response codes from the function.
CORS Policy: Enable calls to this function from browser URLs other than parse.ubidots.com.

Scroll to the bottom of the page and click SAVE to save these settings.


Last updated
Was this helpful?
Was this helpful?