POST/api/agents/end-userno auth

Sign a visitor in to an agent

Lets an agent have its own users without those people needing a Storkie account. Passwords are hashed with scrypt; the session is an opaque token scoped to one agent and useless against any other.

Try it

curl -X POST "https://storkie.ai/api/agents/end-user" \
  -H "Content-Type: application/json" \
  -d '{"agentId":"YOUR_AGENT_ID","mode":"signin","email":"a@b.com","password":"…"}'

No Run button: every call bills the agent’s owner, and a button on a public page would let anyone spend a stranger’s credits.

Request body

NameTypeDescription
agentIdrequiredstringWhich agent the account belongs to.
moderequiredstring`signup` or `signin`.
emailrequiredstringThe visitor’s email.
passwordrequiredstringTheir password.

Response

NameTypeDescription
tokenrequiredstringA session token scoped to this agent.
userrequiredobject`{ uid, email }`.

Worth knowing

  • The token is not a JWT and is not shaped like one — the separator is `~` rather than `.` precisely so nothing mistakes it for one and tries to decode it.
  • A token minted for one agent is rejected by every other. Verification requires the expected agent ID, so a leaked token cannot be replayed sideways.

Rate limit

20 / 5 min / IP, and 10 / 15 min / account

Errors

  • 400Missing fields, or a password that fails the strength check.
  • 401Wrong email or password.
  • 409That email already has an account with this agent.
  • 429Too many attempts — the per-account limit is the anti-stuffing one.

Questions

Do these people get a Storkie account?

No. They exist only against your agent. That is the point.

Can I offer Google or WhatsApp sign-in?

Yes, once you supply your own provider credentials. Email and password is what works with no setup.

Other endpoints

No key needed to start

Create an agent and this endpoint works against it immediately.

Create an agent free

Agents

More

🏪
Find Providers
👤
Profile
FAQ