{"openapi":"3.1.0","info":{"title":"Agōn API","version":"1.0.0","description":"Prayer lists, requests, and sharing for Agōn (agon1230.com). Every call acts as the man who owns the token, and sees exactly what he may see: his own lists and requests, his cohorts' lists, and what partners shared with him."},"servers":[{"url":"https://agon1230.com"}],"components":{"securitySchemes":{"bearerToken":{"type":"http","scheme":"bearer","description":"An app session (aga_…, from /v1/auth/…: every scope plus \"account\"), or a personal API token (agp_…) made in the app (Me → Developer) with chosen scopes: prayer:read/write, shares:read/write, disciplines:read/write, reminders:read/write."}},"schemas":{"GodSaysIAm":{"type":"object","properties":{"name":{"type":"string"},"letters":{"type":"string","pattern":"^[A-Z]{1,12}$"},"words":{"type":"array","items":{"type":"string"}},"updated_at":{"type":"string","format":"date-time"}}},"Badge":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"group":{"enum":["accountability","neighbor","soul","mind","heart","strength"]},"line":{"type":"string"},"how":{"type":"string"},"ref":{"type":"string"},"ref_label":{"type":"string"},"text":{"type":["string","null"]},"translation":{"type":"string"},"seen":{"enum":["fixed","cohort","only_me"],"description":"fixed: part of giving account, his cohort always sees it; cohort: shown unless he hides it; only_me: his until he shows it"},"unit":{"type":"string"},"tiers":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"integer"},"metal":{"enum":["iron","bronze","silver","gold"]},"at":{"type":"integer"}}}}}},"BadgeEarned":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"group":{"type":"string"},"line":{"type":"string"},"tier":{"type":"integer"},"metal":{"type":"string"},"at":{"type":"integer"},"earned_on":{"type":"string","format":"date"},"pin":{"type":["integer","null"]}}},"RosterEntry":{"type":"object","properties":{"pins":{"type":"array","description":"The badges he pinned to his forge and shows (up to three; the roster only)","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"metal":{"enum":["iron","bronze","silver","gold"]}}}},"user":{"type":"object","properties":{"id":{"type":["integer","null"],"description":"His app account"},"member_id":{"type":["integer","null"],"description":"His membership (for GET /v1/cohort/partners/{memberId})"},"name":{"type":"string"},"first_name":{"type":"string"},"avatar_url":{"type":["string","null"]},"role":{"enum":["member","captain","partner"]}}},"rule":{"type":["object","null"],"description":"null: a captain with no rule in this cohort","properties":{"status":{"enum":["not_drafted","draft","locked","personal"],"description":"personal: his own rule, outside a cohort season (a partner only)"},"locked_at":{"type":["string","null"],"format":"date"},"sabbath":{"enum":["saturday","sunday",null]},"commitments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"pillar":{"enum":["heart","soul","mind","strength","neighbor"]},"title":{"type":"string"},"cadence":{"enum":["daily","weekly","quarterly"]},"weekly_target":{"type":["integer","null"],"description":"Weekly: times a week. Quarterly: times in the season"},"changed_at":{"type":["string","null"],"format":"date","description":"He changed it after lock-in (see history)"}}}},"history":{"type":"array","description":"Changes after lock-in, newest first","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"change":{"enum":["added","edited","retired"]},"from":{"type":["string","null"]},"to":{"type":["string","null"]}}}}}},"today":{"type":["object","null"],"description":"His day in his own time zone, as the check-in line shows it. null before his season counts, or where check-ins aren't shared","properties":{"date":{"type":"string","format":"date"},"gave_account":{"type":"boolean"},"dailies_kept":{"type":["integer","null"],"description":"Once he has given account"},"dailies_due":{"type":["integer","null"]},"sabbath":{"type":"boolean"},"rest":{"type":"boolean","description":"A Sabbath, grace or Quiet day: nothing is due"}}},"streak":{"type":["integer","null"]},"weekly_targets_hit":{"type":["integer","null"],"description":"Weekly targets he has hit this week"}}},"Amendment":{"type":"object","properties":{"id":{"type":"integer"},"commitment_id":{"type":"integer"},"kind":{"enum":["retire","lighten"]},"weekly_target":{"type":["integer","null"],"description":"Lighten a weekly or quarterly: the new target"},"days_mask":{"type":["integer","null"],"description":"Lighten a daily: the new days"},"reason":{"type":"string"},"status":{"enum":["pending","approved","declined","withdrawn"]},"note":{"type":["string","null"],"description":"His captain's word back"},"created_at":{"type":"string"},"decided_at":{"type":["string","null"]},"effective_on":{"type":["string","null"],"format":"date"}}},"ChatMessage":{"type":"object","properties":{"id":{"type":"integer"},"cohort_id":{"type":"integer"},"kind":{"type":"string","description":"text (a man's message), or a program card: account, wins, precall, sos, prayer, praise, quiet, back, still, watchman, cause, vote, renewal, routine, welcome, moved, jar, rule_locked, rule_changed, joined, left"},"body":{"type":["string","null"],"description":"Null once deleted"},"data":{"type":"object","description":"A card's facts, for its action: sos (sos_id, kind, name, claimed_name, resolved), precall (call: week, starts_at, ends_at, kind, url, place, address, map, note, one_time, line), prayer and praise (item_id, unspoken), account and wins (member_id, date), vote (nominations: id, name, url, votes), back and quiet (member_id), watchman (member_id)"},"reply_to":{"type":["integer","null"]},"reply":{"type":["object","null"],"properties":{"id":{"type":"integer"},"name":{"type":["string","null"]},"body":{"type":["string","null"]}}},"author":{"type":["object","null"],"description":"Null for a program card","properties":{"user_id":{"type":"integer"},"name":{"type":"string"},"avatar_url":{"type":["string","null"]}}},"mine":{"type":"boolean"},"about_me":{"type":"boolean","description":"Program cards only: it's about him (his SOS, his account line)"},"client_id":{"type":"string","description":"His own messages only: the id his phone sent it with"},"created_at":{"type":"string"},"edited_at":{"type":["string","null"]},"deleted":{"type":"boolean"},"removed":{"type":"boolean","description":"Taken down by the captain or Mark"},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"enum":["like","pray","love","strong","fire","laugh"]},"count":{"type":"integer"},"mine":{"type":"boolean"}}}}}},"Mission":{"type":"object","properties":{"cohort_id":{"type":"integer"},"can_nominate":{"type":"boolean","description":"Weeks 1 to 6"},"mine":{"type":["integer","null"],"description":"The nomination he voted for"},"cause":{"type":["object","null"],"description":"The cause Mark chose, once he has","properties":{"name":{"type":"string"},"url":{"type":["string","null"]}}},"nominations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"url":{"type":["string","null"]},"votes":{"type":"integer"}}}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string","examples":["unauthorized","insufficient_scope","forbidden","not_found","invalid","invalid_json","rate_limited","premium_required","server_error"]},"message":{"type":"string"},"feature":{"type":"string","description":"premium_required (402): the Premium feature he reached for (journals, devices, routines, prayer_looks, …)"}}}}},"List":{"type":"object","properties":{"id":{"type":"integer"},"kind":{"enum":["personal","cohort"]},"name":{"type":"string"},"cohort":{"type":["object","null"],"properties":{"id":{"type":"integer"},"label":{"type":"string"}}},"mine":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"Request":{"type":"object","properties":{"id":{"type":"integer"},"list_id":{"type":["integer","null"],"description":"The list it was put on through the API (null for older cohort requests from Slack or the web)"},"external_id":{"type":["string","null"],"description":"Your key for idempotent upserts (only shown on your own requests)"},"author":{"type":["object","null"],"properties":{"user_id":{"type":"integer"},"name":{"type":["string","null"]}}},"subject":{"type":["object","null"],"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"description":"Who or what it's for, on his own lists"},"tags":{"type":"array","items":{"type":"string"},"description":"urgent, praise, long-term, or his own"},"update_count":{"type":"integer"},"latest_update":{"type":["object","null"],"properties":{"body":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"mine":{"type":"boolean"},"kind":{"enum":["request","praise"]},"title":{"type":["string","null"]},"body":{"type":["string","null"],"description":"Null on a partner's unspoken request"},"for_name":{"type":"string"},"unspoken":{"type":"boolean"},"visibility":{"enum":["private","cohort","captain"],"description":"private: you (and whoever you share it with); cohort: the men of its cohorts; captain: its cohort's captain only"},"status":{"enum":["active","answered","archived"]},"answered_at":{"type":["string","null"],"format":"date-time"},"answer_note":{"type":["string","null"]},"cohorts":{"type":"array","items":{"type":"integer"},"description":"Cohorts whose list it is on"},"prayed_count":{"type":"integer","description":"Times prayed for that you can see: your own, or everyone's on your request"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"RequestInput":{"type":"object","description":"A title or a body is required.","properties":{"title":{"type":["string","null"],"maxLength":140},"body":{"type":["string","null"],"maxLength":2000},"for_name":{"type":["string","null"],"maxLength":100,"description":"Who it's for (default: your first name)"},"kind":{"enum":["request","praise"],"default":"request"},"unspoken":{"type":"boolean","default":false},"visibility":{"enum":["private","cohort","captain"],"description":"Personal list: private. Cohort list: cohort (default) or captain."},"tags":{"type":"array","items":{"type":"string"},"description":"urgent, praise, long-term, or his own (lowercase)"},"subject_id":{"type":["integer","null"],"description":"A subject on the same list (his own lists)"},"list_id":{"type":"integer","description":"PATCH only: move his request to another of his own lists"}},"additionalProperties":false},"FollowThrough":{"type":"object","properties":{"id":{"type":"integer"},"text":{"type":"string","maxLength":280},"pillar":{"enum":["heart","soul","mind","strength","neighbor","general"]},"person":{"type":["object","null"],"properties":{"target":{"enum":["person","subject",null]},"id":{"type":["integer","null"]},"name":{"type":"string","description":"The name as he saw it when he linked it"}}},"due_on":{"type":["string","null"],"format":"date"},"remind_at":{"type":["string","null"],"format":"date-time","description":"His phone reminds him then (a local notification)"},"source":{"enum":["manual","prayer","journal","reading","examen","routine","people","mcp"]},"source_ref":{"type":["string","null"],"description":"The id of what it came from (a journal entry's id, never its text)"},"status":{"enum":["open","done","dropped","sent"]},"sent_to":{"type":["string","null"],"enum":["apple_reminders","todoist","other",null]},"external_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"closed_at":{"type":["string","null"],"format":"date-time"},"overdue":{"type":"boolean"},"older":{"type":"boolean","description":"Open, undated, and untouched for 21 days"}}},"Book":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"author":{"type":["string","null"]},"kind":{"enum":["book","audiobook","article","course"]},"unit":{"enum":["pages","minutes"]},"total_pages":{"type":["integer","null"]},"status":{"enum":["reading","finished","dropped"]},"started_on":{"type":"string","format":"date"},"finished_on":{"type":["string","null"],"format":"date"},"pages_read":{"type":"integer"},"percent":{"type":["integer","null"]},"minutes_week":{"type":"integer","description":"Since Monday"},"minutes_total":{"type":"integer"},"last_logged":{"type":["string","null"],"format":"date"},"today_log":{"type":["object","null"],"properties":{"pages":{"type":["integer","null"]},"minutes":{"type":["integer","null"]},"takeaway":{"type":["string","null"]},"shared":{"type":"boolean"}}}}},"Gift":{"type":"object","properties":{"id":{"type":"integer"},"date":{"type":"string","format":"date"},"kind":{"enum":["money","time","meal","other"]},"amount_cents":{"type":["integer","null"]},"minutes":{"type":["integer","null"]},"what":{"type":"string"},"toward":{"type":["string","null"]}}},"TodayLayout":{"type":"object","properties":{"order":{"type":"array","items":{"type":"string"},"description":"Every section, in his order: 1230, daily_verse, and tool keys"},"hidden":{"type":"array","items":{"type":"string"}}}},"ForgeEggs":{"type":"object","description":"Hidden things on his 12:30+1 piece from Blade on (docs/FORGE_EGGS_PLAN.md): only looks, sounds and words","properties":{"lasting":{"type":"array","items":{"type":"string"},"description":"Eggs that show on the piece now and stay"},"now":{"type":"array","items":{"type":"string"},"description":"Today's moments"},"found":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"line":{"type":"string"},"ref":{"type":["string","null"]},"ref_label":{"type":["string","null"]},"text":{"type":["string","null"],"description":"The verse, in his Verse a Week translation"},"translation":{"type":["string","null"]},"found_on":{"type":"string","format":"date"}}}},"gold":{"type":["object","null"],"description":"Today's gold day, as far as the server sees (the Examen is on his phone)","properties":{"routine":{"type":"boolean"},"heart":{"type":"boolean"},"gift":{"type":"boolean"}}}}},"HeartCheck":{"type":"object","properties":{"id":{"type":"integer"},"date":{"type":"string","format":"date"},"at":{"type":"string","format":"date-time"},"words":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"family":{"enum":["lament","trust","thanksgiving"]}}}},"psalm":{"type":"object","properties":{"ref":{"type":"string"},"label":{"type":"string"}}}}},"Psalm":{"type":"object","properties":{"ref":{"type":"string","description":"The whole Psalm (OSIS)"},"label":{"type":"string"},"show":{"type":"string","description":"The verses shown (OSIS)"},"show_label":{"type":"string"},"text":{"type":["string","null"]},"translation":{"type":"string"},"family":{"type":"string"},"word":{"type":"string"},"url":{"type":"string","description":"The whole Psalm in his Bible app"}}},"Verse":{"type":"object","properties":{"id":{"type":"integer"},"ref":{"type":"string","description":"OSIS: one verse or a few in one chapter (Rom.12.2, Prov.3.5-Prov.3.6)"},"label":{"type":"string"},"translation":{"enum":["WEB","BSB","KJV","OWN"]},"own_label":{"type":["string","null"]},"text":{"type":"string","description":"The bundled public-domain text, or (OWN) what he pasted; never shared"},"box":{"type":"integer","minimum":1,"maximum":5},"next_review_on":{"type":"string","format":"date"},"due":{"type":"boolean"},"streak":{"type":"integer"},"mastered":{"type":"boolean"},"mastered_at":{"type":["string","null"]},"last_reviewed_on":{"type":["string","null"],"format":"date"},"reviewed_today":{"type":"boolean"},"added_on":{"type":"string","format":"date"},"slot_id":{"type":["integer","null"],"description":"His cohort's verse of the week"},"url":{"type":"string","description":"The passage in his Bible app"}}},"Share":{"type":"object","properties":{"id":{"type":"integer"},"resource_type":{"enum":["request","list"]},"resource_id":{"type":"integer"},"target_type":{"enum":["user","cohort"]},"target_id":{"type":"integer"},"granted_by":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}}}}},"paths":{"/v1/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This document","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/auth/email/start":{"post":{"operationId":"startEmailSignIn","summary":"Email a 6-digit sign-in code (the same answer whether or not the email has an account)","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}}}}},"responses":{"202":{"description":"Sent (if the address can receive it)","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"const":true},"resend_after":{"type":"integer","description":"Seconds before he may ask again (asking sooner keeps the code already sent)"}}}}}},"422":{"description":"Not an email address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/email/verify":{"post":{"operationId":"verifyEmailSignIn","summary":"Trade the code for an app session. A new email becomes a new account.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","code"],"properties":{"email":{"type":"string","format":"email"},"code":{"type":"string","pattern":"^[0-9]{6}$"},"name":{"type":"string","description":"For a new account"},"timezone":{"type":"string","description":"IANA zone, for a new account"},"device":{"type":"string"},"remember":{"type":"boolean","default":true,"description":"false on a shared computer: the session ends after a day"}}}}}},"responses":{"200":{"description":"Signed in","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"access_token":{"type":"string","description":"aga_…, good for expires_in seconds"},"token_type":{"const":"Bearer"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","description":"agr_…; rotates on every refresh"},"remember":{"type":"boolean","description":"true: the refresh token slides 180 days; false (\"remember this device\" unticked): the session ends after a day"}}},{"type":"object","properties":{"user":{"type":"object"},"new_user":{"type":"boolean"}}}]}}}},"401":{"description":"Wrong, used, or expired code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"email_off: he turned off email codes for this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/refresh":{"post":{"operationId":"refreshSession","summary":"Trade a refresh token for a new access and refresh token (the old refresh token stops working)","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["refresh_token"],"properties":{"refresh_token":{"type":"string"}}}}}},"responses":{"200":{"description":"Refreshed","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"aga_…, good for expires_in seconds"},"token_type":{"const":"Bearer"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","description":"agr_…; rotates on every refresh"},"remember":{"type":"boolean","description":"true: the refresh token slides 180 days; false (\"remember this device\" unticked): the session ends after a day"}}}}}},"401":{"description":"Sign in again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/providers":{"get":{"operationId":"getSignInProviders","summary":"Which sign-in options this server offers, and the public Google client ids the app needs","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"apple":{"type":"object","properties":{"enabled":{"type":"boolean"},"web":{"type":"boolean","description":"Apple through this server (the web app and Android)"}}},"passkey":{"type":"object","properties":{"enabled":{"type":"boolean"},"rp_id":{"type":"string"}}},"slack":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"google":{"type":"object","properties":{"enabled":{"type":"boolean"},"ios_client_id":{"type":["string","null"]},"web_client_id":{"type":["string","null"]},"android_client_id":{"type":["string","null"]}}}}}}}}}}},"/v1/auth/apple":{"post":{"operationId":"signInWithApple","summary":"Trade an Apple identity token for an app session. Matched by Apple ID, then by Apple-verified email. No match (and a \"Hide My Email\" relay address never matches by email) answers no_match: he makes a new account or links his own (POST /v1/auth/pending).","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["identity_token"],"properties":{"identity_token":{"type":"string","description":"ASAuthorizationAppleIDCredential.identityToken (a JWT)"},"authorization_code":{"type":"string","description":"ASAuthorizationAppleIDCredential.authorizationCode: traded for a refresh token so deleting his account can revoke it with Apple"},"nonce":{"type":"string","description":"The raw nonce, if the app passed its SHA-256 to Apple"},"name":{"type":"string","description":"For a new account (Apple shares his name only the first time)"},"device":{"type":"string"},"remember":{"type":"boolean","default":true,"description":"false on a shared computer: the session ends after a day"}}}}}},"responses":{"200":{"description":"Signed in, or no account matched","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"allOf":[{"type":"object","properties":{"access_token":{"type":"string","description":"aga_…, good for expires_in seconds"},"token_type":{"const":"Bearer"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","description":"agr_…; rotates on every refresh"},"remember":{"type":"boolean","description":"true: the refresh token slides 180 days; false (\"remember this device\" unticked): the session ends after a day"}}},{"type":"object","properties":{"user":{"type":"object"},"new_user":{"type":"boolean"}}}]},{"type":"object","properties":{"private_email":{"type":"boolean","description":"Apple gave a private relay address"}}}]},{"type":"object","properties":{"status":{"const":"no_match"},"pending":{"type":"string","description":"agi_…, good for 10 minutes"},"provider":{"enum":["apple","google","slack"]},"email":{"type":["string","null"],"description":"The address the provider verified (null for an Apple relay address)"},"private_email":{"type":"boolean"},"message":{"type":"string"}}}]}}}},"401":{"description":"Apple didn't vouch for this token (signature, issuer, audience, expiry, or nonce)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"no_email: Apple shared no email and this Apple ID isn't linked yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Apple's keys couldn't be fetched","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/google":{"post":{"operationId":"signInWithGoogle","summary":"Trade a Google ID token for an app session. Matched by Google account, then by Google-verified email; no match answers no_match (POST /v1/auth/pending).","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id_token"],"properties":{"id_token":{"type":"string","description":"The ID token (a JWT) issued to one of this server's Google client ids"},"name":{"type":"string"},"device":{"type":"string"},"remember":{"type":"boolean","default":true,"description":"false on a shared computer: the session ends after a day"}}}}}},"responses":{"200":{"description":"Signed in, or no account matched","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"type":"object","properties":{"access_token":{"type":"string","description":"aga_…, good for expires_in seconds"},"token_type":{"const":"Bearer"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","description":"agr_…; rotates on every refresh"},"remember":{"type":"boolean","description":"true: the refresh token slides 180 days; false (\"remember this device\" unticked): the session ends after a day"}}},{"type":"object","properties":{"user":{"type":"object"},"new_user":{"type":"boolean"}}}]},{"type":"object","properties":{"status":{"const":"no_match"},"pending":{"type":"string","description":"agi_…, good for 10 minutes"},"provider":{"enum":["apple","google","slack"]},"email":{"type":["string","null"],"description":"The address the provider verified (null for an Apple relay address)"},"private_email":{"type":"boolean"},"message":{"type":"string"}}}]}}}},"401":{"description":"Google didn't vouch for this token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Google sign-in isn't set up on this server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"no_email: the Google email isn't verified","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Google's keys couldn't be fetched","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/slack/start":{"get":{"operationId":"startSlackSignIn","summary":"Open this in a browser auth session: it redirects to Slack (OpenID Connect, with state and PKCE). Only the Agōn workspace can sign in.","security":[],"parameters":[{"name":"return_to","in":"query","required":true,"schema":{"type":"string"},"description":"Where to send him back: agon://… or this server's /app/… page. Gets ?code=agx_… on success, or ?error=…&message=…"},{"name":"code_challenge","in":"query","required":true,"schema":{"type":"string"},"description":"base64url(SHA-256(code_verifier)); the exchange must present the verifier"}],"responses":{"302":{"description":"To Slack"},"404":{"description":"Slack sign-in isn't set up on this server"},"422":{"description":"return_to or code_challenge is invalid"},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/slack/callback":{"get":{"operationId":"slackSignInCallback","summary":"Slack's redirect back to this server (not called by the app). Redirects to return_to with a one-time code (2 minutes) or an error.","security":[],"parameters":[{"name":"code","in":"query","schema":{"type":"string"}},{"name":"state","in":"query","schema":{"type":"string"}},{"name":"error","in":"query","schema":{"type":"string"}}],"responses":{"302":{"description":"Back to the app"},"400":{"description":"Unknown, expired, or reused state"},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/slack/exchange":{"post":{"operationId":"exchangeSlackSignIn","summary":"Trade the one-time code from the Slack redirect (and the PKCE verifier) for an app session, or the no-match choice (the same as /v1/auth/exchange)","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code","code_verifier"],"properties":{"code":{"type":"string","description":"agx_…"},"code_verifier":{"type":"string","minLength":43},"timezone":{"type":"string","description":"IANA zone, for a new account"},"device":{"type":"string"},"remember":{"type":"boolean","default":true,"description":"false on a shared computer: the session ends after a day"}}}}}},"responses":{"200":{"description":"Signed in, or no account matched","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"type":"object","properties":{"access_token":{"type":"string","description":"aga_…, good for expires_in seconds"},"token_type":{"const":"Bearer"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","description":"agr_…; rotates on every refresh"},"remember":{"type":"boolean","description":"true: the refresh token slides 180 days; false (\"remember this device\" unticked): the session ends after a day"}}},{"type":"object","properties":{"user":{"type":"object"},"new_user":{"type":"boolean"}}}]},{"type":"object","properties":{"status":{"const":"no_match"},"pending":{"type":"string","description":"agi_…, good for 10 minutes"},"provider":{"enum":["apple","google","slack"]},"email":{"type":["string","null"],"description":"The address the provider verified (null for an Apple relay address)"},"private_email":{"type":"boolean"},"message":{"type":"string"}}}]}}}},"401":{"description":"Wrong, used, or expired code, or the verifier doesn't match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/exchange":{"post":{"operationId":"exchangeSignIn","summary":"Trade the one-time code from the Slack or Apple redirect (and the PKCE verifier) for an app session, or the no-match choice","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code","code_verifier"],"properties":{"code":{"type":"string"},"code_verifier":{"type":"string","minLength":43},"timezone":{"type":"string"},"device":{"type":"string"},"remember":{"type":"boolean","default":true,"description":"false on a shared computer: the session ends after a day"}}}}}},"responses":{"200":{"description":"Signed in, or no account matched","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"type":"object","properties":{"access_token":{"type":"string","description":"aga_…, good for expires_in seconds"},"token_type":{"const":"Bearer"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","description":"agr_…; rotates on every refresh"},"remember":{"type":"boolean","description":"true: the refresh token slides 180 days; false (\"remember this device\" unticked): the session ends after a day"}}},{"type":"object","properties":{"user":{"type":"object"},"new_user":{"type":"boolean"}}}]},{"type":"object","properties":{"status":{"const":"no_match"},"pending":{"type":"string","description":"agi_…, good for 10 minutes"},"provider":{"enum":["apple","google","slack"]},"email":{"type":["string","null"],"description":"The address the provider verified (null for an Apple relay address)"},"private_email":{"type":"boolean"},"message":{"type":"string"}}}]}}}},"401":{"description":"Wrong, used, or expired code, or the verifier doesn't match","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/apple/start":{"get":{"operationId":"startAppleSignIn","summary":"Sign in with Apple on the web and Android: open this in a browser auth session; it redirects to Apple with the Services ID (form_post back to this server)","security":[],"parameters":[{"name":"return_to","in":"query","required":true,"schema":{"type":"string"},"description":"agon://… or this server's /app/… page; gets ?code=agx_… or ?error=…"},{"name":"code_challenge","in":"query","required":true,"schema":{"type":"string"},"description":"base64url(SHA-256(code_verifier))"}],"responses":{"302":{"description":"To Apple"},"404":{"description":"Apple on the web isn't set up on this server"},"422":{"description":"return_to or code_challenge is invalid"},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/apple/callback":{"post":{"operationId":"appleSignInCallback","summary":"Apple's form_post back to this server (not called by the app). Redirects (303) to return_to with a one-time code, ?linked=apple, or an error.","security":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"id_token":{"type":"string"},"code":{"type":"string"},"state":{"type":"string"},"user":{"type":"string"},"error":{"type":"string"}}}}}},"responses":{"303":{"description":"Back to the app"},"400":{"description":"Unknown, expired, or reused state"},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/pending":{"post":{"operationId":"finishPendingSignIn","summary":"No account matched his Apple, Google, or Slack identity: make a new account (create), or link it to his account, proved by the code /v1/auth/email/start sent to it (link)","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["pending","action"],"properties":{"pending":{"type":"string"},"action":{"enum":["create","link"]},"email":{"type":"string","format":"email","description":"link: his account's email"},"code":{"type":"string","description":"link: the code emailed to it"},"timezone":{"type":"string","description":"create: IANA zone"},"device":{"type":"string"},"remember":{"type":"boolean","default":true,"description":"false on a shared computer: the session ends after a day"}}}}}},"responses":{"200":{"description":"Signed in","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"access_token":{"type":"string","description":"aga_…, good for expires_in seconds"},"token_type":{"const":"Bearer"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","description":"agr_…; rotates on every refresh"},"remember":{"type":"boolean","description":"true: the refresh token slides 180 days; false (\"remember this device\" unticked): the session ends after a day"}}},{"type":"object","properties":{"user":{"type":"object"},"new_user":{"type":"boolean"}}}]}}}},"401":{"description":"Wrong, used, or expired code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"email_off: that account turned off email codes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"no_account: no account uses that email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"link_required (create, but the email has an account) or already_linked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"The choice timed out (10 minutes) or was already made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/passkey/options":{"post":{"operationId":"passkeySignInOptions","summary":"Begin signing in with a passkey: the WebAuthn options for his device (no account named: the passkey says whose it is)","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"flow":{"type":"string","description":"agk_…, good for 5 minutes"},"options":{"type":"object","description":"WebAuthn JSON (base64url), as navigator.credentials and the iOS/Android passkey APIs give it"}}}}}},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/passkey/verify":{"post":{"operationId":"passkeySignIn","summary":"Trade the device's passkey answer for an app session","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["flow","response"],"properties":{"flow":{"type":"string"},"response":{"type":"object","description":"WebAuthn JSON (base64url), as navigator.credentials and the iOS/Android passkey APIs give it"},"device":{"type":"string"},"remember":{"type":"boolean","default":true,"description":"false on a shared computer: the session ends after a day"}}}}}},"responses":{"200":{"description":"Signed in","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"access_token":{"type":"string","description":"aga_…, good for expires_in seconds"},"token_type":{"const":"Bearer"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","description":"agr_…; rotates on every refresh"},"remember":{"type":"boolean","description":"true: the refresh token slides 180 days; false (\"remember this device\" unticked): the session ends after a day"}}},{"type":"object","properties":{"user":{"type":"object"},"new_user":{"type":"boolean"}}}]}}}},"401":{"description":"expired (try again) or invalid_passkey (removed, or made for another site)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many attempts from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/logout":{"post":{"operationId":"logout","summary":"End this app session","security":[{"bearerToken":["account"]}],"responses":{"204":{"description":"Signed out"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not an app session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/watch":{"post":{"operationId":"watchSession","summary":"A session for his Apple Watch, which his iPhone hands to it. One per man: an earlier watch session ends","security":[{"bearerToken":["account"]}],"responses":{"201":{"description":"The watch's session","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"aga_…, good for expires_in seconds"},"token_type":{"const":"Bearer"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string","description":"agr_…; rotates on every refresh"},"remember":{"type":"boolean","description":"true: the refresh token slides 180 days; false (\"remember this device\" unticked): the session ends after a day"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not an app session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me":{"patch":{"operationId":"updateMe","summary":"Change his name or time zone","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"timezone":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not an app session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteMe","summary":"Delete his account: his own data goes; cohort and billing history stays with the program","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["confirm"],"properties":{"confirm":{"const":"DELETE"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"const":true},"memberships":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not an app session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getMe","summary":"The token's man: his account, the token's scopes, and his cohorts with their lists and partners","security":[{"bearerToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"}}},"token":{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"}}}},"cohorts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"label":{"type":"string"},"code":{"type":"string"},"lifecycle":{"type":"string"},"list_id":{"type":["integer","null"]},"brothers":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer"},"name":{"type":"string"}}}}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/link/apple":{"post":{"operationId":"linkApple","summary":"Link an Apple ID to his account, so Sign in with Apple finds it (the way in for a \"Hide My Email\" Apple ID)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["identity_token"],"properties":{"identity_token":{"type":"string"},"nonce":{"type":"string"},"authorization_code":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object"},"linked":{"const":"apple"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not an app session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"That Apple ID signs in to another account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/link/google":{"post":{"operationId":"linkGoogle","summary":"Link a Google account to his account","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id_token"],"properties":{"id_token":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object"},"linked":{"const":"google"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"That Google account signs in to another account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/link/slack/start":{"post":{"operationId":"linkSlackStart","summary":"Begin linking Slack from Me: open { url } in a browser; it comes back to return_to with ?linked=slack or ?error=…","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["return_to"],"properties":{"return_to":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Slack sign-in isn't set up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"return_to is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/link/apple/start":{"post":{"operationId":"linkAppleStart","summary":"Begin linking Apple from Me on the web or Android: open { url } in a browser; it comes back with ?linked=apple or ?error=…","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["return_to"],"properties":{"return_to":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Apple on the web isn't set up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"return_to is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/sign-in-methods":{"get":{"operationId":"signInMethods","summary":"Every way he signs in: email code, Apple, Google, Slack, and each passkey","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"methods":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["email","apple","google","slack","passkey"]},"id":{"type":"integer","description":"Passkeys"},"name":{"type":"string"},"detail":{"type":"string"},"on":{"type":"boolean"},"available":{"type":"boolean","description":"This server offers it"},"removable":{"type":"boolean","description":"false while it's the only way in"},"last_used_at":{"type":["string","null"]}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/sign-in-methods/email":{"post":{"operationId":"enableEmailCodes","summary":"Turn email codes back on","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"methods":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["email","apple","google","slack","passkey"]},"id":{"type":"integer","description":"Passkeys"},"name":{"type":"string"},"detail":{"type":"string"},"on":{"type":"boolean"},"available":{"type":"boolean","description":"This server offers it"},"removable":{"type":"boolean","description":"false while it's the only way in"},"last_used_at":{"type":["string","null"]}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/sign-in-methods/{kind}":{"delete":{"operationId":"removeSignInMethod","summary":"Remove Apple, Google, or Slack, or turn off email codes (his email still gets notices). Refused while it's his only way in.","security":[{"bearerToken":["account"]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"enum":["email","apple","google","slack"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"methods":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["email","apple","google","slack","passkey"]},"id":{"type":"integer","description":"Passkeys"},"name":{"type":"string"},"detail":{"type":"string"},"on":{"type":"boolean"},"available":{"type":"boolean","description":"This server offers it"},"removable":{"type":"boolean","description":"false while it's the only way in"},"last_used_at":{"type":["string","null"]}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not on his account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"last_method: add another way in first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/passkeys":{"get":{"operationId":"listPasskeys","summary":"His passkeys","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"passkeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"synced":{"type":"boolean"},"created_at":{"type":"string"},"last_used_at":{"type":["string","null"]}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addPasskey","summary":"Save the passkey his device made from /v1/me/passkeys/options","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["flow","response"],"properties":{"flow":{"type":"string"},"response":{"type":"object","description":"WebAuthn JSON (base64url), as navigator.credentials and the iOS/Android passkey APIs give it"},"name":{"type":"string","maxLength":60},"device":{"type":"string"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"passkeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"synced":{"type":"boolean"},"created_at":{"type":"string"},"last_used_at":{"type":["string","null"]}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"It didn't check out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/passkeys/options":{"post":{"operationId":"passkeyRegisterOptions","summary":"Begin adding a passkey on this device: the WebAuthn options (discoverable, so he signs in without typing his email)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"flow":{"type":"string"},"options":{"type":"object","description":"WebAuthn JSON (base64url), as navigator.credentials and the iOS/Android passkey APIs give it"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Too many passkeys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/passkeys/{id}":{"patch":{"operationId":"renamePasskey","summary":"Rename one","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Passkey id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":60}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"passkeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"synced":{"type":"boolean"},"created_at":{"type":"string"},"last_used_at":{"type":["string","null"]}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"removePasskey","summary":"Remove one (refused while it's his only way in)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Passkey id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"passkeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"synced":{"type":"boolean"},"created_at":{"type":"string"},"last_used_at":{"type":["string","null"]}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"last_method","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/tools":{"put":{"operationId":"setTools","summary":"Choose his tools (prayer, people, journal, reading: Scripture plans, routines, doors: Eight Doors, examen, books: the Reading Log, verses: Verse a Week, workouts: workout import, followthrough: Follow Through, giving: the Generosity log, heartcheck: the Heart check, and 1230: all in, the 12:30+1) and up to three favorites for his bottom bar","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tools"],"properties":{"tools":{"type":"array","items":{"enum":["prayer","people","journal","1230","reading","routines","doors","examen","books","verses","workouts","followthrough","giving","heartcheck"]},"description":"His first pick also turns on followthrough (on by default; he can turn it off after)"},"favorites":{"type":["array","null"],"maxItems":3,"items":{"type":"string"},"description":"In order; null: the first three of his tools. Omit to keep them"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not an app session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/sabbath":{"get":{"operationId":"getSabbath","summary":"His own Sabbath (outside a cohort season): weekday 6 Saturday, 7 Sunday, or null; whether today is it; and a change waiting to start tomorrow","security":[{"bearerToken":["disciplines:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sabbath":{"type":"object","properties":{"weekday":{"enum":[6,7,null]},"label":{"type":["string","null"]},"today":{"type":"boolean"},"next":{"type":["object","null"],"properties":{"weekday":{"enum":[6,7,null]},"label":{"type":["string","null"]},"starts_on":{"type":"string","format":"date"}}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setSabbath","summary":"Set his own Sabbath, from tomorrow. On it nothing daily is due, and his 12:30+1 and routine streaks hold (a routine he does run still counts). A cohort season keeps its own (PUT /v1/season/sabbath)","security":[{"bearerToken":["disciplines:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["weekday"],"properties":{"weekday":{"enum":[6,7,null]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sabbath":{"type":"object","properties":{"weekday":{"enum":[6,7,null]},"label":{"type":["string","null"]},"today":{"type":"boolean"},"next":{"type":["object","null"],"properties":{"weekday":{"enum":[6,7,null]},"label":{"type":["string","null"]},"starts_on":{"type":"string","format":"date"}}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/quiet":{"get":{"operationId":"getQuiet","summary":"Quiet (docs/QUIET_PLAN.md): his Quiet under way or next (with his intention), the last few, how many days he has left (14 in any 84), and the purposes","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string","format":"date"},"quiet":{"type":["object","null"]},"back":{"type":["object","null"],"description":"The Quiet he is coming back from (up to 3 days after it ends): each Quiet day with what he could have kept, returned, his line, who welcomed him"},"past":{"type":"array","items":{"type":"object"}},"limits":{"type":"object"},"purposes":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"goQuiet","summary":"Go Quiet: 1 to 7 days, starting today or later. Nothing daily is due or can be missed, his streaks hold, and nothing is pushed to him but an SOS. His partner (if told) and captain get a push; his cohort sees it if told","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["starts_on","ends_on","purpose"],"properties":{"starts_on":{"type":"string","format":"date"},"ends_on":{"type":"string","format":"date"},"purpose":{"enum":["retreat","fast","family","outdoors","grief","rest","unsaid"]},"intention":{"type":["string","null"],"maxLength":200,"description":"His alone"},"tell_partner":{"type":"boolean","default":true},"tell_cohort":{"type":"boolean","default":true}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid: a day already gone, too long, over 14 in 84 days, or one already planned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/quiet/end":{"post":{"operationId":"endQuiet","summary":"I'm back: a Quiet under way ends with yesterday; one not yet started (or starting today) is canceled","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No Quiet under way or planned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/quiet/back/{date}":{"put":{"operationId":"markQuietDay","summary":"Back from Quiet (up to 3 days after it ends): what he kept on his own on one Quiet day, counted as kept in Quiet. Others he marked on his return come off; what he marked while away stays","security":[{"bearerToken":["account"]}],"parameters":[{"name":"date","in":"path","required":true,"schema":{"type":"string","format":"date"},"description":"One of his Quiet days"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kept"],"properties":{"kept":{"type":"array","items":{"type":"integer"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No Quiet to come back from","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a Quiet day, or not one of his commitments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/quiet/back":{"post":{"operationId":"finishQuietReturn","summary":"His return is done (or set aside): with line, a line to his cohort shown with \"back from Quiet\" (if he told the cohort)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"line":{"type":["string","null"],"maxLength":200}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No Quiet to come back from","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/still":{"get":{"operationId":"getStill","summary":"Still (docs/STILL_PLAN.md): his rules (and a change waiting; pending_after: when it applies, if the filter is what holds it), his tags (each with its set and the link to write on it), each Still on now over one of his sets (ons; on is the first, for older apps) and the adult filter (filter), each with any lost-tag wait, early ends left in this period (one count across all), his last few, and who he has to tell (partner, captain, cohort). The apps he chose stay on his phone","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"object"},"pending":{"type":["object","null"]},"pending_after":{"type":["string","null"],"format":"date-time"},"tags":{"type":"array","items":{"type":"object"}},"on":{"type":["object","null"]},"ons":{"type":"array","items":{"type":"object"}},"filter":{"type":["object","null"]},"filter_wait_hours":{"type":"integer"},"early":{"type":"object","properties":{"limit":{"type":["integer","null"]},"period":{"enum":["day","week"]},"used":{"type":"integer"},"left":{"type":["integer","null"]}}},"recent":{"type":"array","items":{"type":"object"}},"lost_hours":{"type":"integer"},"has":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/still/rules":{"put":{"operationId":"setStillRules","summary":"His Still rules: early ends allowed per day or week (null: no limit; 0: only a tag), who is told of one (nobody by default), Still with Quiet and his Sabbath, the adult-content filter during Still. While any Still is on, a change waits: until his sets' Stills end and, while the adult filter is on, 24 hours from the change","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"unlock_limit":{"type":["integer","null"],"minimum":0,"maximum":10},"unlock_period":{"enum":["day","week"]},"tell":{"type":"array","items":{"enum":["partner","captain","cohort"]}},"with_quiet":{"type":"boolean"},"with_sabbath":{"type":"boolean"},"adult_filter":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/still/tags":{"post":{"operationId":"addStillTag","summary":"Pair a tag: its id and the link the app writes on it (an agon1230.com/app/still/t/… universal link). It starts and ends one set's Still (set_id; null his first; another is Premium)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":40},"set_id":{"type":["string","null"],"maxLength":40,"description":"One of his sets on the phone; null: his first. Never filter"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"set_id":{"type":["string","null"]},"url":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium (a set other than his first)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No name, or 20 tags already","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/still/tags/{id}":{"put":{"operationId":"saveStillTag","summary":"Rename a tag, or give it another set. Returns his Still","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":40},"set_id":{"type":["string","null"],"maxLength":40}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium (a set other than his first)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"removeStillTag","summary":"Unpair a tag: it no longer ends Still","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/still/start":{"post":{"operationId":"startStill","summary":"Still is on over one of his sets (the phone has put up its shield): how it started. Stills over different sets overlap; one at a time per set. A tag starts its own set's. set_id filter: the adult filter alone, by button, kept on until he turns it off","security":[{"bearerToken":["account"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"how":{"enum":["tag","button","quiet","sabbath","schedule","focus","routine"],"default":"button"},"tag_id":{"type":"string"},"set_id":{"type":"string","maxLength":40,"default":"main","description":"One of his sets on the phone (main: his first), or filter"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium (a set other than his first)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"That Still is already on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/still/end":{"post":{"operationId":"endStill","summary":"One Still ends (set_id; or the one his tag is for; or his only one; the filter only by name): with one of his tags (that set's; any of his for the filter); early (within his limit, with an optional reason; whoever he chose is told); lost_tag (24 hours after he said so; that tag is unpaired); schedule (only a Still that started on its own); or lifted (the phone found the shield gone: counted as early, never refused)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["how"],"properties":{"how":{"enum":["tag","early","lost_tag","schedule","lifted"]},"set_id":{"type":"string","maxLength":40},"tag_id":{"type":"string"},"reason":{"type":["string","null"],"maxLength":200},"attempts":{"type":"integer","minimum":0,"description":"How often the shield turned him back during it (counted on the phone), for his history"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not one of his tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Still is not on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Over his limit, or the lost-tag wait is not over","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/still/lost-tag":{"post":{"operationId":"stillLostTag","summary":"I lost my tag: Still can end 24 hours from now (and that tag, if named, is unpaired then). Not an early end; tells no one","security":[{"bearerToken":["account"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"set_id":{"type":"string","description":"Which Still (needed when more than one is on, and for the filter)"},"tag_id":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Still is not on, or not one of his tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"stillFoundTag","summary":"He found his tag: the wait stops (for the Still over set_id, or every one)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"set_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/still/schedules":{"post":{"operationId":"addStillSchedule","summary":"Premium: Still on a schedule (days of the week, a time of day, in his phone's time). Returns his Still","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":40},"days":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"description":"1 Monday … 7 Sunday"},"start_min":{"type":"integer","minimum":0,"maximum":1439},"end_min":{"type":"integer","minimum":0,"maximum":1439,"description":"Before start_min: it runs past midnight"},"set_id":{"type":["string","null"],"description":"One of his sets on the phone; null: his first"},"enabled":{"type":"boolean"}},"required":["name","days","start_min","end_min"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid, or 12 already","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/still/schedules/{id}":{"put":{"operationId":"saveStillSchedule","summary":"Premium: change a schedule (turning one off is always allowed)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":40},"days":{"type":"array","items":{"type":"integer","minimum":1,"maximum":7},"description":"1 Monday … 7 Sunday"},"start_min":{"type":"integer","minimum":0,"maximum":1439},"end_min":{"type":"integer","minimum":0,"maximum":1439,"description":"Before start_min: it runs past midnight"},"set_id":{"type":["string","null"],"description":"One of his sets on the phone; null: his first"},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"removeStillSchedule","summary":"Remove a schedule. Returns his Still","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/still/history":{"get":{"operationId":"stillHistory","summary":"Premium: his Still over the last 12 weeks (Monday to Sunday, his time zone): hours, times, early ends, and how often the shield turned him back; with the last 4 weeks against the 4 before","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure":{"get":{"operationId":"getPure","summary":"His Pure: the filter (on, since, a pause or sites open now, a turn-off wait), settings and a change waiting, Pure partners, phones, allowlist, the pause ladder's next step, his private clean-day count, Premium, and risk windows","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/verses":{"get":{"operationId":"pureVerses","summary":"Verses for the moment (World English Bible): I'm tempted, I fell, I'm winning","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/settings":{"put":{"operationId":"savePureSettings","summary":"His settings: heartbeat_hours (6 to 48), ladder_level (0 to 2, Premium above 0; 2, a partner's code, needs a confirmed Pure partner: 409 no_partner), sos_text. While the filter is on, a change that loosens waits 24 hours","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"heartbeat_hours":{"type":"integer","minimum":6,"maximum":48},"ladder_level":{"type":"integer","minimum":0,"maximum":2},"sos_text":{"type":["string","null"],"maxLength":300}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Level 2 without a confirmed Pure partner (no_partner)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/filter":{"post":{"operationId":"pureFilterOn","summary":"Turn the filter on (at once). Returns his Pure","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/off":{"post":{"operationId":"pureOff","summary":"Turn the filter off: the first ask starts a 24-hour wait (his partners are told), asking again after it turns it off; with a partner's code, at once","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Wrong or used code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already off, or too soon","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"pureCancelOff","summary":"Stop the wait: the filter stays on (his partners are told)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/partners":{"post":{"operationId":"addPurePartner","summary":"Premium: add a Pure partner by name with email and/or phone (they confirm on their page before getting anything), or his accountability partner in one tap (accountability: true)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"email":{"type":"string"},"phone":{"type":"string"},"channels":{"type":"array","items":{"enum":["email","text"]}},"accountability":{"type":"boolean"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No accountability partner, or already added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/partners/{id}":{"put":{"operationId":"savePurePartner","summary":"Premium: how a partner hears (channels)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channels":{"type":"array","items":{"enum":["email","text","push"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"removePurePartner","summary":"Remove a partner: they hear once, and so do his other partners","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/checkin":{"post":{"operationId":"pureCheckin","summary":"A phone checks in (in front and in the background): a filter that's gone, a changed Private DNS, or a new browser is told to his partners, once the phone is set up (it first checked in on or paused; until then it alerts no one). Returns set_up and what the phone should hold","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"device_id":{"type":"string"},"platform":{"enum":["ios","android"]},"filter_state":{"enum":["on","off","paused","lifted","dns_changed"]},"battery":{"type":"number","minimum":0,"maximum":1},"browsers":{"type":"array","items":{"type":"string"}},"name":{"type":"string"}},"required":["device_id","platform","filter_state"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/devices/{id}":{"delete":{"operationId":"removePureDevice","summary":"Remove an old phone: it stops being expected to check in (his partners are told)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/pause":{"post":{"operationId":"purePause","summary":"Pause the filter for 15 minutes with a reason, no tag (his partners are told at once). With Premium, as pauses add up in 7 days: a 10-minute wait, then a partner's code, or a 30-minute wait if he has no confirmed Pure partner (409 needs: wait | code)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":300},"code":{"type":"string"},"device_id":{"type":"string"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"A wrong code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Off, already paused, or the ladder's next step","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A reason","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/unblock":{"post":{"operationId":"pureUnblock","summary":"iPhone: open one site for 15 minutes with a reason (half a bypass; his partners are told, with a link to allow it for good)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"reason":{"type":"string","maxLength":300}},"required":["domain","reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/report":{"post":{"operationId":"pureReport","summary":"This site shouldn't be blocked: to Agōn, with no unblock and no alert","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"}},"required":["domain"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/allowlist":{"post":{"operationId":"pureAskAllow","summary":"Premium: ask his partners to always allow a site (open once one says yes)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"}},"required":["domain"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No partner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/allowlist/{id}":{"delete":{"operationId":"pureRemoveAllow","summary":"Take a site off his allowlist","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/codes":{"post":{"operationId":"pureAskCode","summary":"Premium: ask his partners (or one) for a one-time code: off (turn Pure off now) or bypass (pause). At most 3 an hour","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"enum":["off","bypass"]},"partner_id":{"type":"integer"}},"required":["purpose"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No partner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/sos":{"post":{"operationId":"pureSos","summary":"Premium: Pure's SOS to his Pure partners, at once","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":300}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No partner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/fresh-start":{"post":{"operationId":"pureFreshStart","summary":"Start fresh: his private clean-day count begins again; a note goes to his partners only if he writes one","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pure/week":{"get":{"operationId":"pureWeek","summary":"Premium: his last 7 days (days checked in, pauses with reasons, sites opened, missed check-ins, Quiet days)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/avatar":{"post":{"operationId":"newAvatar","summary":"A slot for his avatar photo: PUT a JPEG (2 MB at most) to upload_url, then name it with PUT","security":[{"bearerToken":["account"]}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"upload_url":{"type":"string"},"max_bytes":{"type":"integer"},"content_type":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Photos unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setAvatar","summary":"Use an uploaded photo as his avatar (key), or clear it (null). Men who share a cohort with him see it","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"avatar_url":{"type":["string","null"]}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not his upload, not uploaded yet, or too big","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"clearAvatar","summary":"Remove his avatar","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/home/cohort-invite":{"get":{"operationId":"cohortInvite","summary":"Whether to invite him to a cohort: after a 21-day streak on his own 12:30+1, if he has never been in one (or led one). \"Not now\" puts it away until his streak doubles","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"show":{"type":"boolean"},"streak":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/home/cohort-invite/dismiss":{"post":{"operationId":"dismissCohortInvite","summary":"\"Not now\" on the cohort invitation","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/home":{"get":{"operationId":"getHome","summary":"Home: one card per tool he uses, with today's one useful thing","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string","format":"date"},"tools":{"type":"array","items":{"type":"string"}},"cards":{"type":"object","description":"Keyed by tool: 1230, prayer, people, journal; follow_through ({ due, overdue, open }: only when Follow Through is on and an item is due today or overdue); and daily_verse (the Verse of the Day, for every man)"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not an app session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/export":{"get":{"operationId":"exportMyData","summary":"Everything that's yours, as JSON","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not an app session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pillars":{"get":{"operationId":"getPillars","summary":"Scripture and a short why for each pillar of the 12:30+1","security":[{"bearerToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"roof":{"type":"object"},"pillars":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/library":{"get":{"operationId":"getLibrary","summary":"The pick list of disciplines for each pillar","security":[{"bearerToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pillars":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tool-pillars":{"get":{"operationId":"getToolPillars","summary":"Where each tool sits on the app's Tools tab: a pillar (heart, soul, mind, strength, neighbor) or general","security":[{"bearerToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pillars":{"type":"object","additionalProperties":{"type":"string"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rule":{"get":{"operationId":"getRule","summary":"His personal 12:30+1, and whether a cohort season is where his account goes now","security":[{"bearerToken":["disciplines:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"disciplines":{"type":"array","items":{"type":"object","required":["pillar","title","cadence"],"properties":{"pillar":{"enum":["heart","soul","mind","strength","neighbor"]},"title":{"type":"string","maxLength":200},"cadence":{"enum":["daily","weekly","quarterly"],"description":"quarterly: weekly_target times in the quarter (a cohort season, or the calendar quarter), never missed or fined"},"weekly_target":{"type":"integer","minimum":1,"maximum":7,"description":"Weekly: times a week (1 to 7). Quarterly: times in the quarter (1 to 6)."},"days_mask":{"type":"integer","minimum":1,"maximum":127,"description":"Dailies: which days (bit 0 = Monday … bit 6 = Sunday); 127 = every day"},"link":{"enum":["prayer","people","journal","examen","neighbors","reading","books","verses","workouts","giving","heartcheck","pure",null],"description":"Using this tool keeps the discipline: a prayer time, checking off a People reminder, writing in the Journal, praying the Examen, connecting with one of his Eight Doors, reading a Scripture plan, logging in his Reading Log (books), reviewing a memory verse (verses), or a synced day of workouts that meets his threshold (workouts)"},"link_url":{"type":["string","null"],"maxLength":1000,"description":"Instead of a tool: another app or a web page its button opens (https://… or an app link like myapp://…). Opening it doesn't keep the discipline"},"link_label":{"type":["string","null"],"maxLength":30,"description":"The button's name for link_url"},"icon":{"type":["string","null"],"pattern":"^[a-z0-9-]{1,40}$","description":"One of the app's line icons, by name"}}}},"since":{"type":["string","null"],"format":"date"},"today":{"type":"string","format":"date"},"season":{"type":["object","null"]}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setRule","summary":"Set his personal 12:30+1 (at least one commitment, one or more daily; any pillar can wait). Turns on the 1230 tool. Unchanged disciplines carry on; changed ones end yesterday.","security":[{"bearerToken":["disciplines:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["disciplines"],"properties":{"disciplines":{"type":"array","items":{"type":"object","required":["pillar","title","cadence"],"properties":{"pillar":{"enum":["heart","soul","mind","strength","neighbor"]},"title":{"type":"string","maxLength":200},"cadence":{"enum":["daily","weekly","quarterly"],"description":"quarterly: weekly_target times in the quarter (a cohort season, or the calendar quarter), never missed or fined"},"weekly_target":{"type":"integer","minimum":1,"maximum":7,"description":"Weekly: times a week (1 to 7). Quarterly: times in the quarter (1 to 6)."},"days_mask":{"type":"integer","minimum":1,"maximum":127,"description":"Dailies: which days (bit 0 = Monday … bit 6 = Sunday); 127 = every day"},"link":{"enum":["prayer","people","journal","examen","neighbors","reading","books","verses","workouts","giving","heartcheck","pure",null],"description":"Using this tool keeps the discipline: a prayer time, checking off a People reminder, writing in the Journal, praying the Examen, connecting with one of his Eight Doors, reading a Scripture plan, logging in his Reading Log (books), reviewing a memory verse (verses), or a synced day of workouts that meets his threshold (workouts)"},"link_url":{"type":["string","null"],"maxLength":1000,"description":"Instead of a tool: another app or a web page its button opens (https://… or an app link like myapp://…). Opening it doesn't keep the discipline"},"link_label":{"type":["string","null"],"maxLength":30,"description":"The button's name for link_url"},"icon":{"type":["string","null"],"pattern":"^[a-z0-9-]{1,40}$","description":"One of the app's line icons, by name"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"disciplines":{"type":"array","items":{"type":"object","required":["pillar","title","cadence"],"properties":{"pillar":{"enum":["heart","soul","mind","strength","neighbor"]},"title":{"type":"string","maxLength":200},"cadence":{"enum":["daily","weekly","quarterly"],"description":"quarterly: weekly_target times in the quarter (a cohort season, or the calendar quarter), never missed or fined"},"weekly_target":{"type":"integer","minimum":1,"maximum":7,"description":"Weekly: times a week (1 to 7). Quarterly: times in the quarter (1 to 6)."},"days_mask":{"type":"integer","minimum":1,"maximum":127,"description":"Dailies: which days (bit 0 = Monday … bit 6 = Sunday); 127 = every day"},"link":{"enum":["prayer","people","journal","examen","neighbors","reading","books","verses","workouts","giving","heartcheck","pure",null],"description":"Using this tool keeps the discipline: a prayer time, checking off a People reminder, writing in the Journal, praying the Examen, connecting with one of his Eight Doors, reading a Scripture plan, logging in his Reading Log (books), reviewing a memory verse (verses), or a synced day of workouts that meets his threshold (workouts)"},"link_url":{"type":["string","null"],"maxLength":1000,"description":"Instead of a tool: another app or a web page its button opens (https://… or an app link like myapp://…). Opening it doesn't keep the discipline"},"link_label":{"type":["string","null"],"maxLength":30,"description":"The button's name for link_url"},"icon":{"type":["string","null"],"pattern":"^[a-z0-9-]{1,40}$","description":"One of the app's line icons, by name"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a valid 12:30+1","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/disciplines":{"get":{"operationId":"getDay","summary":"His disciplines for a day: due, kept or missed, effort, weekly progress, streak","security":[{"bearerToken":["disciplines:read"]}],"parameters":[{"name":"date","in":"query","schema":{"type":"string"},"description":"YYYY-MM-DD, \"today\" (default), or \"yesterday\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"One day of his personal rule","properties":{"sabbath":{"type":"boolean","description":"His Sabbath: nothing daily is due, and his streak holds"},"date":{"type":"string","format":"date"},"is_today":{"type":"boolean"},"writable":{"type":"boolean","description":"Open for giving account (today, and yesterday until 9am his time)"},"open_days":{"type":"array","items":{"type":"object"}},"account_given":{"type":"boolean"},"still_unset":{"type":"array","items":{"type":"integer"}},"streak":{"type":"integer"},"disciplines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"routines":{"type":"array","description":"His routines with a step that keeps this commitment","items":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"icon":{"type":["string","null"]}}}},"title":{"type":"string"},"pillar":{"type":"string"},"cadence":{"type":"string"},"due":{"type":["boolean","null"]},"status":{"enum":["kept","missed","not_set","not_logged"]},"effort":{"enum":["easy","fight","barely",null]},"this_week":{"type":"object"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Bad date","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/disciplines/{id}/status/{date}":{"put":{"operationId":"setStatus","summary":"Kept or missed (with effort) for one discipline on an open day. When every due daily has a status, the day's account is given.","security":[{"bearerToken":["disciplines:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Discipline id","schema":{"type":"integer","minimum":1}},{"name":"date","in":"path","required":true,"schema":{"type":"string"},"description":"YYYY-MM-DD, \"today\", or \"yesterday\""}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"enum":["kept","missed"]},"effort":{"enum":["easy","fight","barely"],"default":"easy"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string"},"updated":{"type":"array","items":{"type":"object"}},"skipped":{"type":"array","items":{"type":"object"}},"account_given":{"type":"boolean"},"just_given":{"type":"boolean"},"still_unset":{"type":"array","items":{"type":"object"}},"streak":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A cohort season is where his account goes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Closed day, or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/streak":{"get":{"operationId":"getStreak","summary":"His streak, and his last days: due, kept, given, still open","security":[{"bearerToken":["disciplines:read"]}],"parameters":[{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":60,"default":14}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"streak":{"type":"object","properties":{"current":{"type":"integer"},"best":{"type":"integer"}}},"days":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/quiet/guide":{"get":{"operationId":"quietGuide","summary":"Take it with you: a guide for his Quiet planned or under way, to use with the phone off. His most-run routine and its steps, the reading for each Quiet day (references from his reading plans' days, or a Psalm a day), and questions for journaling on paper by why he's going Quiet","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"quiet":{"type":"object"},"routine":{"type":["object","null"]},"reading":{"type":"object","description":"kind: plans (each plan's days) or psalms (a Psalm a day); each passage is a reference (ref, label)"},"questions":{"type":"array","items":{"type":"string"}},"draft":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No Quiet planned or under way","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/today":{"get":{"operationId":"getTodayLayout","summary":"His order for Today's sections and the ones he's hidden (Arrange Today). A section he hasn't placed sits at its default spot","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TodayLayout"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setTodayLayout","summary":"Arrange Today: his order for its sections, and the ones to hide (his 12:30+1 moves but never hides), or reset to the default","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":"array","items":{"type":"string"}},"hidden":{"type":"array","items":{"type":"string"}},"reset":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TodayLayout"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not Today's sections, a repeat, or hiding his 12:30+1","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/forge/eggs/{key}":{"post":{"operationId":"reportForgeEgg","summary":"His phone found an Easter egg only it can see: backwards (a routine checked off last to first) or gold (he prayed the Examen today; the server checks his routine, Heart check and gift). Only from Blade on","security":[{"bearerToken":["account"]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"enum":["backwards","gold"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"eggs":{"$ref":"#/components/schemas/ForgeEggs"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not at Blade yet, or the rest of the day isn't done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not one the app reports","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/forge":{"get":{"operationId":"getForge","summary":"His 12:30+1's forge: its stage, heat, the next stage, whether today's account is given, and a maker's mark per completed cohort season","security":[{"bearerToken":["disciplines:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"stage":{"enum":["ore","ingot","bar","blade","tempered"],"description":"Ingot at a 7-day streak, Bar 21, Blade 42, Tempered 84; kept once reached"},"stage_on":{"type":["string","null"],"format":"date","description":"The day he reached this stage (null: Ore, or reached before the forge kept dates)"},"heat":{"enum":["cold","warm","glowing","whitehot"],"description":"From the streak he's on now; one step cooler until today's account is given"},"streak":{"type":"integer"},"next":{"type":["object","null"],"properties":{"stage":{"type":"string"},"at":{"type":"integer"},"days_left":{"type":"integer"}},"description":"Null once Tempered"}}},{"type":"object","properties":{"given":{"type":"boolean"},"marks":{"type":"integer"},"eggs":{"$ref":"#/components/schemas/ForgeEggs"}}}]}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reminders":{"get":{"operationId":"listReminders","summary":"The people he means to reach out to, soonest first","security":[{"bearerToken":["reminders:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"reminders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"person":{"type":"string"},"cadence_days":{"type":"integer"},"next_due":{"type":"string","format":"date"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"contact":{"type":["object","null"],"properties":{"ref":{"type":"string"},"name":{"type":["string","null"]}}},"follow_through":{"type":"array","description":"His open Follow Through items for this person (GET /v1/reminders)","items":{"$ref":"#/components/schemas/FollowThrough"}}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createReminder","summary":"Add someone to reach out to, every cadence_days","security":[{"bearerToken":["reminders:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"person":{"type":"string","maxLength":100},"cadence_days":{"type":"integer","minimum":1,"maximum":366},"next_due":{"type":"string","format":"date"},"note":{"type":["string","null"],"maxLength":500}}},{"required":["person","cadence_days"]}]}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"type":"object","properties":{"reminder":{"type":"object","properties":{"id":{"type":"integer"},"person":{"type":"string"},"cadence_days":{"type":"integer"},"next_due":{"type":"string","format":"date"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"contact":{"type":["object","null"],"properties":{"ref":{"type":"string"},"name":{"type":["string","null"]}}},"follow_through":{"type":"array","description":"His open Follow Through items for this person (GET /v1/reminders)","items":{"$ref":"#/components/schemas/FollowThrough"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reminders/{id}":{"patch":{"operationId":"updateReminder","summary":"Change a reminder","security":[{"bearerToken":["reminders:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Reminder id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"person":{"type":"string","maxLength":100},"cadence_days":{"type":"integer","minimum":1,"maximum":366},"next_due":{"type":"string","format":"date"},"note":{"type":["string","null"],"maxLength":500}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"reminder":{"type":"object","properties":{"id":{"type":"integer"},"person":{"type":"string"},"cadence_days":{"type":"integer"},"next_due":{"type":"string","format":"date"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"contact":{"type":["object","null"],"properties":{"ref":{"type":"string"},"name":{"type":["string","null"]}}},"follow_through":{"type":"array","description":"His open Follow Through items for this person (GET /v1/reminders)","items":{"$ref":"#/components/schemas/FollowThrough"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"archiveReminder","summary":"Stop reminding him about this person","security":[{"bearerToken":["reminders:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Reminder id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Archived"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reminders/{id}/done":{"post":{"operationId":"reminderDone","summary":"He reached out: the next one is due a cadence from today","security":[{"bearerToken":["reminders:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Reminder id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"reminder":{"type":"object","properties":{"id":{"type":"integer"},"person":{"type":"string"},"cadence_days":{"type":"integer"},"next_due":{"type":"string","format":"date"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"contact":{"type":["object","null"],"properties":{"ref":{"type":"string"},"name":{"type":["string","null"]}}},"follow_through":{"type":"array","description":"His open Follow Through items for this person (GET /v1/reminders)","items":{"$ref":"#/components/schemas/FollowThrough"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/follow-through":{"get":{"operationId":"listFollowThrough","summary":"His Follow Through: open (dated first, then undated, newest first), older (undated, untouched for 21 days), kept (done) or sent; with counts of each. His alone: never shared, never part of an account","security":[{"bearerToken":["account"]}],"parameters":[{"name":"status","in":"query","schema":{"enum":["open","older","kept","sent"],"default":"open"}},{"name":"pillar","in":"query","schema":{"enum":["heart","soul","mind","strength","neighbor","general"]}},{"name":"person","in":"query","schema":{"type":"string","pattern":"^(person|subject):[0-9]+$"},"description":"person:<reminder id> or subject:<prayer subject id>"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string","format":"date"},"status":{"enum":["open","older","kept","sent"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/FollowThrough"}},"counts":{"type":"object","properties":{"open":{"type":"integer"},"older":{"type":"integer"},"kept":{"type":"integer"},"sent":{"type":"integer"}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addFollowThrough","summary":"Add an item, from wherever the thought came","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":280},"pillar":{"enum":["heart","soul","mind","strength","neighbor","general"],"default":"general"},"person":{"type":["object","null"],"description":"Who it's for: someone on People (person) or someone he prays for (subject), by id; or { name } alone for someone with neither (a man on a cohort's prayer list)","properties":{"target":{"enum":["person","subject"]},"id":{"type":"integer"},"name":{"type":"string","maxLength":200}}},"due_on":{"type":["string","null"],"description":"YYYY-MM-DD, today, or tomorrow (his time zone)"},"remind_at":{"type":["string","null"],"format":"date-time"}}},{"type":"object","required":["text"],"properties":{"source":{"enum":["manual","prayer","journal","reading","examen","routine","people"],"default":"manual"},"source_ref":{"type":["string","null"],"maxLength":100,"description":"What it came from: a prayer request or subject, a journal entry id (never its text), a reading enrollment, a routine run"}}}]}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/FollowThrough"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such person","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/follow-through/sent":{"post":{"operationId":"markFollowThroughSent","summary":"He sent these on to another app: Agōn stops tracking them (\"Sent\"). One-way, and idempotent: an item already sent is left alone","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ids","sent_to"],"properties":{"ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"integer"}},"sent_to":{"enum":["apple_reminders","todoist","other"]},"external_ids":{"type":"array","items":{"type":["string","null"]},"description":"Each item's id in the other app, in the order of ids"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"array","items":{"type":"integer"}},"already_sent":{"type":"array","items":{"type":"integer"}},"not_open":{"type":"array","items":{"type":"integer"},"description":"Done or dropped: left as they are"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/follow-through/{id}":{"get":{"operationId":"getFollowThrough","summary":"One item","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Item id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/FollowThrough"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateFollowThrough","summary":"Change an item, complete it (done), drop it, or open it again. Any change brings an Older item back","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Item id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":280},"pillar":{"enum":["heart","soul","mind","strength","neighbor","general"],"default":"general"},"person":{"type":["object","null"],"description":"Who it's for: someone on People (person) or someone he prays for (subject), by id; or { name } alone for someone with neither (a man on a cohort's prayer list)","properties":{"target":{"enum":["person","subject"]},"id":{"type":"integer"},"name":{"type":"string","maxLength":200}}},"due_on":{"type":["string","null"],"description":"YYYY-MM-DD, today, or tomorrow (his time zone)"},"remind_at":{"type":["string","null"],"format":"date-time"}}},{"type":"object","properties":{"status":{"enum":["open","done","dropped"]}}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/FollowThrough"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteFollowThrough","summary":"Delete an item (for a mistake)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Item id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/keys":{"get":{"operationId":"journalKeys","summary":"His journal keys (wrapped; the server can't open them) and his devices","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":["object","null"],"properties":{"recovery_wrapped":{"type":"string","contentEncoding":"base64","description":"The journal key, sealed under his recovery key"},"public_key":{"type":"string","contentEncoding":"base64","description":"His P-256 public key (for entries shared with him)"},"secret_wrapped":{"type":"string","contentEncoding":"base64","description":"The matching secret key, sealed under the journal key"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"devices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"public_key":{"type":"string","contentEncoding":"base64","description":"The device's P-256 public key"},"wrapped_key":{"type":["string","null"],"contentEncoding":"base64","description":"The journal key sealed to this device (after approval)"},"status":{"enum":["pending","active"]},"created_at":{"type":"string","format":"date-time"},"approved_at":{"type":["string","null"]},"last_seen_at":{"type":["string","null"]}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"createJournalKeys","summary":"Set his journal up, once, from his first device","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["recovery_wrapped","public_key","secret_wrapped","device"],"properties":{"recovery_wrapped":{"type":"string","contentEncoding":"base64","description":""},"public_key":{"type":"string","contentEncoding":"base64","description":""},"secret_wrapped":{"type":"string","contentEncoding":"base64","description":""},"device":{"type":"object","required":["id","name","public_key"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9]{8,40}$"},"name":{"type":"string","maxLength":80},"public_key":{"type":"string","contentEncoding":"base64","description":"The device's P-256 public key"}}}}}}}},"responses":{"201":{"description":"Set up","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":["object","null"],"properties":{"recovery_wrapped":{"type":"string","contentEncoding":"base64","description":"The journal key, sealed under his recovery key"},"public_key":{"type":"string","contentEncoding":"base64","description":"His P-256 public key (for entries shared with him)"},"secret_wrapped":{"type":"string","contentEncoding":"base64","description":"The matching secret key, sealed under the journal key"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"devices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"public_key":{"type":"string","contentEncoding":"base64","description":"The device's P-256 public key"},"wrapped_key":{"type":["string","null"],"contentEncoding":"base64","description":"The journal key sealed to this device (after approval)"},"status":{"enum":["pending","active"]},"created_at":{"type":"string","format":"date-time"},"approved_at":{"type":["string","null"]},"last_seen_at":{"type":["string","null"]}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already set up: enroll this device instead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/keys/recovery":{"put":{"operationId":"replaceJournalRecovery","summary":"A new recovery key (the old one stops working)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["recovery_wrapped"],"properties":{"recovery_wrapped":{"type":"string","contentEncoding":"base64","description":"The journal key sealed under the new recovery key"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":["object","null"],"properties":{"recovery_wrapped":{"type":"string","contentEncoding":"base64","description":"The journal key, sealed under his recovery key"},"public_key":{"type":"string","contentEncoding":"base64","description":"His P-256 public key (for entries shared with him)"},"secret_wrapped":{"type":"string","contentEncoding":"base64","description":"The matching secret key, sealed under the journal key"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"devices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"public_key":{"type":"string","contentEncoding":"base64","description":"The device's P-256 public key"},"wrapped_key":{"type":["string","null"],"contentEncoding":"base64","description":"The journal key sealed to this device (after approval)"},"status":{"enum":["pending","active"]},"created_at":{"type":"string","format":"date-time"},"approved_at":{"type":["string","null"]},"last_seen_at":{"type":["string","null"]}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not set up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/devices":{"post":{"operationId":"registerJournalDevice","summary":"Register this device: active if it unlocked with the recovery key, otherwise waiting for approval","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","name","public_key"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9]{8,40}$"},"name":{"type":"string","maxLength":80},"public_key":{"type":"string","contentEncoding":"base64","description":"The device's P-256 public key"}}},{"type":"object","properties":{"active":{"type":"boolean"}}}]}}}},"responses":{"201":{"description":"Registered","content":{"application/json":{"schema":{"type":"object","properties":{"device":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"public_key":{"type":"string","contentEncoding":"base64","description":"The device's P-256 public key"},"wrapped_key":{"type":["string","null"],"contentEncoding":"base64","description":"The journal key sealed to this device (after approval)"},"status":{"enum":["pending","active"]},"created_at":{"type":"string","format":"date-time"},"approved_at":{"type":["string","null"]},"last_seen_at":{"type":["string","null"]}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Journal not set up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/devices/{id}":{"get":{"operationId":"journalDevice","summary":"One device (a waiting device checks here for its wrapped key)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Device id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"device":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"public_key":{"type":"string","contentEncoding":"base64","description":"The device's P-256 public key"},"wrapped_key":{"type":["string","null"],"contentEncoding":"base64","description":"The journal key sealed to this device (after approval)"},"status":{"enum":["pending","active"]},"created_at":{"type":"string","format":"date-time"},"approved_at":{"type":["string","null"]},"last_seen_at":{"type":["string","null"]}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"revokeJournalDevice","summary":"Remove a device, or turn down a waiting one","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Device id","schema":{"type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/devices/{id}/approve":{"post":{"operationId":"approveJournalDevice","summary":"Approve a waiting device: send the journal key sealed to its public key","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Device id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["wrapped_key"],"properties":{"wrapped_key":{"type":"string","contentEncoding":"base64","description":""}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"device":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"public_key":{"type":"string","contentEncoding":"base64","description":"The device's P-256 public key"},"wrapped_key":{"type":["string","null"],"contentEncoding":"base64","description":"The journal key sealed to this device (after approval)"},"status":{"enum":["pending","active"]},"created_at":{"type":"string","format":"date-time"},"approved_at":{"type":["string","null"]},"last_seen_at":{"type":["string","null"]}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not waiting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/records":{"get":{"operationId":"pullJournal","summary":"Sealed records changed since a cursor, oldest change first","security":[{"bearerToken":["account"]}],"parameters":[{"name":"since","in":"query","schema":{"type":"integer","minimum":0,"default":0},"description":"The cursor from the previous pull"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"e:<id> (an entry) or j:<id> (a journal)"},"version":{"type":"integer"},"seq":{"type":"integer"},"data":{"type":["string","null"],"contentEncoding":"base64","description":"The sealed record (AES-256-GCM); null once deleted"},"deleted":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"}}}},"cursor":{"type":"integer"},"more":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"pushJournal","summary":"Write sealed records; a write based on a stale version comes back as a conflict","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["records"],"properties":{"records":{"type":"array","maxItems":200,"items":{"type":"object","required":["id","base_version","data"],"properties":{"id":{"type":"string"},"base_version":{"type":"integer","minimum":0,"description":"The version this write is based on (0 for new)"},"data":{"type":["string","null"],"contentEncoding":"base64","description":"Sealed; null deletes it for good"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ok":{"type":"boolean"},"version":{"type":"integer"},"seq":{"type":"integer"},"conflict":{"type":"object","properties":{"id":{"type":"string","description":"e:<id> (an entry) or j:<id> (a journal)"},"version":{"type":"integer"},"seq":{"type":"integer"},"data":{"type":["string","null"],"contentEncoding":"base64","description":"The sealed record (AES-256-GCM); null once deleted"},"deleted":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/summary":{"get":{"operationId":"journalSummary","summary":"What the server knows about his journal: how many records, how many bytes","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"integer"},"bytes":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/inbox":{"get":{"operationId":"journalInbox","summary":"What his Claude connector added and his app hasn't filed yet, each sealed to his account key (journals before their entries)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"kind":{"enum":["journal","entry"]},"journal_ref":{"type":["integer","null"]},"journal_filed_id":{"type":["string","null"]},"sealed":{"type":"string","description":"base64, sealed to journal_keys.public_key"},"created_at":{"type":"string","format":"date-time"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/inbox/filed":{"post":{"operationId":"journalInboxFiled","summary":"His app filed these into the journal (each became record_id); the server drops its sealed copies","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","maxItems":200,"items":{"type":"object","required":["id","record_id"],"properties":{"id":{"type":"integer"},"record_id":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"filed":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/usage":{"get":{"operationId":"journalUsage","summary":"His journal storage: sealed bytes used, and his quota","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"bytes":{"type":"integer"},"quota":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/media":{"post":{"operationId":"startJournalUpload","summary":"Start (or resume) uploading a sealed file: signed upload URLs, one per 4 MB chunk","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","bytes","chunks"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9]{8,40}$"},"bytes":{"type":"integer","description":"Sealed size"},"chunks":{"type":"integer","minimum":1,"maximum":100}}}}}},"responses":{"201":{"description":"Ready","content":{"application/json":{"schema":{"type":"object","properties":{"media":{"type":"object","properties":{"id":{"type":"string"},"bytes":{"type":"integer"},"chunks":{"type":"integer"},"status":{"enum":["uploading","complete"]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"]}}},"upload":{"type":"array","items":{"type":"string","format":"uri"},"description":"PUT each sealed chunk here (good for an hour)"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Over his storage quota","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Media storage not set up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/media/{id}":{"get":{"operationId":"downloadJournalMedia","summary":"Signed download URLs for a file's sealed chunks, in order","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"File id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"media":{"type":"object","properties":{"id":{"type":"string"},"bytes":{"type":"integer"},"chunks":{"type":"integer"},"status":{"enum":["uploading","complete"]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"]}}},"download":{"type":"array","items":{"type":"string","format":"uri"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Still uploading","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteJournalMedia","summary":"Delete a file for good","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"File id","schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/media/{id}/complete":{"post":{"operationId":"completeJournalUpload","summary":"Every chunk is up: checked against storage, and the file is his","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"File id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"media":{"type":"object","properties":{"id":{"type":"string"},"bytes":{"type":"integer"},"chunks":{"type":"integer"},"status":{"enum":["uploading","complete"]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"]}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Parts missing, or sizes don't add up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/blob/{token}":{"put":{"operationId":"putJournalBlob","summary":"Development only (Spaces in production): store one sealed chunk; the signed token is the permission","security":[],"parameters":[{"name":"token","in":"path","required":true,"description":"A signed, expiring token naming one chunk","schema":{"type":"string"}}],"responses":{"200":{"description":"Stored"},"403":{"description":"Invalid or expired link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getJournalBlob","summary":"Development only (Spaces in production): one sealed chunk","security":[],"parameters":[{"name":"token","in":"path","required":true,"description":"A signed, expiring token naming one chunk","schema":{"type":"string"}}],"responses":{"200":{"description":"The sealed bytes","content":{"application/octet-stream":{}}},"404":{"description":"Not found or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/recipients":{"get":{"operationId":"journalRecipients","summary":"His cohorts and the partners in each who can receive a shared entry (with their public keys)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cohorts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"label":{"type":"string"},"brothers":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer"},"name":{"type":"string"},"public_key":{"type":["string","null"],"contentEncoding":"base64","description":"Null until he sets up his journal"}}}}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/shares":{"get":{"operationId":"journalShares","summary":"Shares he made (who, when, read or not) and shares made to him (sealed)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"granted":{"type":"array","items":{"type":"object"}},"received":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createJournalShare","summary":"Share a sealed snapshot of one entry with partners; each gets the share key sealed to his public key","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","data","recipients"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9]{8,40}$"},"data":{"type":"string","contentEncoding":"base64","description":"The entry snapshot, sealed with the share key"},"cohort_id":{"type":["integer","null"]},"recipients":{"type":"array","maxItems":100,"items":{"type":"object","required":["user_id","wrapped_key"],"properties":{"user_id":{"type":"integer"},"wrapped_key":{"type":"string","contentEncoding":"base64","description":"The share key sealed to his public key"}}}}}}}}},"responses":{"201":{"description":"Shared","content":{"application/json":{"schema":{"type":"object","properties":{"share":{"type":"object","properties":{"id":{"type":"string"},"recipients":{"type":"integer"}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not one of his partners or cohorts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/shares/{id}":{"delete":{"operationId":"revokeJournalShare","summary":"Revoke a share: the sealed snapshot and keys are deleted","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"File id","schema":{"type":"string"}}],"responses":{"204":{"description":"Revoked"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/shares/{id}/read":{"post":{"operationId":"readJournalShare","summary":"He opened a share made to him","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"File id","schema":{"type":"string"}}],"responses":{"204":{"description":"Marked read"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/wrote":{"post":{"operationId":"journalWrote","summary":"He wrote an entry today: keep any 12:30+1 discipline he linked to the Journal","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kept":{"type":"array","items":{"type":"integer"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer":{"get":{"operationId":"prayerOverview","summary":"His lists (his own and his cohorts'), each with his settings and counts; his Inbox; how many answered","security":[{"bearerToken":["prayer:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"lists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"look":{"type":"object","description":"How he has it look: color (lists), an emoji or photo icon, a banner photo. URLs are signed and short-lived.","properties":{"color":{"type":["string","null"],"pattern":"^#[0-9a-f]{6}$"},"icon":{"type":["string","null"],"description":"An emoji"},"icon_url":{"type":["string","null"],"format":"uri"},"banner_url":{"type":["string","null"],"format":"uri"}}},"kind":{"enum":["personal","cohort"]},"mine":{"type":"boolean"},"settings":{"type":"object","properties":{"per_session":{"type":"integer","minimum":0,"maximum":20,"description":"Subjects a \"by lists\" session takes from this list (default 1)"},"days_mask":{"type":"integer","minimum":1,"maximum":127,"description":"Days it's in sessions: bit 0 = Monday … bit 6 = Sunday; 127 = every day"},"in_sessions":{"type":"boolean"},"sort":{"type":"integer"},"archived":{"type":"boolean"}}},"subject_count":{"type":"integer"},"request_count":{"type":"integer"}}}},"inbox":{"type":"object","properties":{"id":{"type":["integer","null"]},"count":{"type":"integer"}}},"answered":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/feeds":{"post":{"operationId":"followPrayerFeed","summary":"Follow an RSS or Atom feed as a prayer list: each item is something to pray for, newest first (one a session by default). The server fetches it hourly","security":[{"bearerToken":["prayer:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"name":{"type":"string","maxLength":100}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already following it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a feed, or not reachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/lists/{id}":{"get":{"operationId":"prayerList","summary":"One list: its subjects (on a cohort's list, each man), each with its active requests","security":[{"bearerToken":["prayer:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"List id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"look":{"type":"object","description":"How he has it look: color (lists), an emoji or photo icon, a banner photo. URLs are signed and short-lived.","properties":{"color":{"type":["string","null"],"pattern":"^#[0-9a-f]{6}$"},"icon":{"type":["string","null"],"description":"An emoji"},"icon_url":{"type":["string","null"],"format":"uri"},"banner_url":{"type":["string","null"],"format":"uri"}}},"kind":{"enum":["personal","cohort"]},"mine":{"type":"boolean"},"settings":{"type":"object","properties":{"per_session":{"type":"integer","minimum":0,"maximum":20,"description":"Subjects a \"by lists\" session takes from this list (default 1)"},"days_mask":{"type":"integer","minimum":1,"maximum":127,"description":"Days it's in sessions: bit 0 = Monday … bit 6 = Sunday; 127 = every day"},"in_sessions":{"type":"boolean"},"sort":{"type":"integer"},"archived":{"type":"boolean"}}},"subject_count":{"type":"integer"},"request_count":{"type":"integer"}}},"subjects":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"kind":{"enum":["subject","man","request"],"description":"subject: on his list; man: a man on a cohort's list; request: a request with no subject"},"id":{"type":["integer","null"]},"user_id":{"type":["integer","null"]},"name":{"type":"string"},"note":{"type":["string","null"]},"look":{"type":"object","description":"How he has it look: color (lists), an emoji or photo icon, a banner photo. URLs are signed and short-lived.","properties":{"color":{"type":["string","null"],"pattern":"^#[0-9a-f]{6}$"},"icon":{"type":["string","null"],"description":"An emoji"},"icon_url":{"type":["string","null"],"format":"uri"},"banner_url":{"type":["string","null"],"format":"uri"}}},"contact":{"type":["object","null"],"properties":{"ref":{"type":"string"},"name":{"type":["string","null"]}}},"list":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"color":{"type":["string","null"]}}},"requests":{"type":"array","items":{"$ref":"#/components/schemas/Request"}},"last_prayed_at":{"type":["string","null"],"format":"date-time"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"renamePrayerList","summary":"Rename one of his lists","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"List id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":100}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deletePrayerList","summary":"Delete one of his lists and everything on it","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"List id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/lists/{id}/settings":{"put":{"operationId":"prayerListSettings","summary":"His settings for a list: subjects per session, which days, in sessions or not, archived","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"List id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"per_session":{"type":"integer","minimum":0,"maximum":20,"description":"Subjects a \"by lists\" session takes from this list (default 1)"},"days_mask":{"type":"integer","minimum":1,"maximum":127,"description":"Days it's in sessions: bit 0 = Monday … bit 6 = Sunday; 127 = every day"},"in_sessions":{"type":"boolean"},"sort":{"type":"integer"},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"per_session":{"type":"integer","minimum":0,"maximum":20,"description":"Subjects a \"by lists\" session takes from this list (default 1)"},"days_mask":{"type":"integer","minimum":1,"maximum":127,"description":"Days it's in sessions: bit 0 = Monday … bit 6 = Sunday; 127 = every day"},"in_sessions":{"type":"boolean"},"sort":{"type":"integer"},"archived":{"type":"boolean"}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/order":{"put":{"operationId":"orderPrayerLists","summary":"Put his lists in this order","security":[{"bearerToken":["prayer:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["list_ids"],"properties":{"list_ids":{"type":"array","items":{"type":"integer"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/subjects":{"post":{"operationId":"createSubject","summary":"Add a subject (who or what he prays for) to one of his lists","security":[{"bearerToken":["prayer:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["list_id","name"],"properties":{"list_id":{"type":"integer"},"name":{"type":"string","maxLength":100},"note":{"type":["string","null"],"maxLength":2000}}}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/subjects/{id}":{"patch":{"operationId":"updateSubject","summary":"Rename, note, move to another list, or archive a subject","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Subject id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"note":{"type":["string","null"]},"list_id":{"type":"integer"},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteSubject","summary":"Delete a subject and its requests","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Subject id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/inbox":{"get":{"operationId":"prayerInbox","summary":"What's waiting in his Inbox, to sort onto a list","security":[{"bearerToken":["prayer:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"list_id":{"type":"integer"},"requests":{"type":"array","items":{"$ref":"#/components/schemas/Request"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addToPrayerInbox","summary":"Quick capture: a request into his Inbox","security":[{"bearerToken":["prayer:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","maxLength":140},"body":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/Request"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/gratitude":{"get":{"operationId":"prayerGratitude","summary":"Gratitude: answered requests, praises, and requests tagged praise or gratitude he can see (and, for the app, his partner's shared list), newest first","security":[{"bearerToken":["prayer:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"id":{"type":"integer"},"source":{"enum":["mine","cohort","shared","partner"]},"title":{"type":"string"},"body":{"type":["string","null"]},"answer_note":{"type":["string","null"]},"answered":{"type":"boolean"},"answered_at":{"type":["string","null"],"format":"date-time"},"at":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"type":"string"}},"who":{"type":["string","null"],"description":"The brother's or partner's first name; null for his own"},"subject":{"type":["string","null"],"description":"The subject the request is on (a person or thing), if any"},"list":{"type":["string","null"],"description":"The list it's on; null for the Inbox"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/session":{"get":{"operationId":"prayerSession","summary":"A prayer session: urgent requests, his Inbox, then subjects (least recently prayed first)","security":[{"bearerToken":["prayer:read"]}],"parameters":[{"name":"mode","in":"query","schema":{"enum":["lists","time"],"default":"lists"},"description":"lists: each list due today gives its per-session subjects. time: lists take turns until every subject has come up (the app stops at the time)."},{"name":"lists","in":"query","schema":{"type":"string"},"description":"Comma-separated list ids (default: every list in his sessions)"},{"name":"urgent","in":"query","schema":{"enum":["0","1"],"default":"1"}},{"name":"inbox","in":"query","schema":{"enum":["0","1"],"default":"1"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"enum":["lists","time"]},"urgent":{"type":"array","items":{"$ref":"#/components/schemas/Request"}},"inbox":{"type":"array","items":{"$ref":"#/components/schemas/Request"}},"subjects":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"kind":{"enum":["subject","man","request"],"description":"subject: on his list; man: a man on a cohort's list; request: a request with no subject"},"id":{"type":["integer","null"]},"user_id":{"type":["integer","null"]},"name":{"type":"string"},"note":{"type":["string","null"]},"look":{"type":"object","description":"How he has it look: color (lists), an emoji or photo icon, a banner photo. URLs are signed and short-lived.","properties":{"color":{"type":["string","null"],"pattern":"^#[0-9a-f]{6}$"},"icon":{"type":["string","null"],"description":"An emoji"},"icon_url":{"type":["string","null"],"format":"uri"},"banner_url":{"type":["string","null"],"format":"uri"}}},"contact":{"type":["object","null"],"properties":{"ref":{"type":"string"},"name":{"type":["string","null"]}}},"list":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"color":{"type":["string","null"]}}},"requests":{"type":"array","items":{"$ref":"#/components/schemas/Request"}},"last_prayed_at":{"type":["string","null"],"format":"date-time"}}}},"more":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"kind":{"enum":["subject","man","request"],"description":"subject: on his list; man: a man on a cohort's list; request: a request with no subject"},"id":{"type":["integer","null"]},"user_id":{"type":["integer","null"]},"name":{"type":"string"},"note":{"type":["string","null"]},"look":{"type":"object","description":"How he has it look: color (lists), an emoji or photo icon, a banner photo. URLs are signed and short-lived.","properties":{"color":{"type":["string","null"],"pattern":"^#[0-9a-f]{6}$"},"icon":{"type":["string","null"],"description":"An emoji"},"icon_url":{"type":["string","null"],"format":"uri"},"banner_url":{"type":["string","null"],"format":"uri"}}},"contact":{"type":["object","null"],"properties":{"ref":{"type":"string"},"name":{"type":["string","null"]}}},"list":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"color":{"type":["string","null"]}}},"requests":{"type":"array","items":{"$ref":"#/components/schemas/Request"}},"last_prayed_at":{"type":["string","null"],"format":"date-time"}}},"description":"By lists: who would come next, in order, if he asks for more"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/images":{"post":{"operationId":"newPrayerImage","summary":"A slot for one photo (an icon or banner): PUT the JPEG (5 MB at most) to upload_url, then name its key in a look","security":[{"bearerToken":["prayer:write"]}],"responses":{"201":{"description":"Ready","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"upload_url":{"type":"string","format":"uri"},"max_bytes":{"type":"integer"},"content_type":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Photos unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/looks":{"put":{"operationId":"setPrayerLook","summary":"Set how a list, subject, or partner looks for him (fields left out stay; null clears)","security":[{"bearerToken":["prayer:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["target","id"],"properties":{"target":{"enum":["list","subject","man"]},"id":{"type":"integer","description":"List id, subject id, or the partner's user id"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"icon_image":{"type":["string","null"],"description":"A key from /v1/prayer/images"},"banner_image":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"look":{"type":"object","description":"How he has it look: color (lists), an emoji or photo icon, a banner photo. URLs are signed and short-lived.","properties":{"color":{"type":["string","null"],"pattern":"^#[0-9a-f]{6}$"},"icon":{"type":["string","null"],"description":"An emoji"},"icon_url":{"type":["string","null"],"format":"uri"},"banner_url":{"type":["string","null"],"format":"uri"}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/prayer/prayed":{"post":{"operationId":"prayedFor","summary":"He prayed for a subject and/or requests (keeps a discipline linked to Prayer)","security":[{"bearerToken":["prayer:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject_id":{"type":["integer","null"]},"user_id":{"type":["integer","null"],"description":"A partner prayed for by name (a cohort list's man)"},"request_ids":{"type":"array","items":{"type":"integer"},"description":"Requests deleted since he saw them are skipped"}}}}}},"responses":{"201":{"description":"Recorded","content":{"application/json":{"schema":{"type":"object","properties":{"prayed":{"type":"integer"},"kept_disciplines":{"type":"array","items":{"type":"integer"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/push":{"post":{"operationId":"registerPushDevice","summary":"Register this phone for push notifications (its Expo push token). A phone that changes hands moves to whoever is signed in","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token","platform"],"properties":{"token":{"type":"string"},"platform":{"enum":["ios","android"]},"name":{"type":"string","maxLength":80}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"prompt_push":{"type":"boolean"},"prompt_slack":{"type":"boolean"},"phones":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/push/{token}":{"delete":{"operationId":"removePushDevice","summary":"This phone stops getting his notifications (signing out)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/news":{"get":{"operationId":"cohortNews","summary":"Whether he has asked for email about Agōn cohorts, since when, and the words he would agree to","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"opted_in":{"type":"boolean"},"since":{"type":["string","null"],"format":"date-time"},"wording":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setCohortNews","summary":"Say yes (or no) to email about Agōn cohorts. Off by default; we keep when, where he was asked (source), and the exact wording","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["opt_in","source"],"properties":{"opt_in":{"type":"boolean"},"source":{"type":"string","enum":["invite","partners","me"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"opted_in":{"type":"boolean"},"since":{"type":["string","null"],"format":"date-time"},"wording":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/notify":{"get":{"operationId":"notifySettings","summary":"How he's reminded: the evening prompt by push and/or Slack, and how many phones are registered","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"prompt_push":{"type":"boolean"},"prompt_slack":{"type":"boolean"},"phones":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"saveNotifySettings","summary":"Change how he's reminded (Slack still goes when push has no phone to reach)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt_push":{"type":"boolean"},"prompt_slack":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"prompt_push":{"type":"boolean"},"prompt_slack":{"type":"boolean"},"phones":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/examen/done":{"post":{"operationId":"examenDone","summary":"He prayed the Daily Examen: keep the discipline he linked to it (his own or his season's), today. No content is sent; what he prays stays in his encrypted journal","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kept_disciplines":{"type":"array","items":{"type":"integer"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/examen/people":{"get":{"operationId":"examenPeople","summary":"Who he can ask to call him: his captain, and the men in his cohorts","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/examen/talk":{"post":{"operationId":"examenTalk","summary":"\"I need to talk\": tell his captain or a man in his cohort he'd like a call tonight (push and Slack). Nothing else is shared; once an evening per person","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to"],"properties":{"to":{"oneOf":[{"const":"captain"},{"type":"integer"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a cohort, or not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/linkout":{"get":{"operationId":"linkOut","summary":"May this phone link to buying a membership on agon1230.com? On iPhone, only on the US App Store (and only while Mark has it on); never on Android; always on the web","security":[{"bearerToken":["account"]}],"parameters":[{"name":"platform","in":"query","schema":{"enum":["ios","android","web"]}},{"name":"storefront","in":"query","schema":{"type":"string"},"description":"The App Store storefront country, ISO 3166-1 alpha-3 (USA)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"allowed":{"type":"boolean"},"join_url":{"type":["string","null"]},"tag":{"type":"boolean","description":"Add ?utm_source=ios_app&utm_medium=link_out to billing links"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/chat/unread":{"get":{"operationId":"chatUnread","summary":"Unread chat messages in each of his cohorts that talk in the app (for the Partners tab badge; also cards.chat on Home). total leaves out muted cohorts; an ended cohort (live false) is listed for its history but counts 0","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cohorts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string"},"label":{"type":"string"},"unread":{"type":"integer"},"muted":{"type":"boolean"},"live":{"type":"boolean"}}}},"total":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohorts/{id}/chat":{"get":{"operationId":"cohortChat","summary":"His cohort's chat, newest first, with reactions, his read marker and who each author is. before= pages back; after= returns what he missed (the oldest first within the page; has_more says to ask again). Includes the cohort's earlier seasons he was part of. Live updates come over the socket at /v1/chat/socket (send {\"type\":\"auth\",\"token\":\"aga_…\"} first, then {\"type\":\"viewing\",\"cohort_id\":N} while the chat is on screen)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}},{"name":"before","in":"query","schema":{"type":"integer"}},{"name":"after","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cohort":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string"},"label":{"type":"string"},"talk":{"enum":["slack","app"]},"read_only":{"type":"boolean"},"can_post":{"type":"boolean"},"captain":{"type":"boolean","description":"He captains it: he may remove messages"},"call":{"type":["object","null"],"description":"This week's call, from an hour before it starts until it ends (for \"Join the call\" pinned at the top): as a pre-call card's data.call"}}},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}},"has_more":{"type":"boolean"},"read":{"type":"object","properties":{"last_read_id":{"type":"integer"},"muted":{"type":"boolean"}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his cohorts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postChat","summary":"Post a message. Idempotent on client_id: sending the same one again returns the first (200, not 201). Refused for a cohort that talks in Slack (409 talks_in_slack), a read-only chat (409 read_only), or a man who isn't one of its committed men or its captain (403)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body","client_id"],"properties":{"body":{"type":"string","minLength":1,"maxLength":4000},"reply_to":{"type":["integer","null"]},"client_id":{"type":"string","pattern":"^[\\w-]{1,64}$","description":"The app's own id for this message, so a resend never doubles it"}}}}}},"responses":{"200":{"description":"Already posted (same client_id)","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/ChatMessage"}}}}}},"201":{"description":"Posted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/ChatMessage"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed to post here","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his cohorts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Talks in Slack, or read-only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohorts/{id}/chat/read":{"put":{"operationId":"readChat","summary":"Move his read marker forward (never back)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["last_read_id"],"properties":{"last_read_id":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"last_read_id":{"type":"integer"},"muted":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his cohorts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohorts/{id}/chat/mute":{"put":{"operationId":"muteChat","summary":"Mute (or unmute) this cohort's chat pushes. An SOS still comes","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["muted"],"properties":{"muted":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"last_read_id":{"type":"integer"},"muted":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his cohorts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohorts/{id}/mission":{"get":{"operationId":"mission","summary":"His home cohort's mission cause: the nominations with their votes, his own vote, and whether nominations are open (weeks 1 to 6)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mission"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his home cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohorts/{id}/nominations":{"post":{"operationId":"nominate","summary":"Nominate a cause for the mission jar (weeks 1 to 6). The cohort hears of it (a card in its chat, or its Slack channel)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":120},"url":{"type":"string","description":"https:// link"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mission"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his home cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Closed, or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohorts/{id}/vote":{"put":{"operationId":"vote","summary":"Vote for a nomination (one vote each; voting again changes it). The vote card shows the new count","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["nomination_id"],"properties":{"nomination_id":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mission"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his home cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not one of this cohort's nominations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/chat/{messageId}":{"patch":{"operationId":"editChat","summary":"Edit his own message, within 15 minutes","security":[{"bearerToken":["account"]}],"parameters":[{"name":"messageId","in":"path","required":true,"description":"Message id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":4000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/ChatMessage"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Too late, or deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteChat","summary":"Delete his own message (any time), or, as the cohort's captain, remove someone else's. It stays as \"message deleted\"","security":[{"bearerToken":["account"]}],"parameters":[{"name":"messageId","in":"path","required":true,"description":"Message id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/ChatMessage"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not his, and not his cohort to captain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/chat/{messageId}/reactions/{emoji}":{"put":{"operationId":"reactChat","summary":"React to a message","security":[{"bearerToken":["account"]}],"parameters":[{"name":"messageId","in":"path","required":true,"description":"Message id","schema":{"type":"integer","minimum":1}},{"name":"emoji","in":"path","required":true,"schema":{"enum":["like","pray","love","strong","fire","laugh"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/ChatMessage"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Deleted, or read-only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"unreactChat","summary":"Take his reaction back","security":[{"bearerToken":["account"]}],"parameters":[{"name":"messageId","in":"path","required":true,"description":"Message id","schema":{"type":"integer","minimum":1}},{"name":"emoji","in":"path","required":true,"schema":{"enum":["like","pray","love","strong","fire","laugh"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/ChatMessage"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reports":{"post":{"operationId":"report","summary":"Report something a partner shared with him (a prayer request or update, a takeaway, an SOS note, a journal entry shared with him, a chat message) or the man himself. Mark is told at once; the reporter stops seeing it. block: true also blocks the man","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","id","reason"],"properties":{"kind":{"enum":["request","update","takeaway","sos","journal_share","man","book_takeaway","message"]},"id":{"type":["integer","string"],"description":"The item's id (a journal share's is text), or the man's user id"},"reason":{"enum":["offensive","harassment","spam","unsafe","other"]},"note":{"type":"string","maxLength":1000},"content":{"type":"string","description":"For an encrypted journal entry: its text, only if he chooses to send it"},"block":{"type":"boolean"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"reported":{"type":"boolean"},"hidden":{"type":"boolean"},"blocked":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not shared with him","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/blocks":{"get":{"operationId":"blocks","summary":"The men he has blocked","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/blocks/{userId}":{"put":{"operationId":"block","summary":"Block a man: his shared prayer requests, takeaways, SOS calls, and journal shares are hidden from him. The cohort's captain and Mark are told","security":[{"bearerToken":["account"]}],"parameters":[{"name":"userId","in":"path","required":true,"description":"The man's user id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his partners","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"unblock","summary":"Unblock a man","security":[{"bearerToken":["account"]}],"parameters":[{"name":"userId","in":"path","required":true,"description":"The man's user id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/ai":{"get":{"operationId":"journalAiAccess","summary":"Whether he gets the journal's AI (summarize voice notes, clean up dictation, suggest a title, Go deeper): it comes with a live Agōn membership, or when Mark switches the voice_ai feature on for him","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"voice_ai":{"type":"boolean"},"reason":{"type":["string","null"],"enum":["member","captain","switched_on",null]}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/ai/summary":{"post":{"operationId":"summarizeVoiceNote","summary":"Summarize a voice note's transcript with AI (Agōn members, or the voice_ai feature). Transcribing happens on his phone; only this text is sent, on his tap, and nothing is stored","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":30000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":["string","null"]},"summary":{"type":"string"},"points":{"type":"array","items":{"type":"string"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not a member, and not switched on for him","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Too short or too long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Not set up on this server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/ai/cleanup":{"post":{"operationId":"cleanUpDictation","summary":"Clean up dictated words (J6): punctuation, casing, filler and recognizer slips, with nothing added and the meaning unchanged. The app shows him the diff to accept, edit or reject. Sent only on his tap; nothing is stored or logged","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":30000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium required (feature: voice_ai)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Empty or too long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The AI failed, or its answer added too much (his words are unchanged)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Not set up on this server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/ai/title":{"post":{"operationId":"suggestJournalTitle","summary":"Suggest a title for his entry from its text (J6; he accepts it or not). Sent only on his tap; nothing is stored or logged","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":30000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":100}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium required (feature: voice_ai)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Too short or too long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The AI failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Not set up on this server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/ai/deeper":{"post":{"operationId":"goDeeper","summary":"\"Go deeper\" (J6): one question about what he wrote, which he may insert into the entry. Never a rewrite. Sent only on his tap; nothing is stored or logged","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":30000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","maxLength":300}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium required (feature: voice_ai)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Too short or too long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The AI failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Not set up on this server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/ai/throughline":{"post":{"operationId":"startThroughLine","summary":"Through Line (Premium): start a read of a span of his entries for the themes that keep coming back across months. The app sends the text (his journal is sealed on the server); it goes to the AI once and nothing is stored or logged. Three a day, one at a time; collect it with the job id","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["span","entries"],"properties":{"span":{"enum":[3,6,12]},"entries":{"type":"array","maxItems":2000,"items":{"type":"object","required":["id","date","text"],"properties":{"id":{"type":"string"},"date":{"type":"string","format":"date"},"title":{"type":"string"},"text":{"type":"string","maxLength":20000}}}}}}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"string"},"entries":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already reading","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid or too much","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/ai/throughline/{job}":{"get":{"operationId":"collectThroughLine","summary":"Collect a Through Line read: working until it's ready, then the overview and themes (name, summary, trend, months, entry ids, his words), once; it's forgotten as it's handed over","security":[{"bearerToken":["account"]}],"parameters":[{"name":"job","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["working","done","error"]},"overview":{"type":"string"},"themes":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or already collected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/journal/ai/prompt":{"post":{"operationId":"freshJournalPrompt","summary":"A fresh daily prompt for a pillar, written by AI (J7). Only the pillar is sent, never anything he wrote; nothing is stored or logged","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["pillar"],"properties":{"pillar":{"enum":["heart","soul","mind","strength","neighbor"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","maxLength":200}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium required (feature: voice_ai)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Unknown pillar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The AI failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Not set up on this server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/bible/passage":{"post":{"operationId":"biblePassage","summary":"A Scripture reference he typed (in his journal): the text to insert, in the translation he wrote after it if Agōn has it (WEB, BSB, KJV) or else his memorizing translation, and the link that opens it in his Bible app. Only the reference is sent; nothing is stored","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ref"],"properties":{"ref":{"type":"string","maxLength":80,"description":"OSIS (Amos.4.12) or as written (Amos 4:12)"},"translation":{"type":"string","maxLength":8}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ref":{"type":"string","description":"OSIS"},"label":{"type":"string"},"text":{"type":["string","null"]},"translation":{"type":["string","null"]},"url":{"type":["string","null"]},"note":{"type":["string","null"],"description":"Why there is no text (a whole chapter, too many verses)"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/doors":{"get":{"operationId":"doors","summary":"Eight Doors: his two grids (home and work) and his circles (Premium: a team, a class, a group), each door's name, level (1 name, 2 story, 3 friend), notes, last connection, and ties; counts and a next step","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"home":{"type":"object"},"work":{"type":"object"},"circles":{"type":"array","items":{"type":"object","description":"id, name, icon, doors, names, stories, friends, next"}},"max_circles":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/doors/circles":{"post":{"operationId":"createCircle","summary":"Add a circle beyond Home and Work (Premium; up to max_circles). The cohort board never counts circles","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":40},"icon":{"enum":["people","team","school","book","gym","music","coffee","tools","heart","flag"],"default":"people"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"circle":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Premium required (feature: circles)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid, or he has the most circles there can be","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/doors/circles/order":{"put":{"operationId":"orderCircles","summary":"Put his circles in order","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"integer"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"circles":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not every circle, once each","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/doors/circles/{id}":{"patch":{"operationId":"updateCircle","summary":"Rename a circle or change its icon (works on Free too, for circles he already has)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Circle id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":40},"icon":{"enum":["people","team","school","book","gym","music","coffee","tools","heart","flag"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"circle":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteCircle","summary":"Delete a circle: every door on it is cleared (name, notes, connections, prayer subject, reminder, contact link)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Circle id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/doors/{grid}/{position}":{"put":{"operationId":"setDoor","summary":"Name a door, or change its level or notes. Its subject on his \"Eight Doors\" prayer list follows its name","security":[{"bearerToken":["account"]}],"parameters":[{"name":"grid","in":"path","required":true,"schema":{"oneOf":[{"enum":["home","work"]},{"type":"integer","description":"One of his circles"}]}},{"name":"position","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":8},"description":"1 north, clockwise to 8 northwest"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"level":{"enum":[1,2,3]},"notes":{"type":["string","null"],"maxLength":2000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"door":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"clearDoor","summary":"Clear a door: its name, notes, connections, prayer subject, reminder, and contact link","security":[{"bearerToken":["account"]}],"parameters":[{"name":"grid","in":"path","required":true,"schema":{"oneOf":[{"enum":["home","work"]},{"type":"integer","description":"One of his circles"}]}},{"name":"position","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":8}}],"responses":{"204":{"description":"Cleared"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No door there","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/doors/{id}/connect":{"post":{"operationId":"connectDoor","summary":"He connected with this door today (an optional note). Keeps the discipline he linked to Eight Doors, his own or his season's","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Door id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":["string","null"],"maxLength":500}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"door":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/doors/{id}/connections":{"get":{"operationId":"doorConnections","summary":"When he connected with this door, and his notes (newest first)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Door id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/doors/{id}/reminder":{"post":{"operationId":"doorReminder","summary":"A People reminder to reach out to this door every so many days (or change how often)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Door id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cadence_days":{"type":"integer","minimum":1,"maximum":366}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"door":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/books":{"get":{"operationId":"books","summary":"His Reading Log: what he's reading (with progress: pages read and percent, or minutes this week; today's log) and his finished shelf, and whether his cohort sees what he's reading","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string","format":"date"},"share_reading":{"type":"boolean"},"reading":{"type":"array","items":{"$ref":"#/components/schemas/Book"}},"finished":{"type":"array","items":{"$ref":"#/components/schemas/Book"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addBook","summary":"Put a book (or audiobook, article, course) on his shelf","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","maxLength":200},"author":{"type":["string","null"],"maxLength":200},"kind":{"enum":["book","audiobook","article","course"]},"total_pages":{"type":["integer","null"],"minimum":1,"maximum":100000},"started_on":{"type":"string","format":"date"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"book":{"$ref":"#/components/schemas/Book"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/books/sharing":{"put":{"operationId":"setBookSharing","summary":"Show his cohorts what he's reading (titles only), or stop","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["share_reading"],"properties":{"share_reading":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"share_reading":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/books/{id}":{"get":{"operationId":"book","summary":"One book and every day he logged it (newest first)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Book id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"book":{"$ref":"#/components/schemas/Book"},"logs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"date":{"type":"string","format":"date"},"pages":{"type":["integer","null"]},"minutes":{"type":["integer","null"]},"takeaway":{"type":["string","null"]},"shared":{"type":"boolean"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateBook","summary":"Change a book; status finished or dropped takes it off his current shelf (today), reading puts it back","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Book id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"title":{"type":"string","maxLength":200},"author":{"type":["string","null"],"maxLength":200},"kind":{"enum":["book","audiobook","article","course"]},"total_pages":{"type":["integer","null"],"minimum":1,"maximum":100000},"started_on":{"type":"string","format":"date"},"status":{"enum":["reading","finished","dropped"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"book":{"$ref":"#/components/schemas/Book"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteBook","summary":"Take a book off his log, with every day he logged it","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Book id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/books/{id}/logs/{date}":{"put":{"operationId":"logReading","summary":"Log a day's reading (pages or minutes, an optional takeaway, shared with his cohorts if he chooses). Logging the same day again replaces its number. Keeps the disciplines he linked to the Reading Log on that date while it's open (until 9am the next morning), once","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Book id","schema":{"type":"integer","minimum":1}},{"name":"date","in":"path","required":true,"schema":{"type":"string"},"description":"today, yesterday, or YYYY-MM-DD (not after today)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pages":{"type":"integer","minimum":1,"maximum":5000},"minutes":{"type":"integer","minimum":1,"maximum":1440},"takeaway":{"type":["string","null"],"maxLength":280},"share":{"type":"boolean","description":"Share the takeaway with his cohorts"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"book":{"$ref":"#/components/schemas/Book"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"unlogReading","summary":"Remove a day's log (a discipline it kept stays kept)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Book id","schema":{"type":"integer","minimum":1}},{"name":"date","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Nothing logged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/giving":{"get":{"operationId":"giving","summary":"His Generosity log for a month (his current month by default): the entries (newest first), money given against his monthly goal, how many times he gave, the time he gave, and the last 12 months' totals. His alone, never shared","security":[{"bearerToken":["account"]}],"parameters":[{"name":"month","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"description":"YYYY-MM"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string","format":"date"},"month":{"type":"string"},"goal_cents":{"type":["integer","null"]},"given_cents":{"type":"integer"},"acts":{"type":"integer"},"minutes":{"type":"integer"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/Gift"}},"months":{"type":"array"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid month","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addGift","summary":"Log something he gave: money (amount_cents), time (minutes), a meal, or something else. Keeps the disciplines he linked to the Generosity log on that date while it's open (until 9am the next morning), once","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["money","time","meal","other"],"description":"money unless he says"},"what":{"type":"string","maxLength":280,"description":"What he gave or did"},"toward":{"type":["string","null"],"maxLength":120,"description":"Who or where it was for"},"amount_cents":{"type":["integer","null"],"minimum":1,"maximum":100000000,"description":"Money: the amount, in cents (needed for money)"},"minutes":{"type":["integer","null"],"minimum":1,"maximum":1440,"description":"Time: how long"},"date":{"type":"string","description":"today (default), yesterday, or YYYY-MM-DD within the last year"}},"required":["what"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"entry":{"$ref":"#/components/schemas/Gift"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/giving/goal":{"put":{"operationId":"setGivingGoal","summary":"His monthly giving goal, in cents (null: no goal)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["goal_cents"],"properties":{"goal_cents":{"type":["integer","null"],"minimum":1,"maximum":100000000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"goal_cents":{"type":["integer","null"]}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/giving/{id}":{"patch":{"operationId":"updateGift","summary":"Change an entry in his Generosity log","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Entry id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["money","time","meal","other"],"description":"money unless he says"},"what":{"type":"string","maxLength":280,"description":"What he gave or did"},"toward":{"type":["string","null"],"maxLength":120,"description":"Who or where it was for"},"amount_cents":{"type":["integer","null"],"minimum":1,"maximum":100000000,"description":"Money: the amount, in cents (needed for money)"},"minutes":{"type":["integer","null"],"minimum":1,"maximum":1440,"description":"Time: how long"},"date":{"type":"string","description":"today (default), yesterday, or YYYY-MM-DD within the last year"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"entry":{"$ref":"#/components/schemas/Gift"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteGift","summary":"Delete an entry from his Generosity log","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Entry id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/heart-check/words":{"get":{"operationId":"heartCheckWords","summary":"The Heart check's word list, by family (lament, trust, thanksgiving), and how many words he can name at once","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"type":"boolean"},"max":{"type":"integer"},"families":{"type":"array"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/heart-check":{"get":{"operationId":"heartChecks","summary":"His recent Heart checks (newest first), and whether he's checked in today. His alone, never shared","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string","format":"date"},"checked_today":{"type":"boolean"},"checks":{"type":"array","items":{"$ref":"#/components/schemas/HeartCheck"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"heartCheck","summary":"Check in: name 1 to 3 words from the list, and get the Psalms that match (the first is the one to read: its verses in his translation, and a link to the whole Psalm in his Bible app). Keeps the disciplines he linked to the Heart check today, once","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["words"],"properties":{"words":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"string"},"description":"Word keys from GET /v1/heart-check/words"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"check":{"$ref":"#/components/schemas/HeartCheck"},"psalms":{"type":"array","items":{"$ref":"#/components/schemas/Psalm"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No words, too many, or not on the list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/heart-check/{id}":{"get":{"operationId":"heartCheckDetail","summary":"One Heart check again, with its Psalms (the one he was offered first)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Check id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"check":{"$ref":"#/components/schemas/HeartCheck"},"psalms":{"type":"array","items":{"$ref":"#/components/schemas/Psalm"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteHeartCheck","summary":"Delete a Heart check","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Check id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/verses":{"get":{"operationId":"verses","summary":"Verse a Week: the verses he's memorizing (his cohorts' verses of the week are added when he opens it), what's due today, his cohorts' verses, and his translation (WEB by default; BSB, KJV)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string","format":"date"},"translation":{"type":"string"},"translations":{"type":"array"},"due":{"type":"array","items":{"$ref":"#/components/schemas/Verse"}},"verses":{"type":"array","items":{"$ref":"#/components/schemas/Verse"}},"cohort":{"type":"array"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addVerse","summary":"Add a verse he picked (due today)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ref":{"type":"string","description":"As he writes it (\"Romans 12:2\", \"Prov 3:5-6\") or OSIS"},"translation":{"enum":["WEB","BSB","KJV","OWN"]},"own_text":{"type":["string","null"],"maxLength":2000},"own_label":{"type":["string","null"],"maxLength":20}},"required":["ref"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"verse":{"$ref":"#/components/schemas/Verse"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already on his list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a verse, a whole chapter, more than 8 verses, or OWN without its text","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/daily-verse":{"get":{"operationId":"dailyVerse","summary":"The Verse of the Day: one verse a day, the same for everyone, rotating through the pillars; in his Verse a Week translation, tidied for the card (a stray quote mark dropped, first letter capitalized, a trailing comma or dash made a period). `memorizing`: it's on his Verse a Week list (POST /v1/verses adds it)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"date","in":"query","schema":{"type":"string","format":"date"},"description":"Within 7 days of his today; his today by default"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date"},"pillar":{"enum":["heart","soul","mind","strength","neighbor"]},"ref":{"type":"string","description":"OSIS"},"label":{"type":"string"},"translation":{"enum":["WEB","BSB","KJV"]},"text":{"type":"string"},"draft":{"type":"boolean","description":"The list is still being reviewed"},"memorizing":{"type":"boolean"},"chapter":{"type":"object","properties":{"ref":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","description":"Opens the chapter in his Bible app"}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a date, or more than a week from his today","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/verses/today":{"get":{"operationId":"versesDue","summary":"The verses due for review today","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string","format":"date"},"due":{"type":"array","items":{"$ref":"#/components/schemas/Verse"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/verses/settings":{"put":{"operationId":"setVerseTranslation","summary":"The translation he memorizes in (for verses he adds from now on)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["translation"],"properties":{"translation":{"enum":["WEB","BSB","KJV"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/verses/{id}":{"get":{"operationId":"verse","summary":"One verse and his recent reviews (date, game, score)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Verse id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"verse":{"$ref":"#/components/schemas/Verse"},"reviews":{"type":"array"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateVerse","summary":"Change the translation he's learning it in, or the text he pasted","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Verse id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"translation":{"enum":["WEB","BSB","KJV","OWN"]},"own_text":{"type":["string","null"],"maxLength":2000},"own_label":{"type":["string","null"],"maxLength":20}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"verse":{"$ref":"#/components/schemas/Verse"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"removeVerse","summary":"Take a verse off his list","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Verse id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Removed"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/verses/{id}/games/{game}":{"get":{"operationId":"verseGame","summary":"A round of a game for this verse; the same seed deals the same round (fade, first letters, word order, fill the gap, reference match)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Verse id","schema":{"type":"integer","minimum":1}},{"name":"game","in":"path","required":true,"schema":{"enum":["fade","first_letters","word_order","fill_gap","reference_match"]}},{"name":"seed","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"game":{"type":"string"},"seed":{"type":"integer"},"verse":{"$ref":"#/components/schemas/Verse"},"round":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/verses/{id}/reviews":{"post":{"operationId":"reviewVerse","summary":"He played a game: the server scores it (0-100; 80 is correct). A review that's due moves the Leitner schedule (box up, or back to 1); any review keeps the discipline he linked to Verse a Week, today","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Verse id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"enum":["fade","first_letters","word_order","fill_gap","reference_match"]},"seed":{"type":"integer","minimum":1},"answer":{"type":"object","description":"fade: { typed } or { self: all|most|some|none }; first_letters: { typed }; word_order: { taps: [tile index] }; fill_gap: { picks: [word] }; reference_match: { pairs: { verse id: ref } }"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"score":{"type":"integer"},"correct":{"type":"boolean"},"counted":{"type":"boolean"},"verse":{"$ref":"#/components/schemas/Verse"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workouts":{"get":{"operationId":"workouts","summary":"His phone's daily workout summaries (minutes, kinds, steps, source apps) since a date, and what a day needs to keep each discipline he linked to workouts","security":[{"bearerToken":["account"]}],"parameters":[{"name":"since","in":"query","schema":{"type":"string","format":"date"},"description":"Two weeks back by default; at most 90 days"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string","format":"date"},"days":{"type":"array"},"thresholds":{"type":"array"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workouts/{date}":{"put":{"operationId":"syncWorkoutDay","summary":"His phone's summary of one day (from Apple Health or Health Connect). Only these fields are stored; anything else is ignored. Keeps each discipline he linked to workouts whose threshold the day meets, while the day is open (until 9am the next morning); never marks one missed","security":[{"bearerToken":["account"]}],"parameters":[{"name":"date","in":"path","required":true,"schema":{"type":"string"},"description":"YYYY-MM-DD in his timezone, or today"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["minutes"],"properties":{"minutes":{"type":"integer","minimum":0,"maximum":1440},"kinds":{"type":"array","maxItems":12,"items":{"type":"string","maxLength":40}},"steps":{"type":["integer","null"],"minimum":0,"maximum":200000},"sources":{"type":"array","maxItems":8,"items":{"type":"string","maxLength":60}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"day":{"type":"object"},"kept_disciplines":{"type":"array","items":{"type":"integer"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A future day, more than 30 days back, or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workouts/thresholds/{disciplineId}":{"put":{"operationId":"setWorkoutThreshold","summary":"What a day needs to keep this discipline (linked to workouts): minutes of workouts (20 by default) or steps","security":[{"bearerToken":["account"]}],"parameters":[{"name":"disciplineId","in":"path","required":true,"description":"Discipline id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","amount"],"properties":{"kind":{"enum":["minutes","steps"]},"amount":{"type":"integer","minimum":1}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"threshold":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his discipline linked to workouts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/verse-sets":{"get":{"operationId":"verseSets","summary":"Agōn's starter sets (and his own), each verse with its text","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/verse-sets/{id}/add":{"post":{"operationId":"addVerseSet","summary":"Add a set's verses to his list (any he has stay as they are)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Set id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/bible":{"get":{"operationId":"bibleSettings","summary":"Where \"Read\" opens: his Bible app (YouVersion, Logos, Blue Letter Bible, or the web) and translation","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setBibleSettings","summary":"Change his Bible app and translation","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reader":{"enum":["youversion","logos","blb","web"]},"translation":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/plans":{"get":{"operationId":"readingPlans","summary":"Reading plans he can read (Agōn's, his cohort's), with his enrollment in each","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/plans/today":{"get":{"operationId":"todaysReading","summary":"Every plan he's reading: today's day and passages (labels and links into his Bible app; no text), whether he's read it, how far behind, what to read next","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/plans/{id}":{"get":{"operationId":"readingPlan","summary":"A plan, day by day (passage labels and links)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Plan id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/plans/{id}/enroll":{"post":{"operationId":"enrollInPlan","summary":"Start reading a plan (from today, or start_date), optionally with a cohort, and optionally keeping one of his disciplines","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Plan id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"start_date":{"type":"string","format":"date"},"start_day":{"type":"integer","minimum":1,"description":"Pick up mid-stream: today is this day of the plan; the days before it count as read elsewhere"},"discipline_id":{"type":["integer","null"]},"slot_id":{"type":["integer","null"]}}}}}},"responses":{"201":{"description":"Enrolled","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already reading it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/enrollments/{id}":{"patch":{"operationId":"updateEnrollment","summary":"Change which discipline a plan keeps, which day he's on (today_day: picking up mid-stream; his reads here stay), or stop reading it","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Enrollment id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"discipline_id":{"type":["integer","null"]},"today_day":{"type":"integer","minimum":1},"ended":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/enrollments/{id}/catch-up":{"post":{"operationId":"catchUp","summary":"Skip to today: the days he missed stop counting as behind (he can still read them). Never a miss or a fine","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Enrollment id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/enrollments/{id}/reads/{day}":{"put":{"operationId":"markRead","summary":"He read a day (today, or yesterday until 9am): keeps his linked discipline for that date. An optional one-line takeaway, shared with his cohort if he says so","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Enrollment id","schema":{"type":"integer","minimum":1}},{"name":"day","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"enum":["today","yesterday"]},"takeaway":{"type":"string","maxLength":280},"share":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid day","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"unmarkRead","summary":"Take back a read (his discipline's mark stays as it is)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Enrollment id","schema":{"type":"integer","minimum":1}},{"name":"day","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/membership":{"get":{"operationId":"membership","summary":"His membership: status, cohort and week, rate, payment method, invoices and what's coming, the mission jar, his invite link, seats held for friends, and next season (404 not_member). Paying stays on agon1230.com (manage_url)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No membership","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/membership/seats":{"post":{"operationId":"holdSeats","summary":"Hold seats in his slot for friends before his cohort starts; each is emailed an invitation to apply","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["people"],"properties":{"people":{"type":"array","items":{"type":"object","required":["name","email"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No membership","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid, or no room","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/membership/seats/{id}":{"delete":{"operationId":"releaseSeat","summary":"Release a seat he held (not once that man has been accepted)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Seat hold id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Already accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/membership/billing-link":{"post":{"operationId":"billingLink","summary":"\"Manage billing\": a one-time link (5 minutes) to agon1230.com/billing, opened in the browser. Billing is the one thing that stays on the website.","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expires_in":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No membership","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/membership/renewal":{"put":{"operationId":"renew","summary":"Next season (from week 10): continue with his partners, switch cohorts, or not this time. Continuing or switching needs recommit: true (the covenant)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["choice"],"properties":{"choice":{"enum":["continue","switch","done"]},"slot_id":{"type":["integer","null"]},"recommit":{"type":"boolean"},"note":{"type":"string","maxLength":1000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No membership","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not open yet, or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohort":{"get":{"operationId":"cohortBoard","summary":"The last week in each of his cohorts, only what the channel already shows: who gave account, dailies kept of due, weekly targets hit, streaks, and each man's forge (stage, heat, marks) (404 not_member when he has no cohort)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohort/partners/{memberId}":{"get":{"operationId":"cohortPartner","summary":"One partner's page: what he shares, his forge and last week as the channel shows it, his 12:30+1 where the roster is on, the badges he shows, his prayer items (unspoken ones show only that he asked), and Encourage's lines. memberId \"me\" is his own page as a partner sees it","security":[{"bearerToken":["account"]}],"parameters":[{"name":"memberId","in":"path","required":true,"schema":{"type":"string"},"description":"His membership id (from /v1/cohort or /v1/cohort/contacts), or \"me\""}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his partners, the contact list isn't open yet, or a man he blocked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohort/partners/{memberId}/encourage":{"post":{"operationId":"encouragePartner","summary":"Encourage: one of the page's lines (by its words or index) to his phone as a push, wherever the cohort talks. Three a day to the same man; nothing reaches a man in Quiet","security":[{"bearerToken":["account"]}],"parameters":[{"name":"memberId","in":"path","required":true,"description":"His membership id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["line"],"properties":{"line":{"type":["string","integer"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"boolean"},"pushed":{"type":"integer"},"quiet":{"type":"boolean"},"left_today":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his partners","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"He isn't on the app (not_reachable)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not one of the lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohort/quiet/{memberId}/welcome":{"post":{"operationId":"welcomeBack","summary":"Welcome a brother back from Quiet (one on the board's back list): a push to him, once per brother per Quiet","security":[{"bearerToken":["account"]}],"parameters":[{"name":"memberId","in":"path","required":true,"description":"His membership id (from /v1/cohort back)","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"welcomed":{"type":"boolean"},"pushed":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in his cohort, or not back from Quiet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Himself","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohort/calls":{"get":{"operationId":"cohortCalls","summary":"The call schedule: each of the 12 weeks with its date and where it meets, the next call, and the calendar (.ics) link","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohort/prayer":{"get":{"operationId":"cohortPrayer","summary":"His cohorts' prayer lists (praying for, praises), each one's Watchman, what he may do to each item, and earlier seasons' items","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addCohortPrayer","summary":"Add a request or praise to one of his cohorts' lists, or all of them. Refreshes the cohorts' Prayer & Praise canvases in Slack.","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["request","praise"]},"body":{"type":"string","maxLength":500},"unspoken":{"type":"boolean"},"cohorts":{"oneOf":[{"type":"array","items":{"type":"integer"}},{"const":"all"}]}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No cohort list open","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Empty, or which cohort?","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohort/prayer/{id}/{action}":{"post":{"operationId":"actOnCohortPrayer","summary":"still (still praying: asked again in two weeks), answered (with an optional note), closed (no longer needed), edit, or delete","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Item id","schema":{"type":"integer","minimum":1}},{"name":"action","in":"path","required":true,"schema":{"enum":["still","answered","closed","edit","delete"]}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"},"body":{"type":"string"},"unspoken":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not his item, and he isn't its Watchman or captain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Gone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/rule":{"get":{"operationId":"seasonRule","summary":"His season's 12:30+1 by pillar (draft, locked, or closed), earlier versions, the cohort's rule settings (read-only), and its pick list","security":[{"bearerToken":["disciplines:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addToSeasonRule","summary":"Add a discipline to a locked rule: dailies count from tomorrow, weeklies from his next cohort week. Mark is told.","security":[{"bearerToken":["disciplines:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["pillar","title","cadence"],"properties":{"pillar":{"enum":["heart","soul","mind","strength","neighbor"]},"title":{"type":"string"},"cadence":{"enum":["daily","weekly","quarterly"],"description":"quarterly: weekly_target times in the quarter (a cohort season, or the calendar quarter), never missed or fined"},"weekly_target":{"type":"integer"},"days_mask":{"type":"integer"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not locked, already there, or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/rule/{id}":{"patch":{"operationId":"changeSeasonRule","summary":"Reword or strengthen one (more days, a higher target); never lighter. Mark is told.","security":[{"bearerToken":["disciplines:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Discipline id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"weekly_target":{"type":"integer"},"days_mask":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Lighter, unchanged, or not locked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/report":{"get":{"operationId":"seasonReport","summary":"His season report (final the morning week 12 closes; a preview before), a suggestion per discipline, and the one question","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/report/reflection":{"put":{"operationId":"saveReflection","summary":"His answer to \"What changed in you this season?\", and whether (and how) he may be quoted","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"body":{"type":"string","maxLength":3000},"may_quote":{"type":"boolean"},"quote_as":{"enum":["name","initials","anonymous"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No report yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Empty or too long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/progress":{"get":{"operationId":"progress","summary":"His progress: for a season, its weeks, effort, his fade note, calls, grace, and mission jar ({ season: null } without one)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/texts":{"get":{"operationId":"textSettings","summary":"Text messages to him (evening reminder, SOS alerts) and his people at home","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"saveTextSettings","summary":"Save his number and which texts he wants (a new opt-in gets a confirmation text)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":["string","null"]},"reminder":{"type":"boolean"},"sos":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a mobile number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/texts/note":{"put":{"operationId":"saveHomeNote","summary":"A note for his next weekly report to his people at home (then it clears)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":["string","null"],"maxLength":160}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/texts/home":{"post":{"operationId":"addHomeContact","summary":"Invite someone at home: answers an invitation link he sends them; they sign up themselves","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":80}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No name, or the limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/texts/home/{id}":{"delete":{"operationId":"removeHomeContact","summary":"Remove someone (they aren't told)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Contact id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/plan":{"get":{"operationId":"myPlan","summary":"Agōn Standard (free) or Premium, and why (a purchase, a comp, his cohort, captaining); his limits, what he uses, and the prices","security":[{"bearerToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"tier":{"enum":["free","premium"]},"premium":{"type":"object"},"limits":{"type":"object","description":"null: no limit"},"usage":{"type":"object"},"features":{"type":"object"},"prices":{"type":"object"},"trial_available":{"type":"boolean"},"revenuecat_app_user_id":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner":{"get":{"operationId":"partner","summary":"His accountability partner (streak, today, titles if shared), their prayer list, and this week's check-ins; or his open invite","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"endPartner","summary":"End the partnership (his partner is told)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No partner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/invite":{"post":{"operationId":"partnerInvite","summary":"A new invite link for the man he asks (14 days, once; the last link stops working)","security":[{"bearerToken":["account"]}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already has a partner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/invites/{token}":{"get":{"operationId":"partnerInvitePreview","summary":"Who sent this invite, and needs_premium (neither of them has Premium, which a partnership takes on one side)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such invite","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Expired or used","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/accept":{"post":{"operationId":"partnerAccept","summary":"Accept an invite (one of the two needs Premium)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Neither has Premium (premium_required, feature partner)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"One of them already has a partner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Expired or used","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/sharing":{"put":{"operationId":"partnerSharing","summary":"Whether his partner sees his discipline titles (his streak is always shared)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["share_titles"],"properties":{"share_titles":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/nudge":{"post":{"operationId":"partnerNudge","summary":"Cheer him on: a push (3 a day)","security":[{"bearerToken":["account"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":300}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/pray-now":{"post":{"operationId":"partnerPrayNow","summary":"\"Pray for me now\": a push, and a text too when he has Premium and his partner signed up for SOS texts","security":[{"bearerToken":["account"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":300}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pushed":{"type":"integer"},"texted":{"type":"integer"},"sms":{"enum":["sent","premium","not_signed_up","not_sent"]}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/prayers":{"post":{"operationId":"partnerAddPrayer","summary":"Add to their prayer list (his partner is told)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"body":{"type":"string","maxLength":500}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/prayers/{id}":{"delete":{"operationId":"partnerRemovePrayer","summary":"Take his own request down","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Request id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/prayers/{id}/prayed":{"post":{"operationId":"partnerPrayed","summary":"He prayed for it (the one who asked hears, once a day)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Request id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/prayers/{id}/answer":{"post":{"operationId":"partnerAnswerPrayer","summary":"Mark his own request answered, with a line of praise","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Request id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/rule":{"get":{"operationId":"partnerRule","summary":"His accountability partner's 12:30+1 by pillar, with today's line and his streak, if his partner shares his titles (403 not_shared if not). Never effort, misses, fines, his journal or contacts. Sends an ETag","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterEntry"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The pair is paused: neither has Premium","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"His partner keeps his commitments to himself (not_shared)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No partner yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/rule/visibility":{"get":{"operationId":"ruleVisibility","summary":"His own 12:30+1 exactly as his cohort sees it on its roster, and as his partner sees it (if he shares his titles), with his requests waiting on his captain","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cohort":{"type":["object","null"],"properties":{"id":{"type":"integer"},"label":{"type":"string"},"code":{"type":"string"},"sees":{"$ref":"#/components/schemas/RosterEntry"}}},"partner":{"type":["object","null"],"properties":{"shares_titles":{"type":"boolean"},"sees":{"oneOf":[{"$ref":"#/components/schemas/RosterEntry"},{"type":"null"}]}}},"pending":{"type":"array","items":{"$ref":"#/components/schemas/Amendment"}},"note":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/privacy":{"get":{"operationId":"privacy","summary":"What his partners see: the covenant his cohort and captain always see (account, streak, forge, 12:30+1), each choice beyond it with its value and options, what he decides each time, and what is never shared","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"covenant":{"type":"object","properties":{"items":{"type":"array","items":{"type":"string"}},"why":{"type":"string"}}},"choices":{"type":"array","items":{"type":"object","properties":{"key":{"enum":["contact","reading_titles","read_today","verse","doors","badges","partner_titles"]},"label":{"type":"string"},"help":{"type":"string"},"value":{"type":"string"},"default":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}}}},"available":{"type":"boolean"}}}},"each_time":{"type":"array","items":{"type":"string"}},"never":{"type":"array","items":{"type":"string"}},"in_cohort":{"type":"boolean"},"has_partner":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setPrivacy","summary":"Change any of his choices (cohort, captain or only_me; partner or only_me for partner_titles). The covenant can't be changed here","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["choices"],"properties":{"choices":{"type":"object","additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a choice, not one of its options, or not available to him","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/god-says-i-am":{"get":{"operationId":"godSaysIAm","summary":"His \"God says I am\" acrostic as he saved it: his name, the letters it follows (A to Z, up to 12), and the word he chose for each. Null until he saves one. His alone; never in partner or cohort data","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"oneOf":[{"$ref":"#/components/schemas/GodSaysIAm"},{"type":"null"}]}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"saveGodSaysIAm","summary":"Keep his name and a word for each of its letters (the app picks them from its word bank). Replaces what was there","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","words"],"properties":{"name":{"type":"string","maxLength":60},"words":{"type":"array","items":{"type":"string"},"description":"One for each letter of the cleaned name, in order"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"$ref":"#/components/schemas/GodSaysIAm"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Bad input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteGodSaysIAm","summary":"Clear his \"God says I am\"","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/badges/catalog":{"get":{"operationId":"badgeCatalog","summary":"Every badge: its group, tiers in forge metals, what earns it, its verse, and who sees it by default. No sign-in needed","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"}}}},"badges":{"type":"array","items":{"$ref":"#/components/schemas/Badge"}}}}}}}}}},"/v1/badges":{"get":{"operationId":"badges","summary":"His badge case: every badge with his progress (value, the tiers he has earned and when, the next tier and how far), whether it shows and where it is pinned; badges earned since his phone last celebrated (new), and how many earned from his history are waiting for one card (backfilled). Checks for new ones first","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array"},"badges":{"type":"array","items":{"type":"object"}},"new":{"type":"array","items":{"$ref":"#/components/schemas/BadgeEarned"}},"backfilled":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/badges/celebrated":{"post":{"operationId":"badgesCelebrated","summary":"His phone has shown these badges (or every one waiting, with all: true)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"all":{"type":"boolean"},"badges":{"type":"array","maxItems":100,"items":{"type":"object","required":["key","tier"],"properties":{"key":{"type":"string"},"tier":{"type":"integer"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/badges/{key}":{"put":{"operationId":"setBadge","summary":"Show or hide one badge (not the covenant ones), or pin an earned one to his forge (1 to 3; null unpins). Returns his badge case","security":[{"bearerToken":["account"]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shown":{"type":"boolean"},"pin":{"type":["integer","null"],"enum":[1,2,3,null]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such badge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/badges/{key}/share":{"post":{"operationId":"shareBadge","summary":"He tapped Share: his cohorts hear it, as a badge card in an app cohort's chat or one line in its Slack channel. At most once a day per cohort: a second badge the same day joins that day's card in the app, and waits for tomorrow in Slack. Sharing a badge he kept to himself shows it to his partners","security":[{"bearerToken":["account"]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"posted_to":{"type":"array","items":{"type":"string"}},"waiting":{"type":"array","items":{"type":"string"},"description":"Slack cohorts that already heard from him today"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such badge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not earned yet (not_earned), or not in a cohort (no_cohort)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/rule/amendments":{"post":{"operationId":"proposeAmendment","summary":"Ask his captain to retire a commitment, or make it lighter (fewer days, or a lower target). Adding, rewording and strengthening he does himself (POST and PATCH /v1/season/rule). His captain hears at once. While his captain has the 12:30+1 open (rule-window), it applies at once instead (applied: true)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["commitment_id","kind","reason"],"properties":{"commitment_id":{"type":"integer"},"kind":{"enum":["retire","lighten"]},"reason":{"type":"string","maxLength":500},"weekly_target":{"type":"integer","minimum":1,"description":"Lighten a weekly or quarterly"},"days_mask":{"type":"integer","minimum":1,"maximum":127,"description":"Lighten a daily: fewer days"}}}}}},"responses":{"201":{"description":"Asked (or, while open, applied)","content":{"application/json":{"schema":{"type":"object","properties":{"amendment":{"$ref":"#/components/schemas/Amendment"},"applied":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a cohort (not_member), or the roster isn't on for it (not_enabled)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already asked about this one","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not something he can ask (it would fall short of his cohort's rule, or isn't lighter)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/rule/amendments/{id}":{"delete":{"operationId":"withdrawAmendment","summary":"Take back a request his captain hasn't answered yet","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Amendment id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"withdrawn":{"const":true}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not waiting on his captain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohorts/{id}/roster":{"get":{"operationId":"cohortRoster","summary":"Every man's 12:30+1 in a cohort, by pillar (a draft before lock-in), with what the cohort already sees: today's account and dailies kept of due, streak, weekly targets hit. Captain first, then by name. For its men until 14 days after the season ends; its captain and Mark always. Never effort, misses, fines, his journal or contacts. Sends an ETag","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cohort":{"type":"object","properties":{"id":{"type":"integer"},"label":{"type":"string"},"code":{"type":"string"},"read_only":{"type":"boolean","description":"Its season is over"},"talk":{"enum":["slack","app"],"description":"Where it talks (Message opens its chat, or its Slack channel)"},"channel_url":{"type":["string","null"]}}},"men":{"type":"array","items":{"$ref":"#/components/schemas/RosterEntry"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his cohorts (not_found), or the roster isn't on for it yet (not_enabled)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohorts/{id}/amendments":{"get":{"operationId":"cohortAmendments","summary":"For its captain (or Mark): requests to retire or lighten a commitment, waiting ones first, then the last ones decided","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"amendments":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Amendment"},{"type":"object","properties":{"man":{"type":"object","properties":{"member_id":{"type":"integer"},"name":{"type":"string"},"first_name":{"type":"string"}}},"commitment":{"type":"object","properties":{"title":{"type":"string"},"cadence":{"type":"string"},"weekly_target":{"type":["integer","null"]},"days_mask":{"type":["integer","null"]}}}}}]}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"He doesn't captain it (not_captain)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohorts/{id}/amendments/{amendmentId}/decision":{"post":{"operationId":"decideAmendment","summary":"Its captain (or Mark) approves or declines a request. Approving applies it: a daily from tomorrow, a weekly after this cohort week; days already judged never move. The man hears either way, with the note","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}},{"name":"amendmentId","in":"path","required":true,"description":"Amendment id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["approve"],"properties":{"approve":{"type":"boolean"},"note":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"amendment":{"$ref":"#/components/schemas/Amendment"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort, or not its request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already answered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"It can't be applied now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/partner/checkin":{"put":{"operationId":"partnerCheckin","summary":"His check-in for this week: 1 (a hard week) to 5, and a line","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["rating"],"properties":{"rating":{"type":"integer","minimum":1,"maximum":5},"note":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/premium/checkout":{"post":{"operationId":"premiumCheckout","summary":"Start Premium on the web: a Stripe Checkout link (with the 7-day trial if he hasn't had one), or Lifetime (one payment; a subscriber can switch to it, and his web subscription then ends at its period's end)","security":[{"bearerToken":["account"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"enum":["monthly","yearly","lifetime"],"default":"monthly"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"He already has Premium, or Lifetime (already_premium)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Lifetime isn't on sale on the web yet (not_ready)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/premium/portal":{"post":{"operationId":"premiumPortal","summary":"Manage a web Premium subscription (Stripe's customer portal)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not billed on the web (not_web), or Lifetime, which has nothing to manage (lifetime)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/premium/sync":{"post":{"operationId":"premiumSync","summary":"After a purchase or restore in the app: ask RevenueCat where he stands, then his plan","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tips":{"get":{"operationId":"tipOptions","summary":"Say thanks: the stores' tip products, the web's amounts and range, and how many gifts he has sent","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"type":"string"}},"web_amounts":{"type":"array","items":{"type":"object"}},"min_cents":{"type":"integer"},"max_cents":{"type":"integer"},"given":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tips/checkout":{"post":{"operationId":"tipCheckout","summary":"A gift on the web: a Stripe Checkout link for one payment of amount_cents (unlocks nothing)","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount_cents"],"properties":{"amount_cents":{"type":"integer","minimum":100,"maximum":50000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An amount outside the range (invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/revenuecat":{"post":{"operationId":"revenuecatWebhook","summary":"RevenueCat's notifications about App Store and Google Play purchases (checked by its Authorization header)","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Bad authorization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"RevenueCat isn't set up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/tokens":{"get":{"operationId":"listApiTokens","summary":"His personal API tokens (an app session only)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"makeApiToken","summary":"Make one: shown once, in token","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","scopes"],"properties":{"name":{"type":"string","maxLength":80},"scopes":{"type":"array","items":{"type":"string"}},"expires_days":{"type":["integer","null"]}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No name or no scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/tokens/{id}":{"delete":{"operationId":"revokeApiToken","summary":"Revoke one","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Token id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/connector":{"get":{"operationId":"connector","summary":"His Claude connector (MCP): on or off","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"makeConnector","summary":"Make a new connector link (shown once; the old one stops working; what it may do carries over)","security":[{"bearerToken":["account"]}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not in a cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setConnector","summary":"What the connector may do: journal lets it add to his journal (sealed; it can never read it). Off until he turns it on","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["journal"],"properties":{"journal":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"journal":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No connector yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"connectorOff","summary":"Turn it off","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/help":{"get":{"operationId":"helpPage","summary":"Help that goes further: when it's more than a habit (Mark's page, as HTML and markdown)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/messages":{"get":{"operationId":"myMessages","summary":"His recent messages to Mark","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"messageMark","summary":"Send Mark a message: it goes to his email (reply-to his) and Slack","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"subject":{"type":"string","maxLength":140},"body":{"type":"string","maxLength":5000}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Empty","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/captaining":{"get":{"operationId":"captaining","summary":"Whether he captains, or has told Mark he'd like to","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"captainInterest","summary":"\"I'd like to captain\": tells Mark","security":[{"bearerToken":["account"]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":2000}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not a member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohort/contacts":{"get":{"operationId":"cohortContacts","summary":"His partners' email and phone after the lock-in call, only for men who share them; his captain; what he shares","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cohort/contact":{"put":{"operationId":"saveCohortContact","summary":"His phone, and whether his email and phone are shared with his cohort","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":["string","null"],"maxLength":30},"share":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sos":{"get":{"operationId":"openSos","summary":"Open SOS calls in his cohorts from the last day (his own and his partners')","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"askSos","summary":"Ask his partners for prayer or a call (Slack, texts for men who opted in, and their phones). A second ask within 10 minutes adds to the open one","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["pray","call"]},"note":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sos/{id}/claim":{"post":{"operationId":"claimSos","summary":"\"I've got him\": the first partner to answer takes it, and the man who asked is told","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"SOS id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not from his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"His own SOS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sos/{id}/resolve":{"post":{"operationId":"resolveSos","summary":"He's okay now (only the man who asked)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"SOS id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not from his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain":{"get":{"operationId":"captain","summary":"The cohorts he captains, each with this week's call evaluation (404 not_captain otherwise)","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"cohorts":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not a captain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}":{"get":{"operationId":"captainBoard","summary":"A cohort's board: each man's streak, week and season %, his weeks, calls, last account, fading (and on what), SOS calls, email and phone, his forge (stage, heat, marks: a cold one is a man to check in with); the cohort's averages and trend","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}/evaluations":{"get":{"operationId":"captainEvaluations","summary":"The calls he can evaluate (newest first) and what he said about each","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not his to evaluate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"evaluateCall","summary":"Evaluate (or re-evaluate) a week's call: rating 1-10, anything unusual (only Mark sees it), a safety concern (Mark is alerted), and ideas for the captains to vote on","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["week","rating"],"properties":{"week":{"type":"integer"},"rating":{"type":"integer","minimum":1,"maximum":10},"unusual":{"type":"string","maxLength":4000},"concern":{"type":"boolean"},"ideas":{"type":"string","maxLength":4000,"description":"Blank lines between ideas"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid, or that call hasn't happened","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}/grace":{"get":{"operationId":"captainGrace","summary":"Grace requests from his men in this cohort: waiting ones first, then the last few decided","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/grace/{id}":{"post":{"operationId":"decideGrace","summary":"Approve or deny one of his men's grace requests. The man hears back; Mark is told and can still change it","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Grace request id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["approve"],"properties":{"approve":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of his men","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already decided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}/watchman":{"get":{"operationId":"captainWatchman","summary":"Who keeps the cohort's prayer list (the Watchman), and the men who can","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setWatchman","summary":"Set the Watchman (one of his men), or none (the captain keeps it)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"member_id":{"type":["integer","null"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not one of his men","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}/rule-settings":{"get":{"operationId":"captainRuleSettings","summary":"The season's rule settings (minimums, pillars, shared disciplines, the group's own suggestions), and whether he may change them: a private group's coach, before kickoff","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setCaptainRuleSettings","summary":"Save them (before kickoff). Shared disciplines go into every draft already in the cohort.","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"min":{"type":"integer","minimum":3,"maximum":7},"min_daily":{"type":"integer","minimum":1,"maximum":3},"pillars":{"enum":["all","core4","any3"]},"shared":{"type":"array","items":{"type":"string"},"description":"Up to 3, \"pillar: title | weekdays / weekly N\""},"picks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Per pillar, up to 8 \"title | weekly N\" lines"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"A public cohort (Mark sets it)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid, or the season has started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}/talk":{"put":{"operationId":"setCohortTalk","summary":"Move his cohort to Slack or the app (Partners → Chat). Every man hears in both places: a card in the chat (with a push) and a note in the Slack channel. Moving back to Slack leaves the app's chat to read","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["talk"],"properties":{"talk":{"enum":["slack","app"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"talk":{"enum":["slack","app"]},"moved":{"type":"boolean"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid, or the cohort has finished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}/plan":{"put":{"operationId":"setCohortPlan","summary":"Set (or clear) the reading plan his cohort reads together this season (from its first day). Each man is enrolled when he next opens his reading","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan_id":{"type":["integer","null"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not one of Agōn's plans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}/size":{"put":{"operationId":"setCohortSize","summary":"How many men his cohort holds, before it starts: 3 to 12. Six is the strong recommendation; past that, the reply suggests two cohorts at staggered times or a co-captain","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["size"],"properties":{"size":{"type":"integer","minimum":3,"maximum":12}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"size":{"type":"integer"},"recommended":{"type":"integer"},"spots_left":{"type":"integer"},"advice":{"type":["string","null"]}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Out of range, smaller than the men already in, or the cohort has started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}/rule-window":{"post":{"operationId":"openRuleWindow","summary":"Open his cohort's 12:30+1 mid-season for 1 to 14 days (default 7; never past the season's end): retiring or lightening a commitment applies at once instead of asking him, the cohort minimums still hold, and each change posts its card. Calling it again moves when it locks. His cohort hears it opened","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":14}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"open":{"type":"boolean"},"until":{"type":["string","null"],"format":"date-time"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The roster is off (not_enabled), or the season isn't under way (not_in_season)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"days out of range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"lockRuleWindow","summary":"Lock his cohort's 12:30+1 again now (it also locks by itself when its time is up). His cohort hears it","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"open":{"const":false}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already locked (not_open)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}/calls":{"get":{"operationId":"captainCalls","summary":"Each week's meeting day and time in his cohort (its time zone), which weeks he moved, and which have happened","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}/calls/{week}":{"put":{"operationId":"moveCall","summary":"Move one week's meeting to another day and time, in the cohort's time zone: still to come, and between the weeks on either side. The cohort is told (Slack or the app's chat); the pre-call post, prayer list, evaluation prompt, Join the call and calendars follow","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}},{"name":"week","in":"path","required":true,"description":"Week 1 to 12","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["date","time"],"properties":{"date":{"type":"string","format":"date"},"time":{"type":"string","description":"HH:MM, 24-hour"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Past, out of order, or a week with no meeting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"unmoveCall","summary":"That week's meeting back to its usual day and time; the cohort is told","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}},{"name":"week","in":"path","required":true,"description":"Week 1 to 12","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Already happened","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/cohorts/{id}/verse":{"put":{"operationId":"setCohortVerse","summary":"Set (or clear, with null) his cohort's verse of the week. It goes on each man's list when he next opens Verse a Week; the board shows who has it down, never scores","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Cohort id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ref":{"type":["string","null"],"description":"As written (\"Micah 6:8\") or OSIS"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not his cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a verse, or more than 8","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/ideas":{"get":{"operationId":"captainIdeas","summary":"The captains' open ideas, best first, with his vote on each","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not a captain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/captain/ideas/{id}/vote":{"post":{"operationId":"voteIdea","summary":"Vote an idea up (1) or down (-1); the same vote again takes it back","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Idea id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vote":{"enum":[1,-1]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not a captain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No such idea","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season":{"get":{"operationId":"season","summary":"His cohort season: the cohort, his Sabbath, grace days left and his grace requests (404 not_in_season when he has none)","security":[{"bearerToken":["disciplines:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cohort":{"type":["object","null"]},"today":{"type":"string","format":"date"},"sabbath":{"type":["integer","null"],"description":"6 Saturday, 7 Sunday"},"grace_left":{"type":"integer"},"grace":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a season","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/upcoming":{"get":{"operationId":"upcomingSeason","summary":"Before his cohort season counts (signed up, or before his first counted day): his cohort, when it starts, his 12:30+1 as set up on agon1230.com (a draft or locked in), and where to edit it. upcoming is null once his season is counting, or if he isn't in one","security":[{"bearerToken":["disciplines:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"upcoming":{"type":["object","null"]}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/upcoming/rule":{"put":{"operationId":"saveDraftRule","summary":"Change his draft 12:30+1 before his lock-in call (as on his signup page): his cohort's rules and shared disciplines apply","security":[{"bearerToken":["disciplines:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["disciplines"],"properties":{"disciplines":{"type":"array","items":{"type":"object","required":["pillar","title"],"properties":{"pillar":{"enum":["heart","soul","mind","strength","neighbor"]},"title":{"type":"string","maxLength":200},"cadence":{"enum":["daily","weekly","quarterly"],"description":"quarterly: weekly_target times in the quarter (a cohort season, or the calendar quarter), never missed or fined"},"weekly_target":{"type":"integer"},"days_mask":{"type":"integer"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not a draft, or it breaks the cohort's rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/upcoming/rule/from-personal":{"post":{"operationId":"draftFromPersonal","summary":"Make his own 12:30+1 (kept in the app) his cohort draft; his cohort's shared disciplines are kept. His personal streak carries into his season","security":[{"bearerToken":["disciplines:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No personal rule, not a draft, or it breaks the cohort's rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/day":{"get":{"operationId":"seasonDay","summary":"One day of his season: each discipline (due, status, effort, weekly progress), the open days, the closed days he can still correct (edit_days, through the end of the second day after each, his time: on a Thursday, Tuesday and Wednesday; edit_until on a day that is one), and whether the account is given","security":[{"bearerToken":["disciplines:read"]}],"parameters":[{"name":"date","in":"query","schema":{"type":"string"},"description":"YYYY-MM-DD, today, or yesterday (default today)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a season","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not in his season","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"giveSeasonAccount","summary":"Give (or change) his account for an open day, or correct a closed one through the end of the second day after it, his time (late: true; fines and streak are worked out again, his cohort isn't told again, his captain sees it was edited). Kept/missed and effort per discipline; weekly reps. Once every due daily has a status the account is given and his cohort channel is told","security":[{"bearerToken":["disciplines:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string"},"items":{"type":"array","items":{"type":"object","required":["id","status"],"properties":{"id":{"type":"integer"},"status":{"enum":["kept","missed"]},"effort":{"enum":["easy","fight","barely"]}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a season","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A closed day, or bad input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/disciplines/{id}/link":{"put":{"operationId":"linkSeasonDiscipline","summary":"Link one of his season's disciplines to Prayer, People, or Journal (or unlink: null). A prayer time, reaching out, or a journal entry in the app then keeps it for the day. The rule itself is unchanged","security":[{"bearerToken":["disciplines:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Discipline id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"link":{"enum":["prayer","people","journal","examen","neighbors","reading","books","verses","workouts","giving","heartcheck",null]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"link":{"enum":["prayer","people","journal","examen","neighbors","reading","books","verses","workouts","giving","heartcheck",null]}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a season","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not his, or an unknown link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/disciplines/{id}/look":{"put":{"operationId":"lookSeasonDiscipline","summary":"How one of his season's disciplines looks and opens: an icon, and an outside app or page (which replaces a tool link). Fields left out stay; null clears","security":[{"bearerToken":["disciplines:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Discipline id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"icon":{"type":["string","null"]},"link_url":{"type":["string","null"]},"link_label":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a season","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not his, or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/sabbath":{"put":{"operationId":"setSeasonSabbath","summary":"His Sabbath: Saturday (6), Sunday (7), or none (null). In season it starts with the next week","security":[{"bearerToken":["disciplines:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"weekday":{"type":["integer","null"],"enum":[6,7,null]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a season","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/season/grace":{"post":{"operationId":"askSeasonGrace","summary":"Ask for grace days (sick, traveling)","security":[{"bearerToken":["disciplines:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["start"],"properties":{"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"},"reason":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"grace":{"type":"object"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not in a season","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid, or not enough grace days left","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/contacts/links":{"put":{"operationId":"linkContact","summary":"Link a person (People), prayer subject, or partner to a card in his phone's contacts. Only the link and name are kept; numbers stay on his phone","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["target","id","contact_ref"],"properties":{"target":{"enum":["person","subject","man","door"]},"id":{"type":"integer","description":"Reminder id, subject id, the partner's user id, or door id"},"contact_ref":{"type":"string","maxLength":200,"description":"The contact's id on his phone"},"name":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"contact":{"type":["object","null"],"description":"A link to a card in his phone's contacts","properties":{"ref":{"type":"string"},"name":{"type":["string","null"]}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/contacts/links/{target}/{id}":{"delete":{"operationId":"unlinkContact","summary":"Remove a contact link","security":[{"bearerToken":["account"]}],"parameters":[{"name":"target","in":"path","required":true,"schema":{"enum":["person","subject","man","door"]}},{"name":"id","in":"path","required":true,"description":"Reminder, subject, user, or door id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Removed"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines":{"get":{"operationId":"routines","summary":"His routines, in order, each with today's state and its streak","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string","format":"date"},"routines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":["string","null"]},"days_mask":{"type":"integer","description":"bit 0 = Monday … bit 6 = Sunday; 0 = anytime"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]},"description":"Start time per weekday (minutes after midnight), Monday first"},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"sort":{"type":"integer"},"step_count":{"type":"integer"},"total_seconds":{"type":"integer"},"sabbath_today":{"type":"boolean","description":"Due today, and today is his Sabbath: running it is optional, and skipping it doesn't break the streak"},"due_today":{"type":"boolean"},"start_today":{"type":["integer","null"]},"done_today":{"type":"boolean"},"streak":{"type":"integer"},"forge":{"oneOf":[{"allOf":[{"type":"object","properties":{"stage":{"enum":["ore","ingot","bar","blade","tempered"],"description":"Ingot at a 7-day streak, Bar 21, Blade 42, Tempered 84; kept once reached"},"stage_on":{"type":["string","null"],"format":"date","description":"The day he reached this stage (null: Ore, or reached before the forge kept dates)"},"heat":{"enum":["cold","warm","glowing","whitehot"],"description":"From the streak he's on now; one step cooler until today's account is given"},"streak":{"type":"integer"},"next":{"type":["object","null"],"properties":{"stage":{"type":"string"},"at":{"type":"integer"},"days_left":{"type":"integer"}},"description":"Null once Tempered"}}},{"type":"object","properties":{"marks":{"type":"integer","description":"Maker's marks: one per full 84-day span kept"}}}]},{"type":"null"}],"description":"Null for an anytime routine"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}}}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createRoutine","summary":"A new routine with its steps","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":100},"description":{"type":["string","null"]},"days_mask":{"type":"integer"},"start_time":{"type":["integer","null"],"description":"The same start every day (minutes after midnight)"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]}},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}},"description":"Replaces every step; keep a step's id to keep it (and its history)"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"routine":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":["string","null"]},"days_mask":{"type":"integer","description":"bit 0 = Monday … bit 6 = Sunday; 0 = anytime"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]},"description":"Start time per weekday (minutes after midnight), Monday first"},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"sort":{"type":"integer"},"step_count":{"type":"integer"},"total_seconds":{"type":"integer"},"sabbath_today":{"type":"boolean","description":"Due today, and today is his Sabbath: running it is optional, and skipping it doesn't break the streak"},"due_today":{"type":"boolean"},"start_today":{"type":["integer","null"]},"done_today":{"type":"boolean"},"streak":{"type":"integer"},"forge":{"oneOf":[{"allOf":[{"type":"object","properties":{"stage":{"enum":["ore","ingot","bar","blade","tempered"],"description":"Ingot at a 7-day streak, Bar 21, Blade 42, Tempered 84; kept once reached"},"stage_on":{"type":["string","null"],"format":"date","description":"The day he reached this stage (null: Ore, or reached before the forge kept dates)"},"heat":{"enum":["cold","warm","glowing","whitehot"],"description":"From the streak he's on now; one step cooler until today's account is given"},"streak":{"type":"integer"},"next":{"type":["object","null"],"properties":{"stage":{"type":"string"},"at":{"type":"integer"},"days_left":{"type":"integer"}},"description":"Null once Tempered"}}},{"type":"object","properties":{"marks":{"type":"integer","description":"Maker's marks: one per full 84-day span kept"}}}]},{"type":"null"}],"description":"Null for an anytime routine"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}}}}},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"routine_id":{"type":"integer"},"date":{"type":"string","format":"date"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"completed":{"type":"boolean"},"posted":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"step_id":{"type":["integer","null"]},"title":{"type":"string"},"planned_seconds":{"type":["integer","null"]},"status":{"enum":["done","skip"]},"seconds":{"type":"integer"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"date":{"type":"string","format":"date"},"days":{"type":"integer"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"counts":{"type":"boolean","description":"Still part of his streak (no missed due day since)"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/order":{"put":{"operationId":"orderRoutines","summary":"Put his routines in this order","security":[{"bearerToken":["account"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["routine_ids"],"properties":{"routine_ids":{"type":"array","items":{"type":"integer"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/today":{"get":{"operationId":"routinesToday","summary":"Today's routines in start-time order, and whether each is done","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string"},"routines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":["string","null"]},"days_mask":{"type":"integer","description":"bit 0 = Monday … bit 6 = Sunday; 0 = anytime"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]},"description":"Start time per weekday (minutes after midnight), Monday first"},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"sort":{"type":"integer"},"step_count":{"type":"integer"},"total_seconds":{"type":"integer"},"sabbath_today":{"type":"boolean","description":"Due today, and today is his Sabbath: running it is optional, and skipping it doesn't break the streak"},"due_today":{"type":"boolean"},"start_today":{"type":["integer","null"]},"done_today":{"type":"boolean"},"streak":{"type":"integer"},"forge":{"oneOf":[{"allOf":[{"type":"object","properties":{"stage":{"enum":["ore","ingot","bar","blade","tempered"],"description":"Ingot at a 7-day streak, Bar 21, Blade 42, Tempered 84; kept once reached"},"stage_on":{"type":["string","null"],"format":"date","description":"The day he reached this stage (null: Ore, or reached before the forge kept dates)"},"heat":{"enum":["cold","warm","glowing","whitehot"],"description":"From the streak he's on now; one step cooler until today's account is given"},"streak":{"type":"integer"},"next":{"type":["object","null"],"properties":{"stage":{"type":"string"},"at":{"type":"integer"},"days_left":{"type":"integer"}},"description":"Null once Tempered"}}},{"type":"object","properties":{"marks":{"type":"integer","description":"Maker's marks: one per full 84-day span kept"}}}]},{"type":"null"}],"description":"Null for an anytime routine"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}}}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/templates":{"get":{"operationId":"routineTemplates","summary":"Agōn's ready-made Strength routines (Daily 20, Walk and pray, Ruck, Mobility 10, Couch to 5K weeks 1-8): each with its steps, about how long it takes, and the note to check with a doctor first","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer"},"safety":{"type":"string"},"templates":{"type":"array"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/from-template/{key}":{"post":{"operationId":"routineFromTemplate","summary":"Copy a template into his routines. The copy is his to edit; later catalogue changes never touch it. Its last step keeps his Strength discipline (his season's, else his own), unless he names another or null","security":[{"bearerToken":["account"]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"daily-20, walk-and-pray, ruck, mobility-10, c25k-1 … c25k-8"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"discipline_id":{"type":["integer","null"]},"days_mask":{"type":"integer","minimum":0,"maximum":127}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"routine":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":["string","null"]},"days_mask":{"type":"integer","description":"bit 0 = Monday … bit 6 = Sunday; 0 = anytime"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]},"description":"Start time per weekday (minutes after midnight), Monday first"},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"sort":{"type":"integer"},"step_count":{"type":"integer"},"total_seconds":{"type":"integer"},"sabbath_today":{"type":"boolean","description":"Due today, and today is his Sabbath: running it is optional, and skipping it doesn't break the streak"},"due_today":{"type":"boolean"},"start_today":{"type":["integer","null"]},"done_today":{"type":"boolean"},"streak":{"type":"integer"},"forge":{"oneOf":[{"allOf":[{"type":"object","properties":{"stage":{"enum":["ore","ingot","bar","blade","tempered"],"description":"Ingot at a 7-day streak, Bar 21, Blade 42, Tempered 84; kept once reached"},"stage_on":{"type":["string","null"],"format":"date","description":"The day he reached this stage (null: Ore, or reached before the forge kept dates)"},"heat":{"enum":["cold","warm","glowing","whitehot"],"description":"From the streak he's on now; one step cooler until today's account is given"},"streak":{"type":"integer"},"next":{"type":["object","null"],"properties":{"stage":{"type":"string"},"at":{"type":"integer"},"days_left":{"type":"integer"}},"description":"Null once Tempered"}}},{"type":"object","properties":{"marks":{"type":"integer","description":"Maker's marks: one per full 84-day span kept"}}}]},{"type":"null"}],"description":"Null for an anytime routine"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}}}}},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"routine_id":{"type":"integer"},"date":{"type":"string","format":"date"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"completed":{"type":"boolean"},"posted":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"step_id":{"type":["integer","null"]},"title":{"type":"string"},"planned_seconds":{"type":["integer","null"]},"status":{"enum":["done","skip"]},"seconds":{"type":"integer"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"date":{"type":"string","format":"date"},"days":{"type":"integer"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"counts":{"type":"boolean","description":"Still part of his streak (no missed due day since)"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not his discipline","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/{id}":{"get":{"operationId":"routine","summary":"One routine: its steps, its last 30 runs, and its streak adjustments","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Routine id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"routine":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":["string","null"]},"days_mask":{"type":"integer","description":"bit 0 = Monday … bit 6 = Sunday; 0 = anytime"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]},"description":"Start time per weekday (minutes after midnight), Monday first"},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"sort":{"type":"integer"},"step_count":{"type":"integer"},"total_seconds":{"type":"integer"},"sabbath_today":{"type":"boolean","description":"Due today, and today is his Sabbath: running it is optional, and skipping it doesn't break the streak"},"due_today":{"type":"boolean"},"start_today":{"type":["integer","null"]},"done_today":{"type":"boolean"},"streak":{"type":"integer"},"forge":{"oneOf":[{"allOf":[{"type":"object","properties":{"stage":{"enum":["ore","ingot","bar","blade","tempered"],"description":"Ingot at a 7-day streak, Bar 21, Blade 42, Tempered 84; kept once reached"},"stage_on":{"type":["string","null"],"format":"date","description":"The day he reached this stage (null: Ore, or reached before the forge kept dates)"},"heat":{"enum":["cold","warm","glowing","whitehot"],"description":"From the streak he's on now; one step cooler until today's account is given"},"streak":{"type":"integer"},"next":{"type":["object","null"],"properties":{"stage":{"type":"string"},"at":{"type":"integer"},"days_left":{"type":"integer"}},"description":"Null once Tempered"}}},{"type":"object","properties":{"marks":{"type":"integer","description":"Maker's marks: one per full 84-day span kept"}}}]},{"type":"null"}],"description":"Null for an anytime routine"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}}}}},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"routine_id":{"type":"integer"},"date":{"type":"string","format":"date"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"completed":{"type":"boolean"},"posted":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"step_id":{"type":["integer","null"]},"title":{"type":"string"},"planned_seconds":{"type":["integer","null"]},"status":{"enum":["done","skip"]},"seconds":{"type":"integer"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"date":{"type":"string","format":"date"},"days":{"type":"integer"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"counts":{"type":"boolean","description":"Still part of his streak (no missed due day since)"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateRoutine","summary":"Change a routine (fields left out stay; steps replaces every step)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Routine id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":100},"description":{"type":["string","null"]},"days_mask":{"type":"integer"},"start_time":{"type":["integer","null"],"description":"The same start every day (minutes after midnight)"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]}},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}},"description":"Replaces every step; keep a step's id to keep it (and its history)"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"routine":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":["string","null"]},"days_mask":{"type":"integer","description":"bit 0 = Monday … bit 6 = Sunday; 0 = anytime"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]},"description":"Start time per weekday (minutes after midnight), Monday first"},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"sort":{"type":"integer"},"step_count":{"type":"integer"},"total_seconds":{"type":"integer"},"sabbath_today":{"type":"boolean","description":"Due today, and today is his Sabbath: running it is optional, and skipping it doesn't break the streak"},"due_today":{"type":"boolean"},"start_today":{"type":["integer","null"]},"done_today":{"type":"boolean"},"streak":{"type":"integer"},"forge":{"oneOf":[{"allOf":[{"type":"object","properties":{"stage":{"enum":["ore","ingot","bar","blade","tempered"],"description":"Ingot at a 7-day streak, Bar 21, Blade 42, Tempered 84; kept once reached"},"stage_on":{"type":["string","null"],"format":"date","description":"The day he reached this stage (null: Ore, or reached before the forge kept dates)"},"heat":{"enum":["cold","warm","glowing","whitehot"],"description":"From the streak he's on now; one step cooler until today's account is given"},"streak":{"type":"integer"},"next":{"type":["object","null"],"properties":{"stage":{"type":"string"},"at":{"type":"integer"},"days_left":{"type":"integer"}},"description":"Null once Tempered"}}},{"type":"object","properties":{"marks":{"type":"integer","description":"Maker's marks: one per full 84-day span kept"}}}]},{"type":"null"}],"description":"Null for an anytime routine"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}}}}},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"routine_id":{"type":"integer"},"date":{"type":"string","format":"date"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"completed":{"type":"boolean"},"posted":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"step_id":{"type":["integer","null"]},"title":{"type":"string"},"planned_seconds":{"type":["integer","null"]},"status":{"enum":["done","skip"]},"seconds":{"type":"integer"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"date":{"type":"string","format":"date"},"days":{"type":"integer"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"counts":{"type":"boolean","description":"Still part of his streak (no missed due day since)"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteRoutine","summary":"Delete a routine and its history","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Routine id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/{id}/duplicate":{"post":{"operationId":"duplicateRoutine","summary":"Copy a routine","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Routine id","schema":{"type":"integer","minimum":1}}],"responses":{"201":{"description":"Copied","content":{"application/json":{"schema":{"type":"object","properties":{"routine":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":["string","null"]},"days_mask":{"type":"integer","description":"bit 0 = Monday … bit 6 = Sunday; 0 = anytime"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]},"description":"Start time per weekday (minutes after midnight), Monday first"},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"sort":{"type":"integer"},"step_count":{"type":"integer"},"total_seconds":{"type":"integer"},"sabbath_today":{"type":"boolean","description":"Due today, and today is his Sabbath: running it is optional, and skipping it doesn't break the streak"},"due_today":{"type":"boolean"},"start_today":{"type":["integer","null"]},"done_today":{"type":"boolean"},"streak":{"type":"integer"},"forge":{"oneOf":[{"allOf":[{"type":"object","properties":{"stage":{"enum":["ore","ingot","bar","blade","tempered"],"description":"Ingot at a 7-day streak, Bar 21, Blade 42, Tempered 84; kept once reached"},"stage_on":{"type":["string","null"],"format":"date","description":"The day he reached this stage (null: Ore, or reached before the forge kept dates)"},"heat":{"enum":["cold","warm","glowing","whitehot"],"description":"From the streak he's on now; one step cooler until today's account is given"},"streak":{"type":"integer"},"next":{"type":["object","null"],"properties":{"stage":{"type":"string"},"at":{"type":"integer"},"days_left":{"type":"integer"}},"description":"Null once Tempered"}}},{"type":"object","properties":{"marks":{"type":"integer","description":"Maker's marks: one per full 84-day span kept"}}}]},{"type":"null"}],"description":"Null for an anytime routine"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}}}}},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"routine_id":{"type":"integer"},"date":{"type":"string","format":"date"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"completed":{"type":"boolean"},"posted":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"step_id":{"type":["integer","null"]},"title":{"type":"string"},"planned_seconds":{"type":["integer","null"]},"status":{"enum":["done","skip"]},"seconds":{"type":"integer"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"date":{"type":"string","format":"date"},"days":{"type":"integer"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"counts":{"type":"boolean","description":"Still part of his streak (no missed due day since)"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/{id}/adjustments":{"post":{"operationId":"addStreakAdjustment","summary":"Add days to a routine's streak, kept in another tracking app. It counts while his streak stays unbroken after its date (a missed due day after it ends it)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Routine id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["days"],"properties":{"days":{"type":"integer","minimum":1,"maximum":3650},"note":{"type":"string","maxLength":200},"date":{"type":"string","format":"date","description":"His day it counts from; today if left out"}}}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"type":"object","properties":{"routine":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":["string","null"]},"days_mask":{"type":"integer","description":"bit 0 = Monday … bit 6 = Sunday; 0 = anytime"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]},"description":"Start time per weekday (minutes after midnight), Monday first"},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"sort":{"type":"integer"},"step_count":{"type":"integer"},"total_seconds":{"type":"integer"},"sabbath_today":{"type":"boolean","description":"Due today, and today is his Sabbath: running it is optional, and skipping it doesn't break the streak"},"due_today":{"type":"boolean"},"start_today":{"type":["integer","null"]},"done_today":{"type":"boolean"},"streak":{"type":"integer"},"forge":{"oneOf":[{"allOf":[{"type":"object","properties":{"stage":{"enum":["ore","ingot","bar","blade","tempered"],"description":"Ingot at a 7-day streak, Bar 21, Blade 42, Tempered 84; kept once reached"},"stage_on":{"type":["string","null"],"format":"date","description":"The day he reached this stage (null: Ore, or reached before the forge kept dates)"},"heat":{"enum":["cold","warm","glowing","whitehot"],"description":"From the streak he's on now; one step cooler until today's account is given"},"streak":{"type":"integer"},"next":{"type":["object","null"],"properties":{"stage":{"type":"string"},"at":{"type":"integer"},"days_left":{"type":"integer"}},"description":"Null once Tempered"}}},{"type":"object","properties":{"marks":{"type":"integer","description":"Maker's marks: one per full 84-day span kept"}}}]},{"type":"null"}],"description":"Null for an anytime routine"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}}}}},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"routine_id":{"type":"integer"},"date":{"type":"string","format":"date"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"completed":{"type":"boolean"},"posted":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"step_id":{"type":["integer","null"]},"title":{"type":"string"},"planned_seconds":{"type":["integer","null"]},"status":{"enum":["done","skip"]},"seconds":{"type":"integer"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"date":{"type":"string","format":"date"},"days":{"type":"integer"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"counts":{"type":"boolean","description":"Still part of his streak (no missed due day since)"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid, or an anytime routine","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/{id}/adjustments/{adjustmentId}":{"delete":{"operationId":"removeStreakAdjustment","summary":"Remove a streak adjustment","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Routine id","schema":{"type":"integer","minimum":1}},{"name":"adjustmentId","in":"path","required":true,"description":"Adjustment id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"routine":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":["string","null"]},"days_mask":{"type":"integer","description":"bit 0 = Monday … bit 6 = Sunday; 0 = anytime"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]},"description":"Start time per weekday (minutes after midnight), Monday first"},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"sort":{"type":"integer"},"step_count":{"type":"integer"},"total_seconds":{"type":"integer"},"sabbath_today":{"type":"boolean","description":"Due today, and today is his Sabbath: running it is optional, and skipping it doesn't break the streak"},"due_today":{"type":"boolean"},"start_today":{"type":["integer","null"]},"done_today":{"type":"boolean"},"streak":{"type":"integer"},"forge":{"oneOf":[{"allOf":[{"type":"object","properties":{"stage":{"enum":["ore","ingot","bar","blade","tempered"],"description":"Ingot at a 7-day streak, Bar 21, Blade 42, Tempered 84; kept once reached"},"stage_on":{"type":["string","null"],"format":"date","description":"The day he reached this stage (null: Ore, or reached before the forge kept dates)"},"heat":{"enum":["cold","warm","glowing","whitehot"],"description":"From the streak he's on now; one step cooler until today's account is given"},"streak":{"type":"integer"},"next":{"type":["object","null"],"properties":{"stage":{"type":"string"},"at":{"type":"integer"},"days_left":{"type":"integer"}},"description":"Null once Tempered"}}},{"type":"object","properties":{"marks":{"type":"integer","description":"Maker's marks: one per full 84-day span kept"}}}]},{"type":"null"}],"description":"Null for an anytime routine"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}}}}},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"routine_id":{"type":"integer"},"date":{"type":"string","format":"date"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"completed":{"type":"boolean"},"posted":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"step_id":{"type":["integer","null"]},"title":{"type":"string"},"planned_seconds":{"type":["integer","null"]},"status":{"enum":["done","skip"]},"seconds":{"type":"integer"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"date":{"type":"string","format":"date"},"days":{"type":"integer"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"counts":{"type":"boolean","description":"Still part of his streak (no missed due day since)"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/{id}/runs":{"post":{"operationId":"startRoutineRun","summary":"He starts a routine","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Routine id","schema":{"type":"integer","minimum":1}}],"responses":{"201":{"description":"Started","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"integer"},"routine_id":{"type":"integer"},"date":{"type":"string","format":"date"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"completed":{"type":"boolean"},"posted":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"step_id":{"type":["integer","null"]},"title":{"type":"string"},"planned_seconds":{"type":["integer","null"]},"status":{"enum":["done","skip"]},"seconds":{"type":"integer"}}}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/runs/{id}/steps/{position}":{"put":{"operationId":"recordRoutineStep","summary":"One step's result (done or skipped, and its time); a done step keeps its 12:30+1 discipline","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Run id","schema":{"type":"integer","minimum":1}},{"name":"position","in":"path","required":true,"schema":{"type":"integer","minimum":0}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"enum":["done","skip"]},"seconds":{"type":"integer"},"note":{"type":"string","maxLength":4000,"description":"Only when his journal can't hold it: the app saves reflections to his encrypted journal when it can"},"device":{"type":"string","description":"The device saving it; refused (409 run_moved) if another device has taken the run over"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kept_disciplines":{"type":"array","items":{"type":"integer"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/runs/live":{"get":{"operationId":"liveRoutineRun","summary":"The routine run under way on one of his devices (where it is and which device is running it), or null","security":[{"bearerToken":["account"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":["object","null"],"properties":{"id":{"type":"integer"},"routine_id":{"type":"integer"},"started_at":{"type":"string","format":"date-time"},"state":{"type":"object","description":"The runner's state (step clock as timestamps in the server's time)"},"version":{"type":"integer"},"device":{"type":"string"},"device_name":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"server_now":{"type":"integer","description":"The server's time (ms)"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/runs/{id}/state":{"put":{"operationId":"saveRoutineRunState","summary":"The device running a routine saves where it is; with take, another device takes it over (Continue here)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Run id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["device","state"],"properties":{"device":{"type":"string","minLength":8,"maxLength":64},"device_name":{"type":"string","maxLength":40},"state":{"type":"object"},"take":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"version":{"type":"integer"},"reason":{"enum":["moved","ended"],"description":"Not saved: another device runs it now, or it has ended"},"run":{"type":["object","null"]},"server_now":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/runs/{id}/finish":{"post":{"operationId":"finishRoutineRun","summary":"He finished (completed) or stopped partway","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Run id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"completed":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"routine":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":["string","null"]},"days_mask":{"type":"integer","description":"bit 0 = Monday … bit 6 = Sunday; 0 = anytime"},"start_minutes":{"type":["array","null"],"items":{"type":["integer","null"]},"description":"Start time per weekday (minutes after midnight), Monday first"},"remind":{"type":"boolean"},"color":{"type":["string","null"]},"icon":{"type":["string","null"]},"sort":{"type":"integer"},"step_count":{"type":"integer"},"total_seconds":{"type":"integer"},"sabbath_today":{"type":"boolean","description":"Due today, and today is his Sabbath: running it is optional, and skipping it doesn't break the streak"},"due_today":{"type":"boolean"},"start_today":{"type":["integer","null"]},"done_today":{"type":"boolean"},"streak":{"type":"integer"},"forge":{"oneOf":[{"allOf":[{"type":"object","properties":{"stage":{"enum":["ore","ingot","bar","blade","tempered"],"description":"Ingot at a 7-day streak, Bar 21, Blade 42, Tempered 84; kept once reached"},"stage_on":{"type":["string","null"],"format":"date","description":"The day he reached this stage (null: Ore, or reached before the forge kept dates)"},"heat":{"enum":["cold","warm","glowing","whitehot"],"description":"From the streak he's on now; one step cooler until today's account is given"},"streak":{"type":"integer"},"next":{"type":["object","null"],"properties":{"stage":{"type":"string"},"at":{"type":"integer"},"days_left":{"type":"integer"}},"description":"Null once Tempered"}}},{"type":"object","properties":{"marks":{"type":"integer","description":"Maker's marks: one per full 84-day span kept"}}}]},{"type":"null"}],"description":"Null for an anytime routine"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"position":{"type":"integer"},"title":{"type":"string","maxLength":200},"seconds":{"type":["integer","null"],"minimum":1,"maximum":14400,"description":"Null: a checklist item, no timer"},"icon":{"type":["string","null"]},"notes":{"type":["string","null"],"maxLength":4000},"action":{"enum":["pray","journal","post","link","read","examen","verses","followthrough","still",null],"description":"pray: a prayer session; journal: a new entry; post: his run summary to his cohorts; link: open link_url; read: today's Scripture reading; verses: today's memory verse review; followthrough: his Follow Through list; still: Still (his chosen apps put away) for the step, on his iPhone"},"link_url":{"type":["string","null"]},"discipline_id":{"type":["integer","null"],"description":"One of his 12:30+1 disciplines, kept when he finishes this step"},"reflect":{"type":"boolean","description":"Ask him for a reflection at this step (saved to his encrypted journal by the app)"},"private":{"type":"boolean","description":"Private on what he shares: the Run Recap shows its time and over/under, and \"Private step\" for its title"},"keeps":{"type":["object","null"],"readOnly":true,"description":"When discipline_id is set: the commitment it keeps ({ title, pillar }), or null if it isn't readable here","properties":{"title":{"type":"string"},"pillar":{"type":"string"}}}}}}}},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"routine_id":{"type":"integer"},"date":{"type":"string","format":"date"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"completed":{"type":"boolean"},"posted":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"step_id":{"type":["integer","null"]},"title":{"type":"string"},"planned_seconds":{"type":["integer","null"]},"status":{"enum":["done","skip"]},"seconds":{"type":"integer"}}}}}}},"adjustments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"date":{"type":"string","format":"date"},"days":{"type":"integer"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"counts":{"type":"boolean","description":"Still part of his streak (no missed due day since)"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/runs/{id}/recap":{"get":{"operationId":"routineRunRecap","summary":"The run with the clock on it: each step's actual time against its plan, the totals, and the window he ran it in","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Run id","schema":{"type":"integer","minimum":1}},{"name":"show_titles","in":"query","schema":{"type":"boolean","default":true},"description":"false: \"Step 1\", \"Step 2\"… (for one share)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"integer"},"routine_id":{"type":"integer"},"title":{"type":"string"},"icon":{"type":["string","null"]},"date":{"type":"string","format":"date"},"day":{"type":"string","description":"\"Mon Nov 2\""},"window":{"type":"string","description":"Start to end on his clock: \"3:59–5:20am\""},"underway":{"type":"boolean"},"ended_early":{"type":"boolean"},"posted":{"type":"boolean","description":"He has posted it to his cohort"},"streak":{"type":["integer","null"]},"actual_seconds":{"type":"integer"},"planned_seconds":{"type":"integer"},"delta_seconds":{"type":"integer"},"actual":{"type":"string"},"planned":{"type":"string"},"delta":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"step_id":{"type":["integer","null"]},"title":{"type":"string","description":"\"Private step\", or \"Step 3\" with titles off"},"icon":{"type":["string","null"]},"private":{"type":"boolean"},"outcome":{"enum":["timed","check","skipped","not_reached"]},"planned_seconds":{"type":["integer","null"]},"seconds":{"type":["integer","null"]},"delta_seconds":{"type":["integer","null"],"description":"Actual minus planned (timed steps)"},"ratio":{"type":["number","null"]},"time":{"type":"string","description":"\"11m 10s\", \"✓\", \"Skipped\", \"—\""},"delta":{"type":"string","description":"\"+1m 10s\", \"−4m 58s\", \"on plan\", or empty"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/runs/{id}/summary":{"get":{"operationId":"routineRunSummary","summary":"What posting the run sends: its recap, the text, and which cohorts it goes to","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Run id","schema":{"type":"integer","minimum":1}},{"name":"show_titles","in":"query","schema":{"type":"boolean","default":true},"description":"false: \"Step 1\", \"Step 2\"… (for one share)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"integer"},"text":{"type":"string"},"note":{"type":["string","null"]},"recap":{"type":"object","properties":{"run_id":{"type":"integer"},"routine_id":{"type":"integer"},"title":{"type":"string"},"icon":{"type":["string","null"]},"date":{"type":"string","format":"date"},"day":{"type":"string","description":"\"Mon Nov 2\""},"window":{"type":"string","description":"Start to end on his clock: \"3:59–5:20am\""},"underway":{"type":"boolean"},"ended_early":{"type":"boolean"},"posted":{"type":"boolean","description":"He has posted it to his cohort"},"streak":{"type":["integer","null"]},"actual_seconds":{"type":"integer"},"planned_seconds":{"type":"integer"},"delta_seconds":{"type":"integer"},"actual":{"type":"string"},"planned":{"type":"string"},"delta":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer"},"step_id":{"type":["integer","null"]},"title":{"type":"string","description":"\"Private step\", or \"Step 3\" with titles off"},"icon":{"type":["string","null"]},"private":{"type":"boolean"},"outcome":{"enum":["timed","check","skipped","not_reached"]},"planned_seconds":{"type":["integer","null"]},"seconds":{"type":["integer","null"]},"delta_seconds":{"type":["integer","null"],"description":"Actual minus planned (timed steps)"},"ratio":{"type":["number","null"]},"time":{"type":"string","description":"\"11m 10s\", \"✓\", \"Skipped\", \"—\""},"delta":{"type":"string","description":"\"+1m 10s\", \"−4m 58s\", \"on plan\", or empty"}}}}}},"cohorts":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/routines/runs/{id}/post":{"post":{"operationId":"postRoutineRun","summary":"Post the run's recap to his cohorts (their Slack channel, or a recap card in the app's chat)","security":[{"bearerToken":["account"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Run id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":280,"description":"A line from him under the recap"},"show_titles":{"type":"boolean","default":true,"description":"false: \"Step 1\", \"Step 2\"… for this post"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"posted_to":{"type":"array","items":{"type":"string"}},"text":{"type":"string"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not in a cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Slack unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/requests/{id}/updates":{"get":{"operationId":"requestUpdates","summary":"A request's updates, newest first","security":[{"bearerToken":["prayer:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Request id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"body":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"addRequestUpdate","summary":"Add an update to his request (the newest shows on top)","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Request id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["body"],"properties":{"body":{"type":"string","maxLength":2000}}}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/Request"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/requests/{id}/merge":{"post":{"operationId":"mergeRequest","summary":"Fold this request (an Inbox note) into another of his requests as an update","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Request id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["into"],"properties":{"into":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/Request"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not his","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/lists":{"get":{"operationId":"listLists","summary":"His personal lists, his cohorts' lists, and lists shared with him","security":[{"bearerToken":["prayer:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"lists":{"type":"array","items":{"$ref":"#/components/schemas/List"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createList","summary":"Make a personal list","security":[{"bearerToken":["prayer:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":100}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"list":{"$ref":"#/components/schemas/List"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/lists/{id}":{"get":{"operationId":"getList","summary":"One list","security":[{"bearerToken":["prayer:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"List id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"list":{"$ref":"#/components/schemas/List"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not visible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/lists/{id}/requests/{external_id}":{"put":{"operationId":"upsertRequest","summary":"Create or update your request with this external id on this list (idempotent)","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"List id","schema":{"type":"integer","minimum":1}},{"name":"external_id","in":"path","required":true,"description":"Your key for this request (1–200 characters), unique per list for you","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestInput"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/Request"}}}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/Request"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Missing scope, or a list shared with you read-only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"List not found or not visible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/requests":{"get":{"operationId":"queryRequests","summary":"Requests you can see, newest first, with filters and cursor paging","security":[{"bearerToken":["prayer:read"]}],"parameters":[{"name":"list","in":"query","schema":{"type":"integer"},"description":"A list id (a cohort list means everything on that cohort)"},{"name":"cohort","in":"query","schema":{"type":"integer"},"description":"A cohort id"},{"name":"author","in":"query","schema":{"type":"string"},"description":"A user id, or \"me\""},{"name":"status","in":"query","schema":{"enum":["active","answered","archived"]}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Created at or after (ISO 8601 date or time)"},{"name":"until","in":"query","schema":{"type":"string","format":"date-time"},"description":"Created before (ISO 8601 date or time)"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{"$ref":"#/components/schemas/Request"}},"next_cursor":{"type":["string","null"]}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid filter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/requests/{id}":{"get":{"operationId":"getRequest","summary":"One request","security":[{"bearerToken":["prayer:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Request id","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/Request"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not visible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteRequest","summary":"Delete one of your requests","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Request id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not yours","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateRequest","summary":"Change your request: text, kind, unspoken, visibility, status, tags, subject, or list (your own lists)","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Request id","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RequestInput"},{"type":"object","properties":{"status":{"enum":["active","answered","archived"]}}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/Request"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not yours, or missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not visible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/requests/{id}/answer":{"post":{"operationId":"answerRequest","summary":"Mark your request answered, with a note","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Request id","schema":{"type":"integer","minimum":1}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":2000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/Request"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not yours, or missing scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not visible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/requests/{id}/prayed":{"post":{"operationId":"recordPrayed","summary":"Record that you prayed for a request you can see","security":[{"bearerToken":["prayer:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Request id","schema":{"type":"integer","minimum":1}}],"responses":{"201":{"description":"Recorded","content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"integer"},"prayed_at":{"type":"string","format":"date-time"},"times_you_prayed":{"type":"integer"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not visible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shares":{"get":{"operationId":"listShares","summary":"Shares you granted and shares granted to you (live ones)","security":[{"bearerToken":["shares:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"granted":{"type":"array","items":{"$ref":"#/components/schemas/Share"}},"received":{"type":"array","items":{"$ref":"#/components/schemas/Share"}}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createShare","summary":"Share one of your requests or lists with a partner (user) or one of your cohorts","security":[{"bearerToken":["shares:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["resource_type","resource_id","target_type","target_id"],"properties":{"resource_type":{"enum":["request","list"]},"resource_id":{"type":"integer"},"target_type":{"enum":["user","cohort"]},"target_id":{"type":"integer","description":"A partner's user id (see /v1/me) or one of your cohort ids"}}}}}},"responses":{"201":{"description":"Shared","content":{"application/json":{"schema":{"type":"object","properties":{"share":{"$ref":"#/components/schemas/Share"}}}}}},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not yours, or not a partner / not your cohort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shares/{id}":{"delete":{"operationId":"revokeShare","summary":"Revoke a share you granted","security":[{"bearerToken":["shares:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Share id","schema":{"type":"integer","minimum":1}}],"responses":{"204":{"description":"Revoked"},"401":{"description":"No live token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not yours","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (per token, per minute)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}