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
}

Documentation Index

Fetch the complete documentation index at: https://docs.kapso.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

Path Parameters

function_id
string<uuid>
required

Function identifier

Body

application/json

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. wrapped functions return successful JSON under data. passthrough functions may also return other 2xx status codes and non-JSON content types depending on the function response.

Successful invoke output for functions using invoke_response_mode=passthrough. Kapso forwards the upstream response body directly and preserves the upstream success status code and Content-Type.