Account

Who am I

GET
/api/v1/me

Whoami: prove the key works and see usage. Requires only a valid secret key (no scope check; a publishable key gets 403 INSUFFICIENT_SCOPE), the one SP1 endpoint that exists purely to let an integrator confirm Authorization is wired correctly before touching any resource endpoint.

An organization key answers for the organization (OrgMeView) when it sends no Shyni-Business header, and for the selected business (ApiMeView) when it does.

Authorization

ApiKeyAuth
headerAuthorizationBearer <shyni_sk_live_*>

An API key, issued once and never retrievable again: an organization key in the developer portal, or a studio key in the studio's admin (Moje studio → API). Send as Authorization: Bearer shyni_sk_live_....

Header Parameters

Shyni-Business?string

Organization keys only: the id of the business the request acts on (GET /businesses lists them). Required on every business-level endpoint, absent on the org-level ones (/businesses, and /me for the organization itself). Without it a business-level endpoint answers 400 BUSINESS_REQUIRED; a studio key that sends it gets 400 BUSINESS_HEADER_NOT_ALLOWED; an unknown, foreign, archived or wrong-mode business is 404 BUSINESS_NOT_FOUND.

Response Body

The calling key's tenant, scopes, and current usage; for an organization key without the header, the organization's.

application/json
  1. response
tenantId*string
keyName*string

The label the studio gave this key at creation.

scopes*array<>
mode*string

Mode of the studio that issued the key (live or test).

Value in"live""test"
monthlyQuota*integer
usedThisMonth*integer
Formatint64
remaining*integer
Formatint64
industry*"AUTO"

The studio's industry, which tells which vertical's vocabulary applies. More values will be added; clients must tolerate unknown values.

Value in"AUTO"
Example Request
curl -X GET 'https://api.shyni.io/api/v1/me' \  -H 'Authorization: Bearer shyni_sk_test_YOUR_KEY'

Response 200

The calling key's tenant, scopes, and current usage; for an organization key without the header, the organization's.

{  "tenantId": "string",  "keyName": "string",  "scopes": [    "catalog:read"  ],  "mode": "live",  "monthlyQuota": 0,  "usedThisMonth": 0,  "remaining": 0,  "industry": "AUTO"}

Response 400

A parameter, header or request body is missing, malformed, or out of range. A request body property the endpoint does not define answers UNKNOWN_FIELD instead, with field naming it.

{  "code": "INVALID_INPUT",  "message": "Parameter perPage must be between 1 and 100."}

Response 401

Missing, malformed, unknown, or revoked API key (INVALID_API_KEY).

{  "code": "INVALID_API_KEY",  "message": "Missing or invalid API key."}

Response 404

The business does not exist, belongs to another organization, was archived or has another mode than the key (BUSINESS_NOT_FOUND) - one answer for all of them.

{  "code": "BUSINESS_NOT_FOUND",  "message": "Business not found."}

Response 429

Burst rate limit exceeded.

{  "code": "RATE_LIMITED",  "message": "Too many requests. Retry after the time given in the Retry-After header."}