Arguments: Validate server-side ·
Result: Explicit success ·
Website: Separate number grant
The important part
- Describe exact arguments and validate them in your service.
- Public website access requires all enabled number functions to be safe for visitors.
- A timeout can follow a successful business write; reconcile before repeating it.
Prerequisites
KeepNIXFLEX_API_KEY private on the server. Raw HTTP base URL: https://api.nixflex.com/v1. Node and Python SDK base URL: https://api.nixflex.com. The SDK adds /v1. Use owned identifiers; SDK and CLI examples need the documented minimum versions. Prepare a public HTTPS endpoint you control and the webhook signing secret for request verification.
1. Read functions on the number
2. Define a narrow function
Use the documented POST route with a clear name, description, argument schema, URL and method. Store secrets only in protected configuration. A number can have up to 15 functions. Avoid exposing broad administrative actions to a conversation.3. Verify and validate the request
A non-GET request carriesname, args and variables. Current engine requests can carry the signed-body header described in webhook verification. Reject unsigned or invalid requests. GET arguments travel in the query while its signature covers an empty body; do not treat that signature as proof of argument integrity.
4. Return a concise result
Return a clear 2xx JSON result only after your action reaches the stated state. Aresult member supplies the agent’s result text; otherwise JSON is serialised, or plain text is truncated to 2,000 characters. Do not report an appointment or payment as complete while it is only queued.
5. Handle timing and public access
Timeout is bounded to 1–45 seconds, default 5. Requests require public HTTPS, bounded bodies and no redirects; the response limit is 64 KiB. The call is checked before sending, but a timeout cannot undo an action already performed. Website use needs the number’s separate switch and all enabled functions must be safe for public visitors.Example response
Example service response:{"result":"The requested appointment change is pending review."}. The runtime reports success for a 2xx response; that HTTP success must accurately describe your business state.