Developer · API

Use MAY from your own backend.

The public developer guide documents the integration pattern without pretending endpoint paths that are not exposed by the deployed API reference. Use the exact endpoint path shown for your MAY environment.

Base URL

Testhttps://api.thisismay.ai
Production targethttps://api.thisismay.ai

Authentication

Trusted application requests use a private API credential created in Business Admin → Developer.

HTTP
Authorization: Bearer YOUR_MAY_API_KEY
Content-Type: application/json

Server-side request pattern

JavaScript
const MAY_API = process.env.MAY_API_BASE;
const MAY_KEY = process.env.MAY_API_KEY;

async function mayRequest(path, options = {}) {
  const response = await fetch(`${MAY_API}${path}`, {
    ...options,
    headers: {
      Authorization: `Bearer ${MAY_KEY}`,
      "Content-Type": "application/json",
      ...(options.headers || {})
    }
  });

  if (!response.ok) {
    const body = await response.text();
    throw new Error(`MAY ${response.status}: ${body}`);
  }
  return response.json();
}

// Use the endpoint path published for your MAY environment.
const result = await mayRequest("/YOUR_ENDPOINT");
Python
import os
import requests

base = os.environ["MAY_API_BASE"]
key = os.environ["MAY_API_KEY"]

response = requests.get(
    f"{base}/YOUR_ENDPOINT",
    headers={"Authorization": f"Bearer {key}"},
    timeout=20,
)
response.raise_for_status()
data = response.json()

Common responses

401Credential missing, invalid or expired.
403The credential is valid but does not have permission for that operation.
404The endpoint or requested resource is not available in this environment.
429Request rate or usage limit reached.
5xxServer-side failure. Retry only when appropriate and log the response safely.

Production checklist

Private API key stored in a secret manager or server environmentAPI base URL is environment-configurableTimeouts and error handling are implementedLogs do not print secret credentialsOnly required permissions are grantedKey rotation has an owner and process
Need help implementing MAY?

Use the guide, then configure it in Business Admin.