SmartApp callback contract

Design a stable JSON endpoint for dynamic parameters and the SmartApp builder.

The callback is the endpoint ThriveDesk fetches to obtain agent-facing data. The configuration UI constructs the request from the endpoint, optional headers, and dynamic parameters selected with the { picker.

Response contract

Return a 2xx response containing JSON with stable property names and types. The builder discovers those properties during Fetch endpoint and check connection and maps them into text or repeaters.

{
  "id": "customer_123",
  "name": "Jane Cooper",
  "plan": "Pro",
  "orders": [
    {
      "id": "INV-1042",
      "total": 49.00,
      "status": "paid"
    }
  ]
}

Prefer a small purpose-built response over forwarding an internal API unchanged. Keep field types stable, return empty arrays instead of null for repeaters, and omit secrets or data the current agent should not see.

Unspecified limits

The public SmartApp documentation does not define an HTTP method, timeout, maximum payload size, cache policy, or error-envelope schema. Validate those behaviors with the connection tester and keep the endpoint fast and side-effect free.

Errors

Return conventional 401/403 for authorization failures, 404 when the dynamic customer record does not exist, 429 with Retry-After when throttled, and 5xx only for retryable server errors.