Building for a studio
Work with a studio that uses Shyni's admin, or create one for a client.
A studio is a business with a Shyni admin of its own. If you build for a detailing or service studio, you reach it in one of two ways: the studio already uses Shyni and its owner gives you access, or you create the studio for your client through the API.
A studio that already uses Shyni
The owner of the studio sets up everything you need in the admin and hands it to you:
- Studio key: Moje studio → API creates a key. The owner gives it to you.
- Domains: the websites allowed to use publishable keys are under Moje studio → API → Domény webu.
- Webhooks: endpoints are under Moje studio → API → Webhooks. See Webhooks.
Instead of handing over a key, the owner can invite you with the Vývojář (Developer) role:
- The owner opens Moje studio → Tým → Pozvat vývojáře. Below the MAX subscription the Tým screen has a separate "Vývojáři" block for this. On MAX the owner picks the role "Vývojář" in the member window.
- You sign in to the studio's admin from the invitation. If you belong to more than one organization, the sign-in page asks which organization you come for ("Za kterou organizaci přicházíš?"). The first attribution recorded wins.
- Under Moje studio → API you manage the studio's keys and webhooks.
A Vývojář does not see orders, customers, the subscription or payments, and is never in the schedule. Studio keys still need the Pro subscription, whoever creates them.
A studio key behaves differently from an organization key:
- It needs the studio to be on the Pro subscription. Below it, calls are refused
with
403 PLAN_REQUIRED. - It is bound to that one studio. Never send
Shyni-Business; the header is refused with400 BUSINESS_HEADER_NOT_ALLOWED.
Everything else works as in Server integration. The full rules for keys are in API keys.
Creating a studio for a client
If the studio does not exist yet, create it from your organization.
You can do it without the API in the portal. Open
dashboard.shyni.io → Client studios → "Create a
studio for a client", then invite the owner by e-mail and name. This replaces
steps 1 and 3 below. Only an owner or admin of the organization can create and
invite, and only with live mode turned on; a developer of the organization
sees the list but cannot change it. To set the studio up you still use a key
with the Shyni-Business header (step 2).
The API steps:
POST /studioswith a live organization key that has thebusinesses:managescope. A test key is refused with409 CONFLICT.- Set the studio up with the same key and the header
Shyni-Business: <studio id>. Until the hand-over it stands on your organization's plan, so every studio endpoint works. - Invite the owner with
POST /studios/{id}/owner-invite. Shyni e-mails the client a sign-in link, valid 7 days, that names your organization. - The owner accepts the terms at first sign-in and takes over the studio.
export SHYNI_KEY="shyni_sk_live_..."
curl -X POST https://api.shyni.io/api/v1/studios \
-H "Authorization: Bearer $SHYNI_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"name": "Detailing Novak"}'name is required. timezone defaults to Europe/Prague and currency to
CZK; the currency is fixed once the studio has orders. Take the studio id
from the response and invite the owner:
curl -X POST https://api.shyni.io/api/v1/studios/$STUDIO_ID/owner-invite \
-H "Authorization: Bearer $SHYNI_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"email": "owner@example.com", "name": "Jan Novak"}'Calling the invite again replaces the previous one, and its link stops working.
After the hand-over it is 409 CONFLICT.
After the hand-over
The studio is the client's. From then on the studio's own subscription applies,
and API access to it needs the Pro subscription. Your organization keeps access
to the studio. GET /studios and GET /studios/{id} show each studio with the
state of its hand-over.
A studio you created for a client does not count as active on your organization's bill, because it pays for its own plan. See Pricing.