Clone
3
API
AmirGhost11 edited this page 2026-05-18 15:27:54 +00:00

General server API structure & basics

In this page, we introduce fundementals of How server handle APIs & How to send API to server

How server handles APIs

This section is for back-end developers of server.

How to send API to server

This section is for every developer who needs to send API to server.

Endpoints:

Formula of endpoints: https:// or http:// + server address + /tag + /route/to/target

example: https://medad.fun/v1/ads/get

  • Tags: Every endpoint starts with the version or tag. Tags divides the version of controller, useful for tests and migration (v1, beta, test, etc)
  • Group: Relevant endpoints have grouped. (/auth, /widget, /user, etc)

Response:

REST responses follow this structure:

{
    "success": true, // boolean
    "message": "some message", // string
    "data": {}, // any (nullable)
    "errors": [] // error (nullable)
}