Version 1.0.0-draft

saMas School API

One gateway at api.samas.school. saMas School is API first: our own web and mobile apps use these same endpoints. This site documents the public APIs; every request is validated against the schemas shown here before it reaches the database.

Student API

/v1/me

Signed-in students and parents; the saMas School mobile apps.

Auth: Session token (Bearer)

129 paths, 143 operations

School API

/v1/school

Software acting for one school: bank feeds, ERP, WhatsApp, the school website.

Auth: Per-school key in X-Api-Key, scoped

43 paths, 51 operations

Quran Partner API

/v1/partner

An open contract for Quran reading apps a madrasa connects: links approved by parents, homework, home practice, recitations and feedback.

Auth: Per-school partner key in X-Api-Key (sk_partner_)

16 paths, 19 operations

Getting started

Base URL https://api.samas.school/v1 (beta, demo schools only: https://api-beta.samas.school/v1). Send JSON with Content-Type: application/json. Every response uses the same envelope: { "data": ..., "meta": { "request_id", "generated_at" } }, lists add page, errors return { "error": { "code", "message", "hint", "field", "request_id" } }.

Writes accept an Idempotency-Key header; recording a payment requires one. Unknown fields are rejected, strings have length limits, and every rule is listed next to its field in the reference. Machine-readable documents: me.json, school.json, also served at https://api.samas.school/v1/openapi/<api>.json.

School integrations get a key from the school admin under Settings, API keys. The office and platform APIs are internal and not documented here.

New here? Start with the Getting started guide, then the step-by-step guides for handing in homework, applying for admission, messages, permission slips, reporting a problem and importing students under Guides.