Skip to main content
GET
/
custom-functions
/
{id}
curl "https://api.magpipe.ai/functions/v1/custom-functions/789e0123-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "789e0123-e89b-12d3-a456-426614174000",
  "agent_id": "123e4567-e89b-12d3-a456-426614174000",
  "user_id": "456e7890-e89b-12d3-a456-426614174000",
  "name": "check_order_status",
  "description": "Look up customer order status by order ID",
  "http_method": "POST",
  "endpoint_url": "https://api.yourstore.com/orders/status",
  "headers": [
    {"name": "X-API-Key", "value": "your-key"}
  ],
  "body_schema": [
    {
      "name": "order_id",
      "type": "string",
      "description": "The customer order ID or confirmation number",
      "required": true
    }
  ],
  "response_variables": [
    {"name": "status", "json_path": "$.data.status"},
    {"name": "eta", "json_path": "$.data.estimated_delivery"}
  ],
  "timeout_ms": 120000,
  "max_retries": 2,
  "is_active": true,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}
Retrieve details of a specific custom function.

Path Parameters

id
string
required
UUID of the custom function

Response

id
string
UUID of the function
agent_id
string
UUID of the agent this function belongs to
user_id
string
UUID of the user who created this function
name
string
Function name (snake_case)
description
string
Function description used by AI to decide when to call
http_method
string
HTTP method (GET, POST, PUT, PATCH, DELETE)
endpoint_url
string
Webhook URL
headers
array
Custom headers included with requests
body_schema
array
Parameter definitions for the function
response_variables
array
Variables extracted from response
timeout_ms
integer
Request timeout in milliseconds
max_retries
integer
Number of retry attempts
is_active
boolean
Whether the function is active
created_at
string
ISO 8601 creation timestamp
updated_at
string
ISO 8601 last update timestamp
curl "https://api.magpipe.ai/functions/v1/custom-functions/789e0123-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "789e0123-e89b-12d3-a456-426614174000",
  "agent_id": "123e4567-e89b-12d3-a456-426614174000",
  "user_id": "456e7890-e89b-12d3-a456-426614174000",
  "name": "check_order_status",
  "description": "Look up customer order status by order ID",
  "http_method": "POST",
  "endpoint_url": "https://api.yourstore.com/orders/status",
  "headers": [
    {"name": "X-API-Key", "value": "your-key"}
  ],
  "body_schema": [
    {
      "name": "order_id",
      "type": "string",
      "description": "The customer order ID or confirmation number",
      "required": true
    }
  ],
  "response_variables": [
    {"name": "status", "json_path": "$.data.status"},
    {"name": "eta", "json_path": "$.data.estimated_delivery"}
  ],
  "timeout_ms": 120000,
  "max_retries": 2,
  "is_active": true,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}