{"components":{"responses":{"Error":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"enum":["unauthorized","forbidden","not_found","validation","conflict","too_late","not_configured","upstream","internal","rate_limited"],"type":"string"},"fields":{"additionalProperties":{"type":"string"},"type":"object"},"message":{"type":"string"}},"type":"object"}},"type":"object"}}},"description":"Error"}},"securitySchemes":{"bearerAuth":{"description":"OAuth access token (sonki_at_…) or personal API key (sonki_key_…)","scheme":"bearer","type":"http"},"oauth2":{"flows":{"authorizationCode":{"authorizationUrl":"https://sonki.co/oauth/authorize","refreshUrl":"https://sonki.co/oauth/token","scopes":{"offline_access":"Stay connected","read":"See lessons, messages and profile","write":"Book, reschedule, cancel, message and edit"},"tokenUrl":"https://sonki.co/oauth/token"}},"type":"oauth2"}}},"info":{"contact":{"email":"hello@sonki.co","url":"https://sonki.co/en/agents"},"description":"Online music lessons marketplace (English and Spanish). Everything a student or teacher can do in the app, for AI agents and scripts. Authenticate with an OAuth access token or a personal API key (Settings → AI agents & API) as `Authorization: Bearer …`. Money is integer cents in USD; times are RFC 3339 UTC. Admin pages and account security (password, payout method, API keys) are only available in the app.","title":"Sonki API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/auth/me":{"get":{"operationId":"getMe","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"The signed-in person: name, email, roles (student/teacher), locale, time zone and teacher profile status.","tags":["account"],"x-sonki-access":"signed in"}},"/calendar":{"get":{"operationId":"getCalendar","parameters":[{"description":"Range start","in":"query","name":"from","required":false,"schema":{"description":"RFC 3339, e.g. 2026-12-10T15:00:00Z","format":"date-time","type":"string"}},{"description":"Range end","in":"query","name":"to","required":false,"schema":{"description":"RFC 3339, e.g. 2026-12-10T15:00:00Z","format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Lessons in a time range.","tags":["contacts"],"x-sonki-access":"signed in"}},"/calendar/google":{"get":{"operationId":"getGoogleCalendar","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Whether Google Calendar sync is connected.","tags":["contacts"],"x-sonki-access":"signed in"}},"/calendar/google/disconnect":{"post":{"operationId":"disconnectGoogleCalendar","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Stop syncing with Google Calendar.","tags":["contacts"],"x-sonki-access":"signed in"}},"/calendar/google/sync":{"post":{"operationId":"syncGoogleCalendar","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Sync lessons with Google Calendar now.","tags":["contacts"],"x-sonki-access":"signed in"}},"/calendar/ical-url":{"get":{"operationId":"getIcalUrl","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Private calendar feed address (iCal) with my lessons.","tags":["contacts"],"x-sonki-access":"signed in"}},"/cart":{"get":{"operationId":"getCart","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"The cart (lessons chosen but not paid) and the credit balance.","tags":["booking"],"x-sonki-access":"signed in"}},"/cart/items":{"post":{"operationId":"addCartItem","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"categoryId":{"description":"One of the teacher's subjects","format":"uuid","type":"string"},"durationMin":{"enum":[15,30,45,60,90],"type":"integer"},"isTrial":{"type":"boolean"},"quantity":{"enum":[1,5,10,20],"type":"integer"},"start":{"description":"Optional: a start time from getTeacherAvailability. The first lesson is booked there once paid, if still free.","format":"date-time","type":"string"},"teacherId":{"format":"uuid","type":"string"}},"required":["teacherId","categoryId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Put lessons with a teacher in the cart: a single lesson, a package (5/10/20) or the free trial.","tags":["booking"],"x-sonki-access":"signed in"}},"/cart/items/{id}":{"delete":{"operationId":"removeCartItem","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Remove a line from the cart.","tags":["booking"],"x-sonki-access":"signed in"},"patch":{"operationId":"updateCartItem","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"quantity":{"enum":[1,5,10,20],"type":"integer"}},"required":["quantity"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Change how many lessons a cart line has (1, 5, 10 or 20).","tags":["booking"],"x-sonki-access":"signed in"}},"/categories":{"get":{"operationId":"listCategories","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Every instrument and music subject (tree via parentId) with how many teachers teach it.","tags":["catalog"],"x-sonki-access":"public"}},"/categories/{slug}":{"get":{"operationId":"getCategory","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"One instrument or subject by its English or Spanish slug, with stats and top teachers.","tags":["catalog"],"x-sonki-access":"public"}},"/checkout":{"post":{"operationId":"checkout","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Check out the whole cart. Returns the order and payment.checkoutUrl (Mercado Pago) for the person to open and pay. A free order is confirmed at once.","tags":["booking"],"x-sonki-access":"signed in"}},"/contacts":{"get":{"operationId":"listContacts","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"My teachers and students.","tags":["contacts"],"x-sonki-access":"signed in"}},"/contacts/clear-favorites":{"post":{"operationId":"clearFavoriteContacts","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Unmark every favorite contact.","tags":["contacts"],"x-sonki-access":"signed in"}},"/contacts/{userId}":{"get":{"operationId":"getContact","parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"One contact with shared lessons.","tags":["contacts"],"x-sonki-access":"signed in"}},"/contacts/{userId}/archive":{"post":{"operationId":"archiveContact","parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived":{"type":"boolean"}},"required":["archived"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Archive or unarchive a contact.","tags":["contacts"],"x-sonki-access":"signed in"}},"/contacts/{userId}/favorite":{"post":{"operationId":"favoriteContact","parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"favorite":{"type":"boolean"}},"required":["favorite"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Mark or unmark a contact as favorite.","tags":["contacts"],"x-sonki-access":"signed in"}},"/contacts/{userId}/note":{"put":{"operationId":"setContactNote","parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"note":{"type":["string","null"]}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Private note about a contact.","tags":["contacts"],"x-sonki-access":"signed in"}},"/dashboard":{"get":{"operationId":"getDashboard","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Home page summary: upcoming lessons, lessons needing attention, unread threads, contacts, wallet.","tags":["account"],"x-sonki-access":"signed in"}},"/files":{"get":{"operationId":"listFiles","parameters":[{"description":"Name contains","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"Page number, from 1","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Items per page (max 50)","in":"query","name":"pageSize","required":false,"schema":{"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"My uploaded files.","tags":["files"],"x-sonki-access":"signed in"},"post":{"operationId":"uploadFile","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"purpose":{"type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Upload a file (multipart/form-data: file, purpose). Not available through call_api.","tags":["files"],"x-sonki-access":"signed in"}},"/files/{id}":{"delete":{"operationId":"deleteFile","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Delete my file.","tags":["files"],"x-sonki-access":"signed in"},"get":{"operationId":"downloadFile","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The file"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Download a file I can see.","tags":["files"],"x-sonki-access":"signed in"}},"/focus-areas":{"get":{"operationId":"listFocusAreas","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Styles and goals teachers can list as focus areas.","tags":["catalog"],"x-sonki-access":"public"}},"/inquiries":{"post":{"operationId":"createInquiry","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"categoryId":{"format":"uuid","type":"string"},"forWhom":{"enum":["me","child","other"],"type":"string"},"goals":{"type":"string"},"lessonLanguage":{"enum":["en","es","any"],"type":"string"},"level":{"enum":["beginner","intermediate","advanced"],"type":"string"},"notes":{"type":"string"},"startWhen":{"enum":["asap","this_month","later"],"type":"string"}},"required":["categoryId","forWhom","level","startWhen","lessonLanguage"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Ask teachers of an instrument to reach out (\"get matched\").","tags":["inquiries"],"x-sonki-access":"signed in"}},"/inquiries/mine":{"get":{"operationId":"listMyInquiries","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"My requests to get matched, with teachers' answers.","tags":["inquiries"],"x-sonki-access":"signed in"}},"/inquiries/{id}/close":{"post":{"operationId":"closeInquiry","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Close my request.","tags":["inquiries"],"x-sonki-access":"signed in"}},"/lessons":{"get":{"operationId":"listLessons","parameters":[{"description":"Which lessons","in":"query","name":"scope","required":false,"schema":{"enum":["upcoming","attention","unscheduled","past","all"],"type":"string"}},{"description":"Only lessons where I am this","in":"query","name":"as","required":false,"schema":{"enum":["student","teacher"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"My lessons as student or teacher.","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}":{"get":{"operationId":"getLesson","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"One lesson with its notes and attachments.","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/acknowledge":{"post":{"operationId":"acknowledgeLesson","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"outcome":{"enum":["completed","no_show"],"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Teacher confirms a finished lesson happened (or the student didn't show).","tags":["lessons"],"x-sonki-access":"teacher"}},"/lessons/{id}/attachments":{"post":{"operationId":"attachFileToLesson","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"fileId":{"format":"uuid","type":"string"}},"required":["fileId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Attach an uploaded file to a lesson.","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/attachments/{fileId}":{"delete":{"operationId":"detachFileFromLesson","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"fileId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Remove a file from a lesson.","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/cancel":{"post":{"operationId":"cancelLesson","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"reason":{"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Cancel a lesson; the student gets its price back as Sonki credits (24-hour rule).","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/confirm":{"post":{"operationId":"confirmLessonInvite","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Student accepts the teacher's proposed time.","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/decline":{"post":{"operationId":"declineLessonInvite","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Student declines the teacher's proposed time.","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/notes":{"post":{"operationId":"addLessonNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"body":{"type":"string"}},"required":["body"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Add a note to a lesson (plain text or markdown, up to 10,000 characters).","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/notes/{noteId}":{"patch":{"operationId":"editLessonNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"noteId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"body":{"type":"string"}},"required":["body"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Edit my note.","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/request-review":{"post":{"operationId":"requestLessonReview","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Ask the student for a review of a finished lesson.","tags":["lessons"],"x-sonki-access":"teacher"}},"/lessons/{id}/reschedule":{"post":{"operationId":"rescheduleLesson","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"start":{"description":"RFC 3339, e.g. 2026-12-10T15:00:00Z","format":"date-time","type":"string"}},"required":["start"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Move a scheduled lesson (more than 24 hours ahead).","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/review":{"post":{"operationId":"reviewLesson","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"rating":{"maximum":5,"minimum":1,"type":"integer"},"showName":{"type":"boolean"},"text":{"type":"string"}},"required":["rating"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Student reviews a finished lesson (once).","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/schedule":{"post":{"operationId":"scheduleLesson","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"start":{"description":"RFC 3339, e.g. 2026-12-10T15:00:00Z","format":"date-time","type":"string"}},"required":["start"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Book a time for an unscheduled lesson (student: from the teacher's availability; teacher: sends an invite).","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/skip-review":{"post":{"operationId":"skipLessonReview","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Don't review this lesson.","tags":["lessons"],"x-sonki-access":"signed in"}},"/lessons/{id}/unschedule":{"post":{"operationId":"unscheduleLesson","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Free a scheduled lesson's time and keep the lesson to book later (more than 24 hours ahead).","tags":["lessons"],"x-sonki-access":"signed in"}},"/me":{"patch":{"operationId":"updateMe","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"avatarUrl":{"type":["string","null"]},"bio":{"type":["string","null"]},"emailOnInquiry":{"type":"boolean"},"emailOnLessons":{"type":"boolean"},"emailOnMessage":{"type":"boolean"},"interests":{"description":"Category ids","items":{"format":"uuid","type":"string"},"type":"array"},"locale":{"enum":["en","es"],"type":"string"},"name":{"type":"string"},"timezone":{"description":"IANA zone, e.g. America/Bogota","type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Change name, language, time zone, photo, bio, interests or email preferences.","tags":["account"],"x-sonki-access":"signed in"}},"/me/become-teacher":{"post":{"operationId":"becomeTeacher","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Add the teacher role and a draft teacher profile to this account.","tags":["account"],"x-sonki-access":"signed in"}},"/me/profile-completion":{"get":{"operationId":"getProfileCompletion","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"What is still missing from the profile (percent and steps).","tags":["account"],"x-sonki-access":"signed in"}},"/me/wallet":{"get":{"operationId":"getWallet","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Sonki credit balance (cents, USD) and its history.","tags":["account"],"x-sonki-access":"signed in"}},"/messages/threads":{"get":{"operationId":"listThreads","parameters":[{"description":"Archived threads (default 0)","in":"query","name":"archived","required":false,"schema":{"enum":["0","1","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Message threads, newest activity first.","tags":["messages"],"x-sonki-access":"signed in"},"post":{"operationId":"createThread","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"body":{"type":"string"},"fileIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"recipientId":{"format":"uuid","type":"string"},"recipientIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"subject":{"type":"string"}},"required":["body"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Start a conversation with a teacher or student (emails them).","tags":["messages"],"x-sonki-access":"signed in"}},"/messages/threads/{id}":{"get":{"operationId":"getThread","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"A thread and its messages (marks it read).","tags":["messages"],"x-sonki-access":"signed in"}},"/messages/threads/{id}/archive":{"post":{"operationId":"archiveThread","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"archived":{"type":"boolean"}},"required":["archived"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Archive or unarchive a thread.","tags":["messages"],"x-sonki-access":"signed in"}},"/messages/threads/{id}/messages":{"post":{"operationId":"replyToThread","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"body":{"type":"string"},"fileIds":{"items":{"format":"uuid","type":"string"},"type":"array"}},"required":["body"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Reply in a thread.","tags":["messages"],"x-sonki-access":"signed in"}},"/messages/unread-count":{"get":{"operationId":"getUnreadCount","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"How many threads are unread.","tags":["messages"],"x-sonki-access":"signed in"}},"/orders":{"get":{"operationId":"listOrders","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Past and pending orders.","tags":["booking"],"x-sonki-access":"signed in"}},"/orders/{id}":{"get":{"operationId":"getOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"One order with its status (awaiting_payment, paid, canceled) and payment link.","tags":["booking"],"x-sonki-access":"signed in"}},"/orders/{id}/cancel":{"post":{"operationId":"cancelOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Cancel an unpaid order; its lessons go back to the cart and credits are returned.","tags":["booking"],"x-sonki-access":"signed in"}},"/orders/{id}/payments/confirm":{"post":{"operationId":"confirmPayment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"paymentId":{"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Ask the payment provider whether this order's payment went through (after the person paid).","tags":["booking"],"x-sonki-access":"signed in"}},"/reviews/{id}/helpful":{"post":{"operationId":"markReviewHelpful","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Mark a review as helpful (one vote per person).","tags":["catalog"],"x-sonki-access":"signed in"}},"/search/categories":{"get":{"operationId":"searchCategories","parameters":[{"description":"Text to search, e.g. guitar or guitarra","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"Language to rank first","in":"query","name":"locale","required":false,"schema":{"enum":["en","es"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Find instruments/subjects by name in English or Spanish (accent-insensitive).","tags":["catalog"],"x-sonki-access":"public"}},"/teacher/availability":{"get":{"operationId":"getMyAvailability","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"My weekly schedule blocks, rules and time off.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/availability-status":{"patch":{"operationId":"setMyAvailabilityStatus","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"availabilityStatus":{"enum":["accepting","waitlist","away"],"type":"string"}},"required":["availabilityStatus"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Accepting new students, waitlist, or away (hidden from search).","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/availability/blocks":{"post":{"operationId":"createScheduleBlock","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"endsOn":{"format":"date","type":"string"},"label":{"type":"string"},"rules":{"items":{"additionalProperties":false,"properties":{"endTime":{"description":"HH:MM; 24:00 for midnight","pattern":"^\\d{2}:\\d{2}$","type":"string"},"startTime":{"description":"HH:MM in the teacher's time zone","pattern":"^\\d{2}:\\d{2}$","type":"string"},"weekday":{"description":"1 = Monday … 7 = Sunday","maximum":7,"minimum":1,"type":"integer"}},"required":["weekday","startTime","endTime"],"type":"object"},"type":"array"},"startsOn":{"format":"date","type":"string"}},"required":["label"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Add a schedule block (e.g. summer hours) with its own weekly hours and dates.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/availability/blocks/{id}":{"delete":{"operationId":"deleteScheduleBlock","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Delete a schedule block.","tags":["teacher"],"x-sonki-access":"teacher"},"put":{"operationId":"updateScheduleBlock","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"endsOn":{"format":"date","type":"string"},"label":{"type":"string"},"rules":{"items":{"additionalProperties":false,"properties":{"endTime":{"description":"HH:MM; 24:00 for midnight","pattern":"^\\d{2}:\\d{2}$","type":"string"},"startTime":{"description":"HH:MM in the teacher's time zone","pattern":"^\\d{2}:\\d{2}$","type":"string"},"weekday":{"description":"1 = Monday … 7 = Sunday","maximum":7,"minimum":1,"type":"integer"}},"required":["weekday","startTime","endTime"],"type":"object"},"type":"array"},"startsOn":{"format":"date","type":"string"}},"required":["label"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Change a schedule block.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/availability/blocks/{id}/clone":{"post":{"operationId":"cloneScheduleBlock","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Copy a schedule block.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/availability/exceptions":{"post":{"operationId":"addTimeOff","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"end":{"description":"RFC 3339, e.g. 2026-12-10T15:00:00Z","format":"date-time","type":"string"},"reason":{"type":"string"},"start":{"description":"RFC 3339, e.g. 2026-12-10T15:00:00Z","format":"date-time","type":"string"}},"required":["start","end"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Block out a time range (holiday, appointment).","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/availability/exceptions/{id}":{"delete":{"operationId":"removeTimeOff","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Remove time off.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/availability/rules":{"put":{"operationId":"setMyWeeklyHours","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"rules":{"items":{"additionalProperties":false,"properties":{"endTime":{"description":"HH:MM; 24:00 for midnight","pattern":"^\\d{2}:\\d{2}$","type":"string"},"startTime":{"description":"HH:MM in the teacher's time zone","pattern":"^\\d{2}:\\d{2}$","type":"string"},"weekday":{"description":"1 = Monday … 7 = Sunday","maximum":7,"minimum":1,"type":"integer"}},"required":["weekday","startTime","endTime"],"type":"object"},"type":"array"}},"required":["rules"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Replace the weekly hours of my main schedule.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/calendars":{"get":{"operationId":"listMyCalendars","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Outside calendars (iCal) whose busy times block my availability.","tags":["teacher"],"x-sonki-access":"teacher"},"post":{"operationId":"addMyCalendar","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["url"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Connect an outside calendar by its private iCal address.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/calendars/{id}":{"delete":{"operationId":"removeMyCalendar","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Disconnect an outside calendar.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/calendars/{id}/refresh":{"post":{"operationId":"refreshMyCalendar","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Re-read an outside calendar now.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/discounts":{"get":{"operationId":"listMyDiscounts","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"My promotions and package deals.","tags":["teacher"],"x-sonki-access":"teacher"},"post":{"operationId":"createDiscount","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"durations":{"description":"Empty = every lesson length","items":{"enum":[15,30,45,60,90],"type":"integer"},"type":"array"},"enabled":{"type":"boolean"},"endsOn":{"format":"date","type":"string"},"freeQty":{"maximum":10,"minimum":1,"type":"integer"},"kind":{"enum":["percent_off","buy_x_get_y","price_list"],"type":"string"},"maxUsesPerStudent":{"type":"integer"},"maxUsesTotal":{"type":"integer"},"minQty":{"description":"Lessons bought in one go for the deal to apply (packages: 5, 10, 20)","maximum":20,"minimum":1,"type":"integer"},"newStudentsOnly":{"type":"boolean"},"percentOff":{"maximum":90,"minimum":1,"type":"integer"},"prices":{"items":{"additionalProperties":false,"properties":{"cents":{"type":"integer"},"durationMin":{"type":"integer"}},"required":["durationMin","cents"],"type":"object"},"type":"array"},"startsOn":{"format":"date","type":"string"},"studentIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"title":{"type":"string"}},"required":["kind"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Add a promotion: percent off (e.g. 10% for 10 lessons), buy X get Y, or a student price list.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/discounts/reorder":{"post":{"operationId":"reorderDiscounts","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"ids":{"items":{"format":"uuid","type":"string"},"type":"array"}},"required":["ids"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Set which promotion applies first.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/discounts/{id}":{"delete":{"operationId":"deleteDiscount","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Delete a promotion.","tags":["teacher"],"x-sonki-access":"teacher"},"put":{"operationId":"updateDiscount","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"durations":{"description":"Empty = every lesson length","items":{"enum":[15,30,45,60,90],"type":"integer"},"type":"array"},"enabled":{"type":"boolean"},"endsOn":{"format":"date","type":"string"},"freeQty":{"maximum":10,"minimum":1,"type":"integer"},"kind":{"enum":["percent_off","buy_x_get_y","price_list"],"type":"string"},"maxUsesPerStudent":{"type":"integer"},"maxUsesTotal":{"type":"integer"},"minQty":{"description":"Lessons bought in one go for the deal to apply (packages: 5, 10, 20)","maximum":20,"minimum":1,"type":"integer"},"newStudentsOnly":{"type":"boolean"},"percentOff":{"maximum":90,"minimum":1,"type":"integer"},"prices":{"items":{"additionalProperties":false,"properties":{"cents":{"type":"integer"},"durationMin":{"type":"integer"}},"required":["durationMin","cents"],"type":"object"},"type":"array"},"startsOn":{"format":"date","type":"string"},"studentIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"title":{"type":"string"}},"required":["kind"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Change a promotion.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/display-settings":{"get":{"operationId":"getMyDisplaySettings","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"How my public profile shows reviews and sections.","tags":["teacher"],"x-sonki-access":"teacher"},"put":{"operationId":"setMyDisplaySettings","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"settings":{"type":"object"}},"required":["settings"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Change profile display settings.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/earnings":{"get":{"operationId":"getMyEarnings","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Earnings per lesson, pending and paid.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/inquiries":{"get":{"operationId":"listInquiryBoard","parameters":[{"description":"Filter","in":"query","name":"status","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Students looking for a teacher of my subjects.","tags":["inquiries"],"x-sonki-access":"teacher"}},"/teacher/inquiries/{id}/respond":{"post":{"operationId":"respondToInquiry","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"body":{"type":"string"}},"required":["body"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Answer a student's request (starts a message thread).","tags":["inquiries"],"x-sonki-access":"teacher"}},"/teacher/lesson-offers":{"get":{"operationId":"listLessonOffers","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Lessons I offered to students that they haven't paid yet.","tags":["teacher"],"x-sonki-access":"teacher"},"post":{"operationId":"createLessonOffer","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"categoryId":{"format":"uuid","type":"string"},"durationMin":{"enum":[15,30,45,60,90],"type":"integer"},"message":{"type":"string"},"quantity":{"enum":[1,5,10,20],"type":"integer"},"start":{"description":"RFC 3339, e.g. 2026-12-10T15:00:00Z","format":"date-time","type":"string"},"studentId":{"format":"uuid","type":"string"}},"required":["studentId","categoryId","durationMin"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Offer lessons to one of my students (goes to their cart, they pay).","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/lesson-offers/{itemId}":{"delete":{"operationId":"withdrawLessonOffer","parameters":[{"in":"path","name":"itemId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Withdraw an unpaid offer.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/outreach":{"get":{"operationId":"getMyOutreach","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"My referral code and short links.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/outreach/code":{"put":{"operationId":"setMyReferralCode","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"code":{"type":"string"}},"required":["code"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Change my referral code.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/outreach/links":{"post":{"operationId":"createShortLink","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"destination":{"type":"string"},"enabled":{"type":"boolean"},"path":{"type":"string"}},"required":["path","destination"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Add a short link (sonki.co/r/code/path) to a destination.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/outreach/links/{id}":{"delete":{"operationId":"deleteShortLink","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Delete a short link.","tags":["teacher"],"x-sonki-access":"teacher"},"put":{"operationId":"updateShortLink","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"destination":{"type":"string"},"enabled":{"type":"boolean"},"path":{"type":"string"}},"required":["path","destination"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Change a short link.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/payout-method":{"get":{"operationId":"getMyPayoutMethod","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"How I get paid (changing it is only possible in the app).","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/profile":{"get":{"operationId":"getMyTeacherProfile","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"My teacher profile as I edit it, with status (draft/pending/approved), meeting link and files.","tags":["teacher"],"x-sonki-access":"teacher"},"put":{"operationId":"updateMyTeacherProfile","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"agesTaught":{"items":{"enum":["kids","teens","adults"],"type":"string"},"type":"array"},"bio":{"type":"string"},"city":{"type":["string","null"]},"country":{"type":["string","null"]},"credentials":{"type":"string"},"curriculum":{"type":"string"},"focusAreas":{"items":{"type":"string"},"type":"array"},"headline":{"maxLength":120,"type":"string"},"languages":{"items":{"pattern":"^[a-z]{2}$","type":"string"},"type":"array"},"meetingLink":{"type":["string","null"]},"phone":{"type":["string","null"]},"subjectIds":{"items":{"format":"uuid","type":"string"},"maxItems":12,"type":"array"},"teachingStyle":{"type":"string"},"timezone":{"type":"string"},"videoUrls":{"items":{"type":"string"},"maxItems":6,"type":"array"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Save my teacher profile. headline…subjectIds replace what's stored (send them all); other fields are optional.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/rates":{"put":{"operationId":"setMyRates","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"hideRates":{"type":"boolean"},"rates":{"items":{"additionalProperties":false,"properties":{"cents":{"maximum":100000,"minimum":100,"type":"integer"},"durationMin":{"enum":[15,30,45,60,90],"type":"integer"}},"required":["durationMin","cents"],"type":"object"},"type":"array"},"trialDurations":{"description":"Empty = no free trial","items":{"enum":[15,30],"type":"integer"},"type":"array"}},"required":["rates"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Prices per lesson length (cents USD), free trial lengths, and whether rates are hidden.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/referral-link":{"get":{"operationId":"getMyReferralLink","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"My profile link that lowers Sonki's fee for students I bring.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/reviews":{"get":{"operationId":"listMyReviews","parameters":[{"description":"Only featured","in":"query","name":"featured","required":false,"schema":{"enum":["1"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Reviews students left me.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/reviews/{id}/feature":{"post":{"operationId":"featureMyReview","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"featured":{"type":"boolean"}},"required":["featured"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Feature a review on my profile.","tags":["teacher"],"x-sonki-access":"teacher"}},"/teacher/submit":{"post":{"operationId":"submitMyTeacherProfile","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Publish the profile (it must be complete: headline, bio, subjects, languages, rates, availability).","tags":["teacher"],"x-sonki-access":"teacher"}},"/teachers":{"get":{"operationId":"listTeachers","parameters":[{"description":"Category slug (English or Spanish); includes sub-categories","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Order","in":"query","name":"sort","required":false,"schema":{"enum":["recommended","popular","rating","price"],"type":"string"}},{"description":"Only teachers offering a free trial","in":"query","name":"trial","required":false,"schema":{"enum":["1"],"type":"string"}},{"description":"Only teachers who teach kids","in":"query","name":"kids","required":false,"schema":{"enum":["1"],"type":"string"}},{"description":"Lesson language, ISO 639-1 (en, es, pt…)","in":"query","name":"lang","required":false,"schema":{"type":"string"}},{"description":"Comma list of mon,tue,wed,thu,fri,sat,sun: teaches on these days","in":"query","name":"days","required":false,"schema":{"type":"string"}},{"description":"Time of day, in tz","in":"query","name":"time","required":false,"schema":{"enum":["morning","afternoon","evening","afterschool"],"type":"string"}},{"description":"Viewer's IANA time zone for days/time (default UTC)","in":"query","name":"tz","required":false,"schema":{"type":"string"}},{"description":"Minimum price of the cheapest lesson, cents USD","in":"query","name":"minPrice","required":false,"schema":{"type":"integer"}},{"description":"Maximum price of the cheapest lesson, cents USD","in":"query","name":"maxPrice","required":false,"schema":{"type":"integer"}},{"description":"Page number, from 1","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Items per page (max 50)","in":"query","name":"pageSize","required":false,"schema":{"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Search approved teachers by instrument, language, price, trial, kids and weekly availability.","tags":["catalog"],"x-sonki-access":"public"}},"/teachers/{slug}":{"get":{"operationId":"getTeacher","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"A teacher's full profile: bio, style, subjects (with ids), languages, rates per lesson length, trial, promotions, reviews summary.","tags":["catalog"],"x-sonki-access":"public"}},"/teachers/{slug}/availability":{"get":{"operationId":"getTeacherAvailability","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Start of the range (default now)","in":"query","name":"from","required":false,"schema":{"description":"RFC 3339, e.g. 2026-12-10T15:00:00Z","format":"date-time","type":"string"}},{"description":"End of the range","in":"query","name":"to","required":false,"schema":{"description":"RFC 3339, e.g. 2026-12-10T15:00:00Z","format":"date-time","type":"string"}},{"description":"Lesson length in minutes (default 30)","in":"query","name":"durationMin","required":false,"schema":{"enum":[15,30,45,60,90],"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Bookable start times for a lesson length (default next 14 days, max 31).","tags":["catalog"],"x-sonki-access":"public"}},"/teachers/{slug}/reviews":{"get":{"operationId":"listTeacherReviews","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Page number, from 1","in":"query","name":"page","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"Items per page (max 50)","in":"query","name":"pageSize","required":false,"schema":{"maximum":50,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Reviews of a teacher, featured first.","tags":["catalog"],"x-sonki-access":"public"}}},"security":[{"bearerAuth":[]},{"oauth2":["read","write"]}],"servers":[{"url":"https://sonki.co/api/v1"}],"tags":[{"description":"Teachers, instruments, prices and availability (public)","name":"catalog"},{"description":"Cart, checkout (Mercado Pago link) and orders","name":"booking"},{"description":"Scheduling, rescheduling, canceling and reviewing lessons","name":"lessons"},{"description":"Conversations between students and teachers","name":"messages"},{"description":"Teacher profile, prices, packages and availability","name":"teacher"},{"description":"The signed-in person","name":"account"},{"description":"Contacts and calendars","name":"contacts"},{"description":"Uploaded files","name":"files"},{"description":"Get-matched requests","name":"inquiries"}]}