Coding agent documentation index Fetch the complete documentation index at: https://docs.worklittle.com/docs-agent-manifest.json Use this file to discover all available pages before exploring further.

Organization operations

Write surveys, HR documents, and attendance from code so the results show up in the Worklittle UI your team already uses, with no separate internal tool to maintain.

The point of this pattern is not the API. It is that a script or an agent can produce something a non-technical teammate opens in the product five seconds later.

When to use

An onboarding automation that creates an offer letter, sends it for signature, and books the first week on the calendar. A pulse survey cadence driven by a cron job rather than by someone remembering. An internal agent that answers "who is out next week" and can also file the time off. HRIS glue that writes attendance from another system of record into the Worklittle calendar.

Everything here is organization-scoped and gated by org role in addition to key scope. A 403 on these routes often means the key is fine but the member lacks access.

Surveys

Manage with a key, collect without one.

| Method | Path | Purpose |
| --- | --- | --- |
| GET / POST | `/business/surveys` | List and create |
| GET / PATCH / DELETE | `/business/surveys/:id` | Read, update, delete |
| POST | `/business/surveys/:id/duplicate` | Clone a survey |
| GET | `/business/surveys/:id/responses` | Read responses |
| PATCH / DELETE | `/business/surveys/:id/responses/bulk` | Bulk edit or delete |
| GET / PUT | `/business/surveys/:id/shares` | Share targets |
| GET | `/business/surveys/public/:id` | Public form schema, no key |
| POST | `/business/surveys/public/:id/responses` | Public submit, no key |

Management routes need employees:read. Answer keys in a submit body must be question ids, not question text. Reference: Surveys.

Documents and e-sign

Documents live under /business/documents and cover the full lifecycle from template to signed PDF.

curl -s -X POST "https://api.worklittle.com/business/documents" \
  -H "Authorization: Bearer $WORKLITTLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Offer letter",
    "template_key": "offer_letter",
    "body_html": "<p>Hello {{employee_name}}</p>"
  }'

curl -s -X PUT "https://api.worklittle.com/business/documents/DOC_ID/shares" \
  -H "Authorization: Bearer $WORKLITTLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"shares":[{"email":"alex@example.com"}]}'

Merge tags resolve at sign time and include {{company_name}}, {{company_logo}}, {{company_address}}, {{employee_name}}, {{employee_title}}, and {{today_date}}. Reads need documents:read, writes need documents:write, and GET /business/documents needs employees:read.

If an agent drafts these, have it call list_hr_document_templates and then get_hr_document_spec_guide before writing legal-adjacent text from scratch. The spec guide carries the professionalism, merge tag, and jurisdiction rules. Reference: Documents.

Attendance

Attendance is the calendar API. There is no /calendar prefix.

| Method | Path | Purpose |
| --- | --- | --- |
| GET | `/business/attendance` | Org calendar entries |
| GET | `/business/employees/:id/attendance` | Entries for one employee |
| POST | `/business/attendance` | Create an entry |
| PATCH / DELETE | `/business/attendance/:id` | Update or remove |
| POST | `/business/attendance/:id/approve` | Approve a pending edit |
| POST | `/business/attendance/:id/deny` | Deny a pending edit |

Scope is jobs:applications. The MCP list tool returns self_employee_id, can_write_any, and can_write_self, which is how an agent should decide whether it may schedule someone other than the key owner. Recurrence uses rules such as FREQ=WEEKLY;BYDAY=MO,WE,FR. Reference: Attendance.

Pitfalls

| Pitfall | What to do instead |
| --- | --- |
| Reading a 403 as a bad API key | Check the member's org role too |
| Submitting survey answers keyed by question text | Key by question id |
| Drafting HR documents without the spec guide | Call `get_hr_document_spec_guide` first |
| Assuming an agent can schedule anyone | Respect `can_write_any` versus `can_write_self` |
| Sending a document before adding signers | Create, then `PUT .../shares`, then track signatures |

Related docs

Surveys, Documents, Attendance, Manage organization. Survey events for automation: Webhooks.