Skip to main content
By the end of this page you will have created a ResponseCX agent through the API, launched it, and read back what it is ready to do. Everything here runs against https://response.stateset.com/api/v1, and every request is one curl away — no dashboard clicking required after you have a key.
StateSet has more than one API, on more than one host. Agents, rules, knowledge and conversations — everything on this page — are the ResponseCX API at response.stateset.com. Orders, inventory, manufacturing and finance are the iCommerce API, documented under its own tab. See Which API am I calling? if you are unsure which one a task needs.

Step 1 — Get an API key

1

Create an account

Sign up at stateset.com/sign-up and verify your email.
2

Create a key

In ResponseCX, open Settings → API keys and create one with the agents:read and agents:write scopes. Keys start with rcx_. Copy it now; it is shown once.
3

Put it in your environment

Step 2 — Make your first call

This is the smallest request that proves your key works. It lists the agents in your workspace, which is an empty list on a new account.
Response
A 401 means the key is missing, wrong, or expired — check that RESPONSECX_API_KEY is exported in the shell you are actually running in. A 403 means the key is valid but was created without the agents:read scope; every endpoint’s page names the scope it needs.

Step 3 — Create an agent

An agent is a named configuration: what it is for and how it should behave. name and type are the only required fields; instructions is what most shapes the replies. type is one of assistant, customer_service or sales.
Response
Keep that id — the next step needs it.
The Idempotency-Key header is why you can safely re-run that command. A retry with the same key returns the agent you already created rather than making a second one. Change the key when you mean a new agent.

Step 4 — Launch it

A new agent is created inactive so you can attach rules and knowledge before it answers anyone. Launching is a one-field update:
Then ask the workspace what it looks like now and what it suggests you do next:
workspace is the orientation call. It reports the agents that exist, how configured each one is, and a suggested next action — which for a brand-new agent will be to give it something to answer from.

What you built

Your agent answers from its instructions alone right now. It does not yet know your products or your policies — that comes from attaching knowledge and functions, below. Once it is handling real traffic, GET /conversations shows what customers asked and how it answered.

Next steps

Give it your knowledge

Add FAQs, policies and product documentation so answers come from your content rather than from the model’s priors. Connected to Shopify? POST /integrations/shopify/import-knowledge pulls it in.

Let it take actions

Give the agent an API-call tool so it can look up an order or start a return instead of describing how to. POST /functions/{id}/test proves the tool works before a customer finds out it doesn’t.

Constrain it with rules

Rules decide when the agent must escalate, refuse, or hand off to a human.

Close the loop

When a reply was wrong, record what it should have been. Evals become regression cases you can replay after every change.

Onboard the whole brand

One flow provisions the brand across six services — knowledge base, rules, workflows, verified decisions and voice — at onboarding.stateset.com.

Troubleshooting

The Authorization header is missing or the key is wrong or expired. Confirm with echo $RESPONSECX_API_KEY in the same shell that runs the request — a key exported in another terminal is not visible here.
Scopes are per-endpoint. Creating an agent needs agents:write; reading conversations needs responses:read. Each reference page names its scope under Access. Create a new key with the scope rather than widening an old one.
type must be exactly assistant, customer_service or sales, and name cannot be empty. The response body names the field.
Creating agents is limited to 30 requests per minute; reads allow 120. Wait for the window to reset — and if you were retrying a create, use the same Idempotency-Key so the retry does not make a duplicate.
An agent with no knowledge attached has only its instructions to work from. Add knowledge documents and read a conversation back to compare.
Last modified on August 31, 2026