Appearance
Actions API
API endpoints for managing and executing actions.
List Actions
Get a list of available actions.
http
GET /action/listQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
visibility | string | public, private, all |
status | string | active, development, deprecated |
category | string | Filter by category |
runtime | string | python, nodejs |
nameContains | string | Search by name |
Example:
bash
curl "https://api.universalapi.co/action/list?visibility=public" \
-H "X-Uni-UserId: $USER_ID" \
-H "X-Uni-SecretUniversalKey: $SECRET_KEY"Response:
json
{
"success": true,
"data": {
"actions": [
{
"actionId": "act-458dfb350d314769",
"actionName": "Hello World",
"description": "Simple greeting action",
"runtime": "python3.12",
"category": "Utilities",
"visibility": "public",
"status": "active",
"parameters": [],
"keysNeeded": [],
"oneClickUrl": "https://api.universalapi.co/action/act-458dfb350d314769"
}
],
"count": 12
}
}Get Action Info
Get detailed information about a specific action.
http
GET /action/info/{actionId}Example:
bash
curl "https://api.universalapi.co/action/info/act-458dfb350d314769" \
-H "X-Uni-UserId: $USER_ID" \
-H "X-Uni-SecretUniversalKey: $SECRET_KEY"Response:
json
{
"success": true,
"data": {
"actionId": "act-458dfb350d314769",
"actionName": "Hello World",
"description": "Simple greeting action",
"sourceCode": "def handler(event, context):...",
"runtime": "python3.12",
"category": "Utilities",
"visibility": "public",
"status": "active",
"memoryMb": 128,
"timeoutSec": 30,
"parameters": [
{"name": "name", "type": "string", "required": false}
],
"keysNeeded": []
}
}Execute Action
Execute an action with parameters.
http
GET /action/{actionId}
POST /action/{actionId}GET with Query Parameters:
bash
curl "https://api.universalapi.co/action/act-458dfb350d314769?name=Developer" \
-H "X-Uni-UserId: $USER_ID" \
-H "X-Uni-SecretUniversalKey: $SECRET_KEY"POST with Body:
bash
curl -X POST "https://api.universalapi.co/action/act-458dfb350d314769" \
-H "Content-Type: application/json" \
-H "X-Uni-UserId: $USER_ID" \
-H "X-Uni-SecretUniversalKey: $SECRET_KEY" \
-d '{"name": "Developer"}'Response:
json
{
"success": true,
"data": {
"statusCode": 200,
"body": {"message": "Hello, Developer!"}
},
"meta": {
"requestId": "abc-123",
"executionTime": 245,
"memoryMb": 128,
"creditsUsed": 1
}
}Create Action
Create a new action.
http
POST /action/createRequired Fields:
| Field | Type | Description |
|---|---|---|
actionName | string | Display name |
description | string | What it does |
runtime | string | python3.12 |
sourceCode | string | Python code |
category | string | Classification |
Optional Fields:
| Field | Type | Default |
|---|---|---|
actionId | string | auto-generated |
visibility | string | private |
status | string | development |
memoryMb | number | 128 |
timeoutSec | number | 30 |
tags | array | [] |
parameters | array | [] |
keysNeeded | array | [] |
Example:
bash
curl -X POST "https://api.universalapi.co/action/create" \
-H "Content-Type: application/json" \
-H "X-Uni-UserId: $USER_ID" \
-H "X-Uni-SecretUniversalKey: $SECRET_KEY" \
-d '{
"actionName": "My Action",
"description": "Does something useful",
"runtime": "python3.12",
"category": "Utilities",
"sourceCode": "def handler(event, context):\n return {\"statusCode\": 200, \"body\": {\"result\": \"success\"}}"
}'Response:
json
{
"success": true,
"data": {
"actionId": "act-new123",
"message": "Action created successfully"
}
}Update Action
Update an existing action.
http
PUT /action/updateRequired:
actionId- ID of action to update
All other fields are optional.
Example:
bash
curl -X PUT "https://api.universalapi.co/action/update" \
-H "Content-Type: application/json" \
-H "X-Uni-UserId: $USER_ID" \
-H "X-Uni-SecretUniversalKey: $SECRET_KEY" \
-d '{
"actionId": "act-abc123",
"description": "Updated description",
"status": "active"
}'Delete Action
Delete an action.
http
DELETE /action/deleteExample:
bash
curl -X DELETE "https://api.universalapi.co/action/delete" \
-H "Content-Type: application/json" \
-H "X-Uni-UserId: $USER_ID" \
-H "X-Uni-SecretUniversalKey: $SECRET_KEY" \
-d '{"actionId": "act-abc123"}'Inline Code Execution
Execute Python code without creating an action.
http
POST /action/python-128mb/inline-codeBody:
json
{
"code": "def handler(event, context):\n return {'result': event.get('value', 0) * 2}",
"event": {"value": 21},
"timeout": 30,
"memory": 128
}Example:
bash
curl -X POST "https://api.universalapi.co/action/python-128mb/inline-code" \
-H "Content-Type: application/json" \
-H "X-Uni-UserId: $USER_ID" \
-H "X-Uni-SecretUniversalKey: $SECRET_KEY" \
-d '{
"code": "def handler(event, context):\n return {\"result\": 42}",
"event": {}
}'Direct Runtime Endpoint
Call the Python runtime directly (bypasses router):
http
GET/POST /action/python-128mb/{actionId}Same parameters and response as /action/{actionId}.