Create an export
curl --request POST \
--url https://api.legal.usecroma.com/v1/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "processes",
"format": "csv",
"filters": {
"status": "TRACKING",
"date_from": "2024-01-01"
}
}
'import requests
url = "https://api.legal.usecroma.com/v1/exports"
payload = {
"entity": "processes",
"format": "csv",
"filters": {
"status": "TRACKING",
"date_from": "2024-01-01"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity: 'processes',
format: 'csv',
filters: {status: 'TRACKING', date_from: '2024-01-01'}
})
};
fetch('https://api.legal.usecroma.com/v1/exports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.legal.usecroma.com/v1/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entity' => 'processes',
'format' => 'csv',
'filters' => [
'status' => 'TRACKING',
'date_from' => '2024-01-01'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.legal.usecroma.com/v1/exports"
payload := strings.NewReader("{\n \"entity\": \"processes\",\n \"format\": \"csv\",\n \"filters\": {\n \"status\": \"TRACKING\",\n \"date_from\": \"2024-01-01\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.legal.usecroma.com/v1/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entity\": \"processes\",\n \"format\": \"csv\",\n \"filters\": {\n \"status\": \"TRACKING\",\n \"date_from\": \"2024-01-01\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.legal.usecroma.com/v1/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entity\": \"processes\",\n \"format\": \"csv\",\n \"filters\": {\n \"status\": \"TRACKING\",\n \"date_from\": \"2024-01-01\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"url": "https://files.usecroma.com/legal-exports/processes-2026-08-21.csv",
"entity": "processes",
"format": "csv",
"rows": 1280,
"bytes": 418233,
"truncated": false,
"expires_at": "2026-08-22T14:03:10.000Z"
}
}{
"job": {
"id": "run_abc123def456",
"status": "running",
"endpoint": "/v1/exports",
"created_at": "2026-08-21T14:03:10.000Z",
"finished_at": null,
"status_url": "https://api.legal.usecroma.com/jobs/run_abc123def456"
},
"data": null,
"error": null
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_param",
"message": "Invalid option: expected one of \"processes\"|\"actions\"|\"defendants\"",
"param": "entity",
"details": {
"issues": [
{
"path": "entity",
"message": "Invalid option: expected one of \"processes\"|\"actions\"|\"defendants\""
}
]
}
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid or missing API key."
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Rate limit exceeded. Try again in 42 seconds."
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "Internal error. Contact support with the X-Request-Id if it persists."
}
}{
"error": {
"type": "api_error",
"code": "job_failed",
"message": "The job could not be completed."
}
}Crear una exportación
Inicia una exportación de tu conjunto filtrado de Croma Legal como CSV o JSONL: un trabajo asíncrono con un id que consultas hasta obtener la descarga.
POST
/
v1
/
exports
Create an export
curl --request POST \
--url https://api.legal.usecroma.com/v1/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "processes",
"format": "csv",
"filters": {
"status": "TRACKING",
"date_from": "2024-01-01"
}
}
'import requests
url = "https://api.legal.usecroma.com/v1/exports"
payload = {
"entity": "processes",
"format": "csv",
"filters": {
"status": "TRACKING",
"date_from": "2024-01-01"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entity: 'processes',
format: 'csv',
filters: {status: 'TRACKING', date_from: '2024-01-01'}
})
};
fetch('https://api.legal.usecroma.com/v1/exports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.legal.usecroma.com/v1/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entity' => 'processes',
'format' => 'csv',
'filters' => [
'status' => 'TRACKING',
'date_from' => '2024-01-01'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.legal.usecroma.com/v1/exports"
payload := strings.NewReader("{\n \"entity\": \"processes\",\n \"format\": \"csv\",\n \"filters\": {\n \"status\": \"TRACKING\",\n \"date_from\": \"2024-01-01\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.legal.usecroma.com/v1/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entity\": \"processes\",\n \"format\": \"csv\",\n \"filters\": {\n \"status\": \"TRACKING\",\n \"date_from\": \"2024-01-01\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.legal.usecroma.com/v1/exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entity\": \"processes\",\n \"format\": \"csv\",\n \"filters\": {\n \"status\": \"TRACKING\",\n \"date_from\": \"2024-01-01\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"url": "https://files.usecroma.com/legal-exports/processes-2026-08-21.csv",
"entity": "processes",
"format": "csv",
"rows": 1280,
"bytes": 418233,
"truncated": false,
"expires_at": "2026-08-22T14:03:10.000Z"
}
}{
"job": {
"id": "run_abc123def456",
"status": "running",
"endpoint": "/v1/exports",
"created_at": "2026-08-21T14:03:10.000Z",
"finished_at": null,
"status_url": "https://api.legal.usecroma.com/jobs/run_abc123def456"
},
"data": null,
"error": null
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_param",
"message": "Invalid option: expected one of \"processes\"|\"actions\"|\"defendants\"",
"param": "entity",
"details": {
"issues": [
{
"path": "entity",
"message": "Invalid option: expected one of \"processes\"|\"actions\"|\"defendants\""
}
]
}
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid or missing API key."
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Rate limit exceeded. Try again in 42 seconds."
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "Internal error. Contact support with the X-Request-Id if it persists."
}
}{
"error": {
"type": "api_error",
"code": "job_failed",
"message": "The job could not be completed."
}
}Autorizaciones
Use Authorization: Bearer YOUR_API_KEY
Encabezados
wait=N: seconds to wait inline before returning 202 (default 20, max 55). wait=0 returns 202 immediately.
Cuerpo
application/json
Dataset to export.
Opciones disponibles:
processes, actions, defendants csv (UTF-8 with BOM, Excel-friendly) or jsonl (one JSON object per line).
Opciones disponibles:
csv, jsonl Same names as the list endpoints' query params. One flat object for every entity: filters that do not apply to the chosen entity are ignored.
Show child attributes
Show child attributes
Public HTTPS URL to POST the finished job envelope to. When set, the request returns 202 immediately.
Respuesta
Successful response
Show child attributes
Show child attributes