Email yourself an app's setup
Emails the calling person's own verified address a link to the app's setup on Synq's dashboard, to open on the computer where the app's code is: what the dashboard's "Email me the setup" does on a phone. The email holds the link alone, never a key or a secret: the dashboard shows those after the person signs in. A person only, since an API key has no address. At most 5 an hour for each person. Needs `org.apps.view`.
/v1/orgs/{org}/brands/{brand}/apps/{app}/setup-emailEmails the calling person's own verified address a link to the app's setup on Synq's dashboard, to open on the computer where the app's code is: what the dashboard's "Email me the setup" does on a phone. The email holds the link alone, never a key or a secret: the dashboard shows those after the person signs in. A person only, since an API key has no address. At most 5 an hour for each person. Needs org.apps.view.
Authorization
bearer An org API key (sk_live_…, sk_test_…), or an access token from the Synq issuer (the synq brand, on the accounts host) for this API.
In: header
Path Parameters
The org's id
^org_[0-9a-hjkmnp-tv-z]{26}$The brand's id
^brd_[0-9a-hjkmnp-tv-z]{26}$The app's client_id: an app_… id, or the URL of the metadata document an app registered itself with
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://api.synq.build/v1/orgs/org_01h455vb4pex5vsknk084sn02q/brands/brd_01h455vb4pex5vsknk084sn02q/apps/app_01h455vb4pex5vsknk084sn02q/setup-email" \ -H "Authorization: Bearer $SYNQ_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'{ "to": "ada@example.com", "setup_url": "https://dashboard.synq.build/orgs/org_01h455vb4pex5vsknk084sn02q/get-started?brand=brd_01h455vb4pex5vsknk084sn02r&app=app_01h455vb4pex5vsknk084sn02s"}Make a setup code for npx synqauth init POST
A code, shown once, that `npx synqauth init --code <code>` sets a Next.js project up with: it adds the project's https loopback addresses to this app and takes a new secret for it, once, within 60 minutes (`POST /v1/setup-codes/redeem`). It is what the dashboard's "Make your Next.js app" shows after onboarding, so init uses the app onboarding made instead of a claimable org. A new code takes the place of the app's last one. For the brand's own web apps that keep a secret and are on (`conflict` otherwise, saying why). Needs `org.apps.edit`, as rotating its secret does, and the same fresh sign-in: A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. The one exception is the app's first new secret, from the sign-in that made it, as onboarding's. Making one changes nothing until it's used, so it records nothing; using it records `app.updated` and `app.secret_rotated` as the person who made it.
Make an app POST
A web, SPA, native or machine app of the brand. A web or machine app's secret is in the response, this once; only its hash is kept. Needs `org.apps.edit`, and room under the org's plan (403 `plan_quota_exceeded`, naming the apps that hold its places in `held_by` and the plan that has room in `required_plan`). Apps that registered themselves don't count, and neither does the org's development app: its first app whose redirect URIs are all on localhost, 127.0.0.1 or [::1], beside the plan's apps on every plan (Starter allows 1 app, plus a development app). Recorded as `app.created`.