Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.tarefy.com/llms.txt

Use this file to discover all available pages before exploring further.

Conventions

The API uses standard HTTP status codes. The response body is JSON with message and optionally code / errors:
{
  "message": "Validation failed",
  "errors": {
    "email": "Invalid email",
    "password": "Minimum 8 characters"
  }
}

Most common codes

StatusWhen it occurs
200Success
201Resource created
204Success with no content (e.g. delete)
400Bad request — malformed payload or invalid data
401Not authenticated (missing, invalid or expired token)
402Payment required — subscription expired
403No permission for this endpoint
404Resource not found
422Validation failed — body has errors per field
429Rate limit — slow down
500Internal error — retry; if it persists, contact support
async function callApi(path, options) {
  const res = await fetch(`https://app.tarefy.com/nodeapi${path}`, options);

  if (res.status === 401) {
    // token expired → refresh and retry
    await refreshToken();
    return callApi(path, options);
  }

  if (res.status === 402) {
    throw new Error('Subscription expired — check billing');
  }

  if (!res.ok) {
    const body = await res.json();
    throw new Error(body.message || `HTTP ${res.status}`);
  }

  return res.json();
}