> ## Documentation Index
> Fetch the complete documentation index at: https://code.dcycle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Workforce Trainings

> Retrieve every training record for the organization, unpaginated

[← Own Workforce API](/api-reference/own-workforce/overview)

Return the training records of the header organization as a flat array.

<Warning>
  **This endpoint does not paginate.** It returns every matching row in one response, with no row cap. Organizations with years of training history can return tens of thousands of records. Use [List Workforce Trainings Paginated](/api-reference/own-workforce/list-trainings-paginated) unless you specifically need the whole set in one payload, and always narrow with `created_at_from` / `created_at_to` when you do.
</Warning>

## Request

### Headers

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication

  **Example:** `sk_live_1234567890abcdef`
</ParamField>

<ParamField header="x-organization-id" type="string" required>
  Your organization UUID

  **Example:** `a8315ef3-dd50-43f8-b7ce-d839e68d51fa`
</ParamField>

### Query Parameters

<ParamField query="file_id[]" type="array[string]">
  Filter by source upload file. Pass the nil UUID `00000000-0000-0000-0000-000000000000` to match rows with no file.
</ParamField>

<ParamField query="created_at_from" type="datetime">
  Only rows created at or after this instant

  **Format:** ISO 8601 — `2026-01-01T00:00:00`
</ParamField>

<ParamField query="created_at_to" type="datetime">
  Only rows created on or before this instant, inclusive
</ParamField>

<ParamField query="search" type="string">
  Free-text search, up to 255 characters
</ParamField>

## Response

A bare JSON array of training records.

<ResponseField name="id" type="string">
  Training UUID
</ResponseField>

<ResponseField name="own_workforce_id" type="string">
  Employee the training belongs to
</ResponseField>

<ResponseField name="external_employee_id" type="string">
  That employee's identifier in your HR system
</ResponseField>

<ResponseField name="type" type="string">
  Training type, free text as uploaded. Expect wide variation across files — this field is not a controlled vocabulary.
</ResponseField>

<ResponseField name="description" type="string">
  What the training was
</ResponseField>

<ResponseField name="hours" type="number">
  Duration in hours
</ResponseField>

<ResponseField name="start_date" type="string">
  `YYYY-MM-DD`
</ResponseField>

<ResponseField name="end_date" type="string">
  `YYYY-MM-DD`
</ResponseField>

<ResponseField name="created_by" type="string">
  User who created the record
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp
</ResponseField>

<ResponseField name="updated_at" type="string">
  ISO 8601 timestamp
</ResponseField>

<ResponseField name="file_id" type="string | null">
  Source upload file
</ResponseField>

<ResponseField name="file_name" type="string | null">
  Name of that file
</ResponseField>

<ResponseField name="processing_job_id" type="string | null">
  Ingestion job that produced the row
</ResponseField>

<ResponseField name="status" type="string | null">
  Ingestion status: `active` once ingested, `loading` while its job runs, `error` if that job failed
</ResponseField>

<ResponseField name="custom_values" type="object">
  Values of the custom columns your organization defined for trainings, keyed by field key. Empty object when none are defined.
</ResponseField>

<ResponseField name="organization_id" type="string | null">
  Owning organization. Populated on group-view responses only.
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X GET "https://api.dcycle.io/v1/own_workforce_trainings?created_at_from=2026-01-01T00:00:00" \
    -H "x-api-key: ${DCYCLE_API_KEY}" \
    -H "x-organization-id: ${DCYCLE_ORG_ID}"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os

  import requests

  headers = {
      "x-api-key": os.getenv("DCYCLE_API_KEY"),
      "x-organization-id": os.getenv("DCYCLE_ORG_ID"),
  }

  response = requests.get(
      "https://api.dcycle.io/v1/own_workforce_trainings",
      headers=headers,
      params={"created_at_from": "2026-01-01T00:00:00"},
      timeout=120,
  )

  records = response.json()
  print(f"{len(records)} trainings, {sum(r['hours'] for r in records)} hours")
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const axios = require('axios');

  const headers = {
    'x-api-key': process.env.DCYCLE_API_KEY,
    'x-organization-id': process.env.DCYCLE_ORG_ID
  };

  axios.get('https://api.dcycle.io/v1/own_workforce_trainings', {
    headers,
    params: { created_at_from: '2026-01-01T00:00:00' },
    timeout: 120000
  })
  .then(({ data }) => {
    const hours = data.reduce((total, record) => total + record.hours, 0);
    console.log(`${data.length} trainings, ${hours} hours`);
  })
  .catch(error => console.error(error));
  ```
</CodeGroup>

### Successful Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
[
  {
    "id": "3d9b0a11-2c4e-4f6a-8b1d-5e7f9a0c2d4e",
    "own_workforce_id": "550e8400-e29b-41d4-a716-446655440000",
    "external_employee_id": "EMP-2024-001",
    "type": "Health and safety",
    "description": "Annual fire safety refresher",
    "hours": 4.0,
    "start_date": "2026-03-02",
    "end_date": "2026-03-02",
    "created_by": "8a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
    "created_at": "2026-03-05T11:20:00",
    "updated_at": "2026-03-05T11:20:00",
    "file_id": "aa11bb22-cc33-4d44-8e55-ff6677889900",
    "file_name": "trainings_2026.csv",
    "processing_job_id": "c2a7b81e-3f55-4c0b-9a6d-1e2f3a4b5c6d",
    "status": "active",
    "custom_values": {},
    "organization_id": null
  }
]
```

## Common Errors

### 401 Unauthorized

**Cause:** the key is invalid, or it does not belong to the organization in `x-organization-id` — the two are looked up as a pair. A request carrying no credentials at all answers `AUTH_REQUIRED` instead.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "detail": "Invalid API key for organization",
  "code": "INVALID_API_KEY"
}
```

### 403 Forbidden

**Cause:** the key's owner is not an enabled member of the organization in `x-organization-id`.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "detail": "Logged User is not Member of Organization",
  "code": "LOGGED_USER_NOT_MEMBER"
}
```

## Related Endpoints

<CardGroup cols={2}>
  <Card title="List trainings paginated" icon="list-ol" href="/api-reference/own-workforce/list-trainings-paginated">
    The same data, in pages
  </Card>

  <Card title="Trainings of an employee" icon="user" href="/api-reference/own-workforce/list-trainings-by-employee">
    Narrowed to one person
  </Card>
</CardGroup>
