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

# Rama Judicial

> Search Colombian court cases by party, resolve a case by its radicación number and list its actuaciones, and resolve any court's official email from a case number or a search, from the Rama Judicial's national registry.

Rama Judicial is Colombia's national judicial branch registry. Croma exposes
four endpoints over it: **search** processes by party, **resolve** a case
by its registration number (radicación), which returns case metadata plus
action history in a single call, and the **email directory**, twice over: the
official mailbox of every despacho judicial and administrative area, browsable
by place and specialty, or resolved directly from a court code or a radicado.

## Search processes

`POST /co/rama-judicial/cases-by-entity/v1` finds processes by entity name.

| Field         | Type    | Notes                                                                     |
| ------------- | ------- | ------------------------------------------------------------------------- |
| `name`        | string  | **Required.** 3-200 chars. Entity name to search.                         |
| `entity_type` | enum    | Entity type: `natural` or `juridical`. Default `natural`.                 |
| `active_only` | boolean | Restrict to processes with activity in the last 30 days. Default `false`. |
| `court_code`  | string  | Narrow to a specific court.                                               |
| `page`        | integer | 1-1000. Default `1`.                                                      |

```bash theme={"dark"}
curl https://api.croma.run/co/rama-judicial/cases-by-entity/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "PEDRO CIFUENTES" }'
```

## Resolve by radicación

`POST /co/rama-judicial/cases-by-radicado/v1`

resolves a case by its 23-digit registration
number and returns metadata plus the first 40 actuaciones (actions) available.
When no public case matches, `found` is `false` and `primary_case` is `null`.

| Field                 | Type   | Notes                                    |
| --------------------- | ------ | ---------------------------------------- |
| `registration_number` | string | **Required.** 20-25 digits (radicación). |

```bash theme={"dark"}
curl https://api.croma.run/co/rama-judicial/cases-by-radicado/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "registration_number": "11001600001720180327700" }'
```

## Resolve many radicados (batch)

`POST /co/rama-judicial/cases-by-radicado/v1/batch` resolves up to **50**
radicados in one request. Items are resolved concurrently and returned in the
same order, each with its own status, so one bad radicado never fails the batch.

| Field   | Type  | Notes                                                                                                 |
| ------- | ----- | ----------------------------------------------------------------------------------------------------- |
| `items` | array | **Required.** 1-50 objects, each `{ "registration_number": "…" }` (same body as the single endpoint). |

```bash theme={"dark"}
curl https://api.croma.run/co/rama-judicial/cases-by-radicado/v1/batch \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "items": [
          {
            "registration_number": "11001600001720180327700"
          },
          {
            "registration_number": "05001310300120190012300"
          }
        ]
      }'
```

Each item counts as one request against your quota. See [Batch requests](/batch) for the response envelope and partial-failure handling.

## Find a court's email

`POST /co/rama-judicial/email-directory/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

Searches the judicial branch's official mailbox directory: every despacho judicial and administrative area, filterable by place, kind of office, specialty, seccional, or the court code that prefixes every radicado.

| Field          | Type    | Notes                                                                                                                                                                                                                                                |
| -------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`        | string  | Optional words matched against the office name, the email address, and the office's corporation, specialty, department, city and seccional.                                                                                                          |
| `department`   | string  | Optional department, matched from the start of the name: `santander`, `bogota`. Case and accents are ignored.                                                                                                                                        |
| `city`         | string  | Optional city, matched from the start of the name: `bogota` finds Bogotá D.C.                                                                                                                                                                        |
| `corporation`  | string  | Optional kind of office, matched from the start of the name: `juzgado` matches every kind of juzgado, `tribunal-superior`, `centro-de-servicios`, `corte-suprema`.                                                                                   |
| `specialty`    | string  | Optional specialty, matched from the start of the name: `civil`, `laboral`, `familia`, `penal` (which also matches the penal sub-specialties).                                                                                                       |
| `account_type` | enum    | Optional kind of mailbox: `despacho` for a court's own account, `area` for an administrative or service area. Empty returns both.                                                                                                                    |
| `court_code`   | string  | Optional 12-digit court code (código de despacho). A full 20-25-digit radicado is also accepted: its first 12 digits identify the office where the case is filed, so this resolves "which court holds this case, and what is its email" in one call. |
| `district`     | string  | Optional administrative district (seccional), matched from the start of the name: `bucaramanga`, `nivel-central`.                                                                                                                                    |
| `page`         | integer | 1-based page number. Default `1`.                                                                                                                                                                                                                    |
| `per_page`     | integer | Results per page (1-100). Default `20`.                                                                                                                                                                                                              |

```bash theme={"dark"}
curl https://api.croma.run/co/rama-judicial/email-directory/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "city": "bucaramanga", "specialty": "penal" }'
```

Returns `as_of` (how current the data is), the applied filters, `total`, `page`, `per_page`, `total_pages`, `count` and `results[]`, ordered by office name. Every result carries `email`, `name`, `account_type` ("Despacho Judicial" or "Área"), `corporation`, `specialty`, `department`, `city`, `district` (the seccional), `court_code`, and the canonical `*_key` twins the filters match by prefix.

<Note>
  The directory is served from Croma's own copy, refreshed weekly from the Rama
  Judicial's official directory, so searches answer fast and do not depend on
  the upstream being reachable. `as_of` says when the copy was last brought up
  to date.
</Note>

## Resolve a court's email from a case

`POST /co/rama-judicial/emails-by-court/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

Resolves the official mailbox of one court from its 12-digit code, or directly from a full radicado. No paging: every account the directory holds for the code comes back at once, the despacho's own mailbox first.

| Field        | Type   | Notes                                                                                                                                                                                                                                                                                  |
| ------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `court_code` | string | **Required.** The 12-digit court code (código de despacho), or a full 20-25-digit radicado: its first 12 digits identify the court where the case is filed. The `court_code` of any email-directory result and the first 12 digits of any `registration_number` are both valid values. |

```bash theme={"dark"}
curl https://api.croma.run/co/rama-judicial/emails-by-court/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "court_code": "110013103021" }'
```

Returns `as_of`, `found`, the (sliced) `court_code`, `count` and `mailboxes[]`, each with the same fields as an email-directory result.

<Note>
  A code the directory does not hold returns `found: false` with HTTP 200, not
  an error. Some courts publish no dedicated mailbox and are served by a
  centro de servicios; searching the email directory by place and specialty is
  the fallback.
</Note>

<Note>
  The case endpoints reach a live upstream that can be slow or briefly
  unavailable, and may return `502 upstream_error`; retry with backoff. The
  email directory is served from Croma's own copy and does not depend on it.
</Note>

<Card title="Full reference" icon="code" href="/api-reference/overview">
  Schemas, all response fields, and an interactive playground.
</Card>
