Skip to main content
POST
/
functions
/
{function_id}
/
invoke
curl --request POST \
--url https://api.kapso.ai/platform/v1/functions/{function_id}/invoke \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"weight": 5.5,
"distance": 120,
"service": "express"
}'
{
  "cost": 24.75,
  "currency": "USD",
  "estimated_days": 2
}

Authorizations

X-API-Key
string
header
required

Path Parameters

function_id
string<uuid>
required

Function identifier

Body

application/json · object

Payload to send to the function. Structure is completely flexible - send any valid JSON that your function expects. The payload will be forwarded to your function as the request body.

Response

Function executed successfully

Function execution result. The response structure mirrors whatever your function returns. This is the raw output from your function code.