For Developers

API

The Office File is a public template library, and its API is small on purpose. There are two form endpoints that send a message to the site team, and one health check. There are no accounts, no login, and no API key. Everything below is also described in the OpenAPI document and listed in the API catalog.

Send a contact message

POST https://theofficefile.com/api/contact

Sends a message to [email protected]. The sender email is used as the reply-to address. Send JSON with these fields:

  • name (required, up to 100 characters)
  • email (required, a valid email address)
  • topic (required, one of template-request, template-error, download-problem, privacy-or-legal, other)
  • message (required, up to 5,000 characters)
  • website (honeypot, leave empty; a filled value returns success without sending anything)

Success returns 200 with {"ok": true}. A missing or invalid field returns 400 with{"ok": false, "error": "..."}, and the error names the problem.

Request a template

POST https://theofficefile.com/api/request-template

Sends a template request to [email protected]. Only the task is required. Send JSON with these fields:

  • task (required, up to 200 characters, the template or task needed)
  • role (optional, up to 100 characters, for example Office Manager)
  • details (optional, up to 5,000 characters, what the document should cover and who uses it)
  • email (optional, a valid email address, used as the reply-to address when given)
  • website (honeypot, leave empty)

Success returns 200 with {"ok": true}. A missing or invalid field returns 400 with an error message.

Health check

GET https://theofficefile.com/api/health

Returns 200 with {"ok": true} when the API is up.

Example

curl -X POST https://theofficefile.com/api/request-template -H "Content-Type: application/json" -d '{"task": "Vehicle logbook for office cars", "role": "Office Manager"}'

Questions

For anything about the API, write to[email protected] or use the contact form.