Agent: Setup¶
What is set up, what is next, and whether this org can sell¶
GET /api/v1/agent/setup/
Requires org_settings: view. Call this after whoami and again after each step. steps is the setup journey in order; every unfinished step carries a next_action: kind: call is something you can do with this key, kind: human_url is a page only a person can use (hand them the URL). selling.allowed is false for an alpha place, which publishes free courses only; ready_to_sell is true once selling is allowed and payouts are connected.
Authentication: API key — Authorization: Bearer <key>
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/setup/`, {
method: "GET",
headers: { Authorization: `Bearer ${process.env.YOSHUKO_API_KEY}` }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(response.status === 204 ? response.status : await response.json());
| Status | Meaning |
|---|---|
200 |
No response body |
401 |
Missing, unknown, revoked or expired key; or the organisation's plan is inactive (subscription_inactive) or unverified (org_unverified). |
403 |
The key's scope for this resource does not allow the action. |
429 |
Rate limited (300 requests/hour per key). Retry after the Retry-After header. |