Skip to content

Actions API

API endpoints for managing and executing actions.

List Actions

Get a list of available actions.

http
GET /action/list

Query Parameters:

ParameterTypeDescription
visibilitystringpublic, private, all
statusstringactive, development, deprecated
categorystringFilter by category
runtimestringpython, nodejs
nameContainsstringSearch 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/create

Required Fields:

FieldTypeDescription
actionNamestringDisplay name
descriptionstringWhat it does
runtimestringpython3.12
sourceCodestringPython code
categorystringClassification

Optional Fields:

FieldTypeDefault
actionIdstringauto-generated
visibilitystringprivate
statusstringdevelopment
memoryMbnumber128
timeoutSecnumber30
tagsarray[]
parametersarray[]
keysNeededarray[]

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/update

Required:

  • 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/delete

Example:

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-code

Body:

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}.

Universal API - The agentic entry point to the universe of APIs