productivity
Recruitee Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Recruitee KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.recruitee.*.
Use lua_read_doc("integrations.recruitee") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
Recruitee workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.recruitee.list_offers({}))' --json kosmo integrations:lua --eval 'print(docs.read("recruitee"))' --json
kosmo integrations:lua --eval 'print(docs.read("recruitee.list_offers"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local recruitee = app.integrations.recruitee
local result = recruitee.list_offers({})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.recruitee, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.recruitee.default.* or app.integrations.recruitee.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Recruitee, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
Recruitee Lua API Reference
Namespace: app.integrations.recruitee
Recruitee tools call the company-scoped Core API at https://api.recruitee.com/c/{company_id}. The configured company ID may also be a company subdomain. Tool results are the normalized JSON returned by Recruitee; common top-level keys include offers, candidates, departments, locations, or a single resource key depending on the endpoint.
Offers
local offers = app.integrations.recruitee.list_offers({
status = "published",
limit = 25
})
local offer = app.integrations.recruitee.get_offer({ id = 12345 })
local created = app.integrations.recruitee.create_offer({
offer = {
title = "Support Engineer",
kind = "job"
}
})
local updated = app.integrations.recruitee.update_offer({
id = 12345,
offer = {
status = "published"
}
})
delete_offer({ id = ... }) permanently deletes the offer in Recruitee.
Candidates
local candidates = app.integrations.recruitee.list_candidates({
limit = 25
})
local search = app.integrations.recruitee.search_candidates({
limit = 50,
page = 1,
sort_by = "created_at_desc"
})
local candidate = app.integrations.recruitee.get_candidate({ id = 67890 })
local created = app.integrations.recruitee.create_candidate({
candidate = {
name = "Example Candidate",
emails = { "candidate@example.test" }
},
offers = { 12345 }
})
update_candidate({ id = ..., candidate = {...} }) wraps the body as { candidate = ... }.
update_candidate_cv({ id = ..., candidate = {...} }) calls PATCH /candidates/{id}/update_cv.
delete_candidate({ id = ... }) permanently deletes the candidate in Recruitee.
list_candidate_notes({ id = ... }) returns notes for one candidate.
Company Metadata
local departments = app.integrations.recruitee.list_departments()
local locations = app.integrations.recruitee.list_locations({
scope = "active",
view_mode = "brief",
limit = 10
})
get_current_user() calls /users/me for host deployments that expose it.
Attachments
local uploaded = app.integrations.recruitee.upload_attachment({
attachment = {
remote_file_url = "https://example.test/resume.pdf",
candidate_id = 67890
}
})
The attachment body is passed as { attachment = ... }.
Generic Core API Helpers
Use the generic helpers for documented Recruitee endpoints that do not yet have a dedicated wrapper. Paths must be relative to /c/{company_id}.
local result = app.integrations.recruitee.api_get({
path = "/locations",
params = { limit = 10 }
})
local patched = app.integrations.recruitee.api_patch({
path = "/offers/12345",
body = {
offer = {
title = "Senior Support Engineer"
}
}
})
Available helpers:
| Function | Purpose |
|---|---|
api_get | GET with optional query params |
api_post | POST with JSON body |
api_patch | PATCH with JSON body |
api_delete | DELETE with optional JSON body |
Absolute URLs are rejected; use a relative path such as /candidates/67890/notes.
Multi-Account Usage
app.integrations.recruitee.list_offers({ limit = 10 })
app.integrations.recruitee.default.list_offers({ limit = 10 })
app.integrations.recruitee.production.list_offers({ limit = 10 })Raw agent markdown
# Recruitee Lua API Reference
Namespace: `app.integrations.recruitee`
Recruitee tools call the company-scoped Core API at `https://api.recruitee.com/c/{company_id}`. The configured company ID may also be a company subdomain. Tool results are the normalized JSON returned by Recruitee; common top-level keys include `offers`, `candidates`, `departments`, `locations`, or a single resource key depending on the endpoint.
## Offers
```lua
local offers = app.integrations.recruitee.list_offers({
status = "published",
limit = 25
})
local offer = app.integrations.recruitee.get_offer({ id = 12345 })
local created = app.integrations.recruitee.create_offer({
offer = {
title = "Support Engineer",
kind = "job"
}
})
local updated = app.integrations.recruitee.update_offer({
id = 12345,
offer = {
status = "published"
}
})
```
`delete_offer({ id = ... })` permanently deletes the offer in Recruitee.
## Candidates
```lua
local candidates = app.integrations.recruitee.list_candidates({
limit = 25
})
local search = app.integrations.recruitee.search_candidates({
limit = 50,
page = 1,
sort_by = "created_at_desc"
})
local candidate = app.integrations.recruitee.get_candidate({ id = 67890 })
local created = app.integrations.recruitee.create_candidate({
candidate = {
name = "Example Candidate",
emails = { "candidate@example.test" }
},
offers = { 12345 }
})
```
`update_candidate({ id = ..., candidate = {...} })` wraps the body as `{ candidate = ... }`.
`update_candidate_cv({ id = ..., candidate = {...} })` calls `PATCH /candidates/{id}/update_cv`.
`delete_candidate({ id = ... })` permanently deletes the candidate in Recruitee.
`list_candidate_notes({ id = ... })` returns notes for one candidate.
## Company Metadata
```lua
local departments = app.integrations.recruitee.list_departments()
local locations = app.integrations.recruitee.list_locations({
scope = "active",
view_mode = "brief",
limit = 10
})
```
`get_current_user()` calls `/users/me` for host deployments that expose it.
## Attachments
```lua
local uploaded = app.integrations.recruitee.upload_attachment({
attachment = {
remote_file_url = "https://example.test/resume.pdf",
candidate_id = 67890
}
})
```
The attachment body is passed as `{ attachment = ... }`.
## Generic Core API Helpers
Use the generic helpers for documented Recruitee endpoints that do not yet have a dedicated wrapper. Paths must be relative to `/c/{company_id}`.
```lua
local result = app.integrations.recruitee.api_get({
path = "/locations",
params = { limit = 10 }
})
local patched = app.integrations.recruitee.api_patch({
path = "/offers/12345",
body = {
offer = {
title = "Senior Support Engineer"
}
}
})
```
Available helpers:
| Function | Purpose |
|----------|---------|
| `api_get` | GET with optional query params |
| `api_post` | POST with JSON body |
| `api_patch` | PATCH with JSON body |
| `api_delete` | DELETE with optional JSON body |
Absolute URLs are rejected; use a relative path such as `/candidates/67890/notes`.
## Multi-Account Usage
```lua
app.integrations.recruitee.list_offers({ limit = 10 })
app.integrations.recruitee.default.list_offers({ limit = 10 })
app.integrations.recruitee.production.list_offers({ limit = 10 })
``` local result = app.integrations.recruitee.list_offers({})
print(result) Functions
list_offers Read
List company offers.
- Lua path
app.integrations.recruitee.list_offers- Full name
recruitee.recruitee_list_offers
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_offer Read
Get one offer.
- Lua path
app.integrations.recruitee.get_offer- Full name
recruitee.recruitee_get_offer
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
create_offer Write
Create a company offer.
- Lua path
app.integrations.recruitee.create_offer- Full name
recruitee.recruitee_create_offer
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
update_offer Write
Update a company offer.
- Lua path
app.integrations.recruitee.update_offer- Full name
recruitee.recruitee_update_offer
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
delete_offer Write
Delete a company offer.
- Lua path
app.integrations.recruitee.delete_offer- Full name
recruitee.recruitee_delete_offer
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_candidates Read
List candidates.
- Lua path
app.integrations.recruitee.list_candidates- Full name
recruitee.recruitee_list_candidates
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
search_candidates Read
Search candidates through the new search endpoint.
- Lua path
app.integrations.recruitee.search_candidates- Full name
recruitee.recruitee_search_candidates
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_candidate Read
Get one candidate.
- Lua path
app.integrations.recruitee.get_candidate- Full name
recruitee.recruitee_get_candidate
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
create_candidate Write
Create a candidate.
- Lua path
app.integrations.recruitee.create_candidate- Full name
recruitee.recruitee_create_candidate
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
update_candidate Write
Update a candidate.
- Lua path
app.integrations.recruitee.update_candidate- Full name
recruitee.recruitee_update_candidate
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
update_candidate_cv Write
Update a candidate CV file.
- Lua path
app.integrations.recruitee.update_candidate_cv- Full name
recruitee.recruitee_update_candidate_cv
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
delete_candidate Write
Delete a candidate.
- Lua path
app.integrations.recruitee.delete_candidate- Full name
recruitee.recruitee_delete_candidate
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_candidate_notes Read
List notes for one candidate.
- Lua path
app.integrations.recruitee.list_candidate_notes- Full name
recruitee.recruitee_list_candidate_notes
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_departments Read
List departments.
- Lua path
app.integrations.recruitee.list_departments- Full name
recruitee.recruitee_list_departments
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_locations Read
List company locations.
- Lua path
app.integrations.recruitee.list_locations- Full name
recruitee.recruitee_list_locations
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
upload_attachment Write
Upload a remote file attachment.
- Lua path
app.integrations.recruitee.upload_attachment- Full name
recruitee.recruitee_upload_attachment
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_current_user Read
Get current user when available.
- Lua path
app.integrations.recruitee.get_current_user- Full name
recruitee.recruitee_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
api_get Read
Call a documented Recruitee GET endpoint.
- Lua path
app.integrations.recruitee.api_get- Full name
recruitee.recruitee_api_get
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
api_post Write
Call a documented Recruitee POST endpoint.
- Lua path
app.integrations.recruitee.api_post- Full name
recruitee.recruitee_api_post
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
api_patch Write
Call a documented Recruitee PATCH endpoint.
- Lua path
app.integrations.recruitee.api_patch- Full name
recruitee.recruitee_api_patch
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
api_delete Write
Call a documented Recruitee DELETE endpoint.
- Lua path
app.integrations.recruitee.api_delete- Full name
recruitee.recruitee_api_delete
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||