/home?settings=http_tools), then Add API action.How do I add an API action?
Open APIs


Open Agent Settings, then APIs
Click Add API action


Choose Set it up manually
Fill in Details
Order status. Under it SmartAlex shows the Function name it derives, such as order_status. In When to use write what the action looks up and when the agent should run it, for example “Look up an order by its number. Use it when the caller asks where their order is. Returns the status and the delivery date.” Leave Lookup only off unless the action only reads data.

Fill in Details
Fill in Connection
https://. For a custom request, pick GET or POST in front of it. Then add the key under API key. You see the key row change to match the format.

Fill in Connection
Add the key
${vault.token} in the body, a header or the query so the request carries it (the Request section below shows where). Used in then lists where it appears. For the standard format, choose Sent as, such as Bearer token (most common), and paste the key. A key you saved before for the same site appears as a choice, so you do not paste it twice.Describe the inputs
order_number, pick its type and write what the agent should put there. Repeat for each input. Fill from an example writes inputs from a sample, and Edit as JSON shows them as a schema.

Describe the inputs
Write the request (custom request)
${arg.order_number}. Click Format to tidy the JSON. Preview shows exactly what will be sent, with the key hidden. For a GET, put the values in the query of the $request entry. See Request and response.

Write the request
Choose Access


Choose Access
Click Add and test
Save the signing secret (standard format only)
shs_. Click the copy button, store it in your secrets store, then click I’ve saved it. See Signature verification.Send a test
+27215550123. Click Send test. You see the request, your endpoint’s reply, the status and the time.Switch it on
What does each setting do?
Details
Connection
Inputs
Request
Access
The action’s own controls
What are keys?
The Keys tab of APIs lists every key by name with its site and status, so one key can serve several actions. Click Add key and choose Key (a value you paste, sent as it is) or Sign-in (a username and password SmartAlex uses to get a token and renew it). Use Test sign-in to check a sign-in key. A key that an action uses cannot be deleted until you pick another key on that action.Check it worked
Place a test call to the agent and ask something the action answers. Open the action and click Requests. You see a row with the result OK, the status, the time and the inputs the agent sent. Click it to see the request and the reply. A failed row says why; see Error codes.Questions people ask
Why is my new action switched off?
Why is my new action switched off?
I lost the signing secret. What now?
I lost the signing secret. What now?
Can one action serve several agents?
Can one action serve several agents?
How do I stop an action without deleting it?
How do I stop an action without deleting it?

