Core Railway management APIs - Create and manage services, actions, and system parameters
Create a new V2 service programmatically without needing to upload a template
📋 What This Does:
Upload a V2 service template (JSON file) to create or update a service with all its actions
📋 What This Does:
Content-Type: multipart/form-data
Form Field: template (file)
curl -X POST "${baseUrl}/api/v2/admin/services/upload" \\
-F "template=@service-template.json"
{
"success": true,
"message": "Service template uploaded successfully",
"service": {
"serviceKey": "monday",
"serviceName": "Monday.com",
"actionCount": 7
},
"actions": [
{
"actionName": "create-item",
"status": "created"
}
]
}
💡 Tip: The template file must be valid JSON and follow the V2 service template structure. See the template validator for details.
Get all V2 services with their metadata, action counts, and status
📋 What This Does:
No request body required
curl -X GET "${baseUrl}/api/v2/admin/services"
{
"success": true,
"services": [
{
"key": "monday",
"name": "Monday.com",
"description": "Monday.com integration",
"action_count": 7,
"enabled": true,
"created_at": "2025-10-15T10:00:00Z"
},
{
"key": "aws-s3",
"name": "AWS S3",
"description": "AWS S3 file storage",
"action_count": 4,
"enabled": true,
"created_at": "2025-10-20T14:30:00Z"
}
]
}
Get all actions for a specific service
📋 What This Does:
URL Parameter: serviceKey (required)
curl -X GET "${baseUrl}/api/v2/admin/services/monday/actions"
Example: Replace monday with your service key
{
"success": true,
"actions": [
{
"name": "create-item",
"displayName": "Create Monday Item",
"description": "Creates a new item in Monday.com",
"method": "POST",
"enabled": true,
"version": "1.0.0"
},
{
"name": "get-item",
"displayName": "Get Monday Item",
"description": "Retrieves an item from Monday.com",
"method": "GET",
"enabled": true,
"version": "1.0.0"
}
]
}
Delete a service and all related data (actions, logs, tests). This action cannot be undone
⚠️ Warning: This is a destructive operation!
URL Parameter: serviceKey (required)
No request body required
curl -X DELETE "${baseUrl}/api/v2/admin/services/monday"
{
"success": true,
"message": "Service deleted successfully",
"deleted": {
"serviceKey": "monday",
"serviceName": "Monday.com",
"actionsDeleted": 7,
"executionLogsDeleted": 1250,
"deletedAt": "2025-12-29T16:00:00Z"
}
}
Create a V2 action from a JavaScript or Python function
📋 What This Does:
action_definitions table🔄 Action Types:
Create a simplified action with direct function execution - no flow generation
📋 What This Does:
execution_type: 'direct' in metadata🔄 vs. Create Action (/create):
Required Fields:
serviceKey - Service must already existactionName - Unique action namedisplayName - Human-readable namedescription - Action descriptionfunctionCode - JavaScript/Python function code (as string)language - "javascript" or "python"httpMethod - GET, POST, PUT, DELETE, PATCHsystemParameters - Array of parameter keys (e.g., ["MONDAY_API_KEY"])Optional Fields:
payloadSchema - JSON schema for validationresponseSchema - JSON schema for responseversion - Action version (default: "1.0.0")creator - Creator identifier{
"serviceKey": "rm_playground_database",
"actionName": "create-lead",
"displayName": "Create Lead",
"description": "Creates a new lead in the database",
"functionCode": "async function executeAction(payload, context) {\n const client = await context.db.connect();\n try {\n // Your function code here\n const result = await client.query('INSERT INTO leads...');\n return { success: true, data: result.rows[0] };\n } finally {\n client.release();\n }\n}",
"language": "javascript",
"httpMethod": "POST",
"systemParameters": ["DATABASE_URL", "MONDAY_API_KEY"],
"payloadSchema": {
"type": "object",
"properties": {
"name": { "type": "string" },
"email": { "type": "string" }
},
"required": ["name", "email"]
},
"version": "1.0.0"
}
{
"success": true,
"service": {
"key": "rm_playground_database",
"name": "RM Playground Database"
},
"action": {
"name": "create-lead",
"displayName": "Create Lead",
"url": "https://refreshing-amazement-production.up.railway.app/api/v2/execute/rm_playground_database/create-lead",
"type": "direct",
"version": "1.0.0"
},
"method": "POST",
"execution": {
"type": "direct",
"systemParameters": ["DATABASE_URL", "MONDAY_API_KEY"],
"functionCodeLength": 245
},
"message": "Simplified action created and ready to use (direct function execution)",
"testCommand": "curl -X POST https://refreshing-amazement-production.up.railway.app/api/v2/execute/rm_playground_database/create-lead -H \"Content-Type: application/json\" -d '{\"test\": true}'"
}
metadata.function_code/api/v2/execute/{serviceKey}/{actionName}execution_type: 'direct' in metadatacontext.systemParamscontext.db provides PostgreSQL connection pool
💡 Important: The function must be named executeAction(payload, context). The context object provides db (database pool), systemParams (system parameters), and logger.
Update, delete, enable, disable, or archive an existing action
📋 What This Does:
✨ Features:
Note: For update operation, all fields except operation are optional. Only provided fields will be updated.
Create a new system parameter (API keys, secrets, configuration values)
📋 What This Does:
get_system_params step{
"serviceKey": "monday",
"paramKey": "MONDAY_API_KEY",
"paramValue": "your-api-key-here",
"displayName": "Monday.com API Key",
"description": "API key for Monday.com authentication",
"isRequired": true,
"category": "authentication",
"isEncrypted": false
}
{
"success": true,
"message": "System parameter created successfully",
"data": {
"id": 123,
"serviceKey": "monday",
"paramKey": "MONDAY_API_KEY",
"displayName": "Monday.com API Key",
"isRequired": true,
"category": "authentication",
"created_at": "2025-12-29T16:00:00Z"
}
}
💡 Tip: Use the System Parameters UI page for easier management. This endpoint is for programmatic access.
Get all system parameters with optional filtering by service key
📋 What This Does:
Query Parameters (optional):
service_key - Filter by service (e.g., ?service_key=monday)curl -X GET "${baseUrl}/api/admin/system-parameters?service_key=monday"
{
"success": true,
"data": [
{
"id": 123,
"serviceKey": "monday",
"paramKey": "MONDAY_API_KEY",
"displayName": "Monday.com API Key",
"description": "API key for Monday.com",
"isRequired": true,
"category": "authentication",
"isEncrypted": false
}
]
}
Update an existing system parameter value or metadata
📋 What This Does:
URL Parameter: paramKey (required)
All fields in body are optional:
{
"paramValue": "new-api-key-value",
"displayName": "Updated Display Name",
"description": "Updated description",
"category": "authentication"
}
{
"success": true,
"message": "System parameter updated successfully",
"data": {
"id": 123,
"paramKey": "MONDAY_API_KEY",
"paramValue": "new-api-key-value",
"updated_at": "2025-12-29T16:00:00Z"
}
}
Get all connector templates from all services that have connector configurations
📋 What This Does:
No request body or parameters required
curl -X GET "${baseUrl}/api/v2/admin/connectors"
{
"success": true,
"connectors": [
{
"serviceKey": "storm-tracker",
"connector": {
"id": "storm-tracker-connector",
"microservice": "storm-tracker",
"version": "1.0.0",
"pages": [
{
"page_id": "storms-list",
"title": "Active Storms",
"route": "/storms",
"layout": "list_view",
"widgets": [...]
}
],
"api_endpoints": [
{
"id": "list-storms",
"path": "/api/storms",
"method": "GET",
"v2_mapping": {
"service_key": "storm-tracker",
"action_name": "list-storms"
}
}
]
}
}
]
}
💡 Tip: Connector templates are stored in service_definitions.metadata.connector (JSONB). Only services with connector config will appear in the response.
Use Claude AI to generate a V2 service template from code files, cURL commands, or descriptions
📋 What This Does:
Request Body Options:
codeFiles - Array of code file contentscurlCommands - Array of cURL command stringsdescription - Natural language description{
"description": "Create a service for managing user profiles with CRUD operations",
"codeFiles": [
{
"filename": "user-service.js",
"content": "async function createUser(userData) { ... }"
}
],
"curlCommands": [
"curl -X POST https://api.example.com/users -H 'Content-Type: application/json' -d '{\"name\": \"John\"}'"
]
}
{
"success": true,
"message": "Service template generated successfully",
"template": {
"service": {
"key": "user-service",
"name": "User Service",
"description": "User profile management service",
"version": "1.0.0"
},
"actions": [
{
"name": "create-user",
"displayName": "Create User",
"api_flow": [...]
}
]
},
"usage": {
"uploadEndpoint": "/api/v2/admin/services/upload",
"instructions": "Upload the generated template to create the service"
}
}
💡 Tip: Provide as much context as possible (code, examples, descriptions) for better AI-generated templates. Review and test the generated template before deploying.