Skip to content
MantraWorx
Developers › API overview

Developers

API overview

Understand the API base URL, session authentication and your first read request.

ReferenceContent reviewed

On this page

The web app uses a JSON API under /api on your MantraWorx host. Establish a session before requesting protected data. Access to an endpoint does not grant access to every record.

Before you start#

  • Use your organization's HTTPS host and an active account.
  • Complete authentication, including multi-factor authentication (MFA) if enabled.
  • Confirm that your role can access the resource you need.
  • For an external integration, confirm the supported scope with your administrator. These pages describe the application API; do not assume an API-key or OAuth flow exists.

Request conventions#

ItemConvention
Base pathhttps://HOST/api; replace HOST with your organization's host.
JSON bodySend Content-Type: application/json.
Browser sessionAn HttpOnly auth_token cookie that JavaScript does not read.
External clientRetain cookies from login and MFA in the same client session.
ResponsesCheck the HTTP status before using the body.
AccessComponent permissions and target-record rules both apply.

Make your first read request#

Call GET /api/auth/me after login and any MFA challenge complete.

For curl, set MANTRAWORX_URL to your HTTPS host without a trailing slash and COOKIE_JAR to the protected cookie file from login. For Python, reuse session and base_url from the authentication guide. JavaScript runs on the MantraWorx origin.

bash
curl --fail-with-body --cookie "$COOKIE_JAR" \
  "$MANTRAWORX_URL/api/auth/me"

Check the result#

Confirm that the response identifies the intended account. A 401 means the session is absent or no longer valid. A 503 can mean verification is temporarily unavailable; do not erase a session solely because of that response.

Continue#

Need more help?

Can’t find what you need? Talk to the team.

To report a problem with this guide, include its title and the step that blocked you.

Contact support