API · Agents
Agents
Everything the dashboard does, as a JSON API for agents and scripts, with a bearer token instead of a browser session.
The agent API does everything a person can do in the dashboard: apply for access, create an account, sign in, and then manage organizations, audiences, flags and tests and read their results. The endpoints live under /api/agent/*, take JSON and return JSON. Errors are problem details with a stable code and a hint.
Every endpoint is in the OpenAPI spec, which is the full reference. These pages walk through them:
Organizations
Roles, API tokens, allowed origins, members, usage
Audiences
Targeting rules for tests and flags
Flags
Feature flags and their options
Tests
A/B and multi-variant tests
Results
Test results, events and visitor analytics
Getting started
- Sign in, or create an account, for a bearer token.
- List your organizations to get an
organizationId. Without one, create one with a plan, or apply for access for the organization key that creates it without a checkout. - Work in an environment of it:
develop,stagingorproduction.
The account and organization endpoints are served by www.obelism.studio for every Obelism product, since one account, one token and one set of organizations work everywhere: creating an account, verifying, signing in and out, resetting the password, the profile, invites, applying for access, and creating, deleting and staffing organizations. Improve answers those paths with a 308 redirect there, so a client that follows redirects can keep calling Improve's host. Listing your organizations, reading one, and everything about tests, flags, audiences and results stay on improve.obelism.studio.
Apply for access
Joins the waitlist, the same as the form on the homepage. The applicant gets a confirmation email, and an organization key by email once the application is approved; the key creates an Organization without a plan checkout.
curl -X POST https://www.obelism.studio/api/agent/apply \
-H "Content-Type: application/json" \
-d '{"email":"jane@example.com","name":"Jane","company":"Acme"}'{ "status": "pending" }Create an account
curl -X POST https://www.obelism.studio/api/agent/auth/sign-up \
-H "Content-Type: application/json" \
-d '{"email":"jane@example.com","password":"a-long-Passw0rd!","firstName":"Jane","lastName":"Doe"}'{
"token": "Zm9vYmFyYmF6cXV4cXV1eGNvcmdlZ3JhdWx0",
"tokenType": "Bearer",
"expiresAt": "2026-11-07T12:00:00.000Z",
"userId": "user_01H8XYZ",
"verificationRequired": true
}The password needs at least 8 characters, including a number and a special character. A six-digit code is emailed to the address.
Verify the email
Send the code from the email with the token from sign-up or sign-in:
curl -X POST https://www.obelism.studio/api/agent/auth/verify-email \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"code":"123456"}'Codes are valid for 4 hours. Signing in with an unverified account emails a new one and returns verificationRequired: true.
Sign in
curl -X POST https://www.obelism.studio/api/agent/auth/sign-in \
-H "Content-Type: application/json" \
-d '{"email":"jane@example.com","password":"a-long-Passw0rd!"}'The response has the same shape as sign-up. The response is the same 401 invalid_credentials whether the email is unknown or the password is wrong.
With two-factor authentication on (turned on under Security on your Obelism account), the answer is 401 two_factor_required: send the same request with code, the current 6-digit code from the authenticator app. The recovery code works there too, and turns two-factor authentication off.
Forgot your password
Request a reset email:
curl -X POST https://www.obelism.studio/api/agent/auth/forgot-password \
-H "Content-Type: application/json" \
-d '{"email":"jane@example.com"}'The answer is 202 whether or not the email has an account. The email links to /reset-password?token=…. That token is valid for 1 hour, and a newer request replaces it. Set the new password with it:
curl -X POST https://www.obelism.studio/api/agent/auth/reset-password \
-H "Content-Type: application/json" \
-d '{"token":"…","newPassword":"an-even-longer-Passw0rd!"}'This ends every session of the account and returns a new token, like sign-in. With two-factor authentication on, send code as well, as for sign-in: the reset email alone doesn't change the password.
Use the token
Send the token on every request that needs an account:
curl https://improve.obelism.studio/api/agent/me \
-H "Authorization: Bearer $TOKEN"A token is valid for 30 days and is extended while it is in use. GET /api/agent/me returns the account and the current expiry, so it doubles as a check that a stored token still works. A 401 unauthorized means the token is missing, invalid or expired: sign in again.
The token is a full login session for the account. Store it like a password and never put it in client-side code.
Update your profile
PATCH /api/agent/me on www.obelism.studio changes the name. Fields you leave out keep their value. The email address can't be changed, since invites to organizations are matched by it.
curl -X PATCH https://www.obelism.studio/api/agent/me \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"firstName":"Jane","lastName":"Doe"}'Change your password
curl -X POST https://www.obelism.studio/api/agent/me/password \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"currentPassword":"a-long-Passw0rd!","newPassword":"an-even-longer-Passw0rd!"}'This ends every session of the account, including the token you sent. The response has a new token to continue with, in the same shape as sign-in.
Sign out
curl -X POST https://www.obelism.studio/api/agent/auth/sign-out \
-H "Authorization: Bearer $TOKEN"The token stops working straight away.
Rate limits
| Endpoint | Limit |
|---|---|
apply | 3 per email per hour |
sign-up | 3 per email per hour |
sign-in | 5 per email per minute |
forgot-password | 3 per email per hour |
reset-password | 5 per reset token per 5 min |
verify-email | 5 per account per 15 min |
Every response from these endpoints states its limit in a RateLimit-Policy header, such as "sign-in";q=5;w=60. Over the limit the response is 429 rate_limited with RateLimit and a Retry-After header in seconds. See Versioning.