KosmoKrator

hr

Ashby Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Ashby KosmoKrator integration.

7 functions 7 read 0 write Bearer token auth

Lua Namespace

Agents call this integration through app.integrations.ashby.*. Use lua_read_doc("integrations.ashby") inside KosmoKrator to discover the same reference at runtime.

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Ashby ATS — Lua API Reference

list_applications

List job applications with optional filters.

Parameters

NameTypeRequiredDescription
limitintegernoMaximum number of applications to return (default: 100)
offsetintegernoNumber of results to skip for pagination
job_idstringnoFilter applications by job ID
statusstringnoFilter by application status (e.g., “hired”, “rejected”, “active”)

Examples

-- List all applications
local result = app.integrations.ashby.list_applications({})

-- List applications for a specific job
local result = app.integrations.ashby.list_applications({
  job_id = "job_abc123"
})

-- Paginate through applications
local result = app.integrations.ashby.list_applications({
  limit = 50,
  offset = 100
})

get_application

Get detailed information about a specific application.

Parameters

NameTypeRequiredDescription
idstringyesThe application ID

Examples

local result = app.integrations.ashby.get_application({
  id = "app_xyz789"
})

list_jobs

List job postings with optional status filter.

Parameters

NameTypeRequiredDescription
limitintegernoMaximum number of jobs to return (default: 100)
offsetintegernoNumber of results to skip for pagination
statusstringnoFilter by job status (e.g., “open”, “closed”, “draft”)

Examples

-- List all jobs
local result = app.integrations.ashby.list_jobs({})

-- List only open positions
local result = app.integrations.ashby.list_jobs({
  status = "open"
})

-- Paginate
local result = app.integrations.ashby.list_jobs({
  limit = 50,
  offset = 50
})

get_job

Get detailed information about a specific job.

Parameters

NameTypeRequiredDescription
idstringyesThe job ID

Examples

local result = app.integrations.ashby.get_job({
  id = "job_abc123"
})

list_interviews

List scheduled interviews with optional application filter.

Parameters

NameTypeRequiredDescription
limitintegernoMaximum number of interviews to return (default: 100)
offsetintegernoNumber of results to skip for pagination
application_idstringnoFilter interviews by application ID

Examples

-- List all interviews
local result = app.integrations.ashby.list_interviews({})

-- List interviews for a specific application
local result = app.integrations.ashby.list_interviews({
  application_id = "app_xyz789"
})

get_interview

Get detailed information about a specific interview.

Parameters

NameTypeRequiredDescription
idstringyesThe interview ID

Examples

local result = app.integrations.ashby.get_interview({
  id = "interview_def456"
})

get_current_user

Get the profile of the currently authenticated Ashby user.

Parameters

None.

Examples

local result = app.integrations.ashby.get_current_user({})
print(result.email)

Multi-Account Usage

If you have multiple Ashby accounts configured, use account-specific namespaces:

-- Default account (always works)
app.integrations.ashby.list_jobs({})

-- Explicit default (portable across setups)
app.integrations.ashby.default.list_jobs({})

-- Named accounts
app.integrations.ashby.production.list_jobs({})
app.integrations.ashby.staging.list_jobs({})

All functions are identical across accounts — only the credentials differ.

Raw agent markdown
# Ashby ATS — Lua API Reference

## list_applications

List job applications with optional filters.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Maximum number of applications to return (default: 100) |
| `offset` | integer | no | Number of results to skip for pagination |
| `job_id` | string | no | Filter applications by job ID |
| `status` | string | no | Filter by application status (e.g., "hired", "rejected", "active") |

### Examples

```lua
-- List all applications
local result = app.integrations.ashby.list_applications({})

-- List applications for a specific job
local result = app.integrations.ashby.list_applications({
  job_id = "job_abc123"
})

-- Paginate through applications
local result = app.integrations.ashby.list_applications({
  limit = 50,
  offset = 100
})
```

---

## get_application

Get detailed information about a specific application.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The application ID |

### Examples

```lua
local result = app.integrations.ashby.get_application({
  id = "app_xyz789"
})
```

---

## list_jobs

List job postings with optional status filter.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Maximum number of jobs to return (default: 100) |
| `offset` | integer | no | Number of results to skip for pagination |
| `status` | string | no | Filter by job status (e.g., "open", "closed", "draft") |

### Examples

```lua
-- List all jobs
local result = app.integrations.ashby.list_jobs({})

-- List only open positions
local result = app.integrations.ashby.list_jobs({
  status = "open"
})

-- Paginate
local result = app.integrations.ashby.list_jobs({
  limit = 50,
  offset = 50
})
```

---

## get_job

Get detailed information about a specific job.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The job ID |

### Examples

```lua
local result = app.integrations.ashby.get_job({
  id = "job_abc123"
})
```

---

## list_interviews

List scheduled interviews with optional application filter.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Maximum number of interviews to return (default: 100) |
| `offset` | integer | no | Number of results to skip for pagination |
| `application_id` | string | no | Filter interviews by application ID |

### Examples

```lua
-- List all interviews
local result = app.integrations.ashby.list_interviews({})

-- List interviews for a specific application
local result = app.integrations.ashby.list_interviews({
  application_id = "app_xyz789"
})
```

---

## get_interview

Get detailed information about a specific interview.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The interview ID |

### Examples

```lua
local result = app.integrations.ashby.get_interview({
  id = "interview_def456"
})
```

---

## get_current_user

Get the profile of the currently authenticated Ashby user.

### Parameters

None.

### Examples

```lua
local result = app.integrations.ashby.get_current_user({})
print(result.email)
```

---

## Multi-Account Usage

If you have multiple Ashby accounts configured, use account-specific namespaces:

```lua
-- Default account (always works)
app.integrations.ashby.list_jobs({})

-- Explicit default (portable across setups)
app.integrations.ashby.default.list_jobs({})

-- Named accounts
app.integrations.ashby.production.list_jobs({})
app.integrations.ashby.staging.list_jobs({})
```

All functions are identical across accounts — only the credentials differ.

Metadata-Derived Lua Example

local result = app.integrations.ashby.ashby_get_application({
  id = "example_id"
})
print(result)

Functions

ashby_get_application

Get detailed information about a specific job application in Ashby, including candidate details, status, and evaluation data.

Operation
Read read
Full name
ashby.ashby_get_application
ParameterTypeRequiredDescription
id string yes The application ID.

ashby_get_current_user

Get the profile of the currently authenticated Ashby user. Use this to verify API access and see user details.

Operation
Read read
Full name
ashby.ashby_get_current_user
ParameterTypeRequiredDescription
No parameters.

ashby_get_interview

Get detailed information about a specific interview in Ashby, including scheduled time, interviewers, feedback, and scorecards.

Operation
Read read
Full name
ashby.ashby_get_interview
ParameterTypeRequiredDescription
id string yes The interview ID.

ashby_get_job

Get detailed information about a specific job in Ashby, including full description, requirements, compensation, and hiring team.

Operation
Read read
Full name
ashby.ashby_get_job
ParameterTypeRequiredDescription
id string yes The job ID.

ashby_list_applications

List job applications in Ashby. Returns applications with candidate info, status, and associated job. Use filters to narrow by job or status.

Operation
Read read
Full name
ashby.ashby_list_applications
ParameterTypeRequiredDescription
limit integer no Maximum number of applications to return (default: 100).
offset integer no Number of results to skip for pagination.
job_id string no Filter applications by job ID.
status string no Filter by application status (e.g., "hired", "rejected", "active").

ashby_list_interviews

List scheduled interviews in Ashby. Returns interview details with date, time, interviewers, and associated application. Filter by application to see interviews for a specific candidate.

Operation
Read read
Full name
ashby.ashby_list_interviews
ParameterTypeRequiredDescription
limit integer no Maximum number of interviews to return (default: 100).
offset integer no Number of results to skip for pagination.
application_id string no Filter interviews by application ID.

ashby_list_jobs

List job postings in Ashby. Returns open and closed positions with department, location, and application count. Filter by status to find active openings.

Operation
Read read
Full name
ashby.ashby_list_jobs
ParameterTypeRequiredDescription
limit integer no Maximum number of jobs to return (default: 100).
offset integer no Number of results to skip for pagination.
status string no Filter by job status (e.g., "open", "closed", "draft").