curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/macros/{id}/render' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"context": {}
}'
{
"macro_name": "string",
"missing_slots": [
"string"
],
"ready_to_send": true,
"rendered": "string",
"tool_blocked_on": [
"string"
],
"tool_call": null
}
Render a macro against a context — the dry run before sending.
Required scope: write
POST
/
api
/
v1
/
macros
/
{id}
/
render
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/macros/{id}/render' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"context": {}
}'
{
"macro_name": "string",
"missing_slots": [
"string"
],
"ready_to_send": true,
"rendered": "string",
"tool_blocked_on": [
"string"
],
"tool_call": null
}
Required scope:
write
Path parameters
string
required
Macro id
Request body
RenderMacroRequest
object
Values for the macro’s merge fields.
Response
RenderMacroResponse
string
required
string[]
required
Slots with no value supplied. Non-empty means DO NOT SEND: a macro is only safe once every field it promises is filled.
boolean
required
string
required
string[]
required
Unresolvable tool arguments. A partially-bound refund is worse than no refund, so the call is withheld rather than sent incomplete.
object
Status codes
| Code | Meaning |
|---|---|
200 | Rendered text and any unfilled slots |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
404 | No such macro in this organization |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/macros/{id}/render' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"context": {}
}'
{
"macro_name": "string",
"missing_slots": [
"string"
],
"ready_to_send": true,
"rendered": "string",
"tool_blocked_on": [
"string"
],
"tool_call": null
}
Last modified on August 31, 2026