Skip to content

API Overview

Internal API — Arc

The Sema Link backend API is served on the arc subdomain per environment.

EnvironmentBase URL
Staginghttps://staging-arc.semalink.africa
Testhttps://test-arc.semalink.africa
Productionhttps://arc.semalink.africa

Authentication

All API requests must include Cloudflare Access service token headers:

CF-Access-Client-Id:     <value>
CF-Access-Client-Secret: <value>

Requests without these headers are rejected at the Cloudflare edge with 403 Forbidden before reaching the server. See Zero Trust & API Access for full details.

HTTP Client

All API calls go through the centralised Axios instance at src/core/api/. Do not use fetch or create separate Axios instances — all requests should use the shared client so headers and interceptors are applied consistently.

API Version

All endpoints are prefixed with the API version:

/api/v1/<resource>

The version is controlled by the API_VERSION environment variable on the server.

Response Format

Success

Responses return the resource or array directly (no wrapper envelope). HTTP status codes follow REST conventions — 200 OK, 201 Created, 204 No Content.

Errors

All errors return a consistent JSON shape:

json
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Human-readable description of the error"
}

Common status codes:

CodeMeaning
400Validation error — check the message field
401Missing or invalid access token / revoked refresh token
403Authenticated but insufficient role permissions
404Resource not found
409Conflict — e.g. email already registered
500Internal server error

Endpoint Reference

ResourcePage
Auth (register, login, refresh, logout)Auth Endpoints
Users & Team managementUsers Endpoints

Internal use only — Sema Link Engineering