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)

187 paths, 213 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

57 paths, 66 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

Apps API (Draft) Draft

/v1/apps

Not switched on yet: what a school app sees of one school, with the school's install and each family's yes.

Auth: App key in X-Api-Key (sk_app_) and a user token (Bearer) from POST /apps/token

18 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, partner.json and, as a Draft, apps.json; the published APIs are 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.

Building an app for schools? Read Build a school app (Draft): school apps and the Apps API are published early as a Draft and are not switched on yet.