jackdocs

Documents

List, inspect, and delete documents in your organisation. Every document has a status — poll it after ingest to confirm the document is ready to query.

GET/v1/documents/{document_id}

Get the metadata and processing status of a single document. Use this to poll after ingest.

Status values

StatusMeaning
processingjack is indexing the document — not yet queryable
readyIndexed and available for queries
failedIngestion failed — check the error_message field

Request

python
response = httpx.get(
    "https://api.usejack.io/v1/documents/f6c5ea1b-4d9b-4fbf-bb18-b10b97680340",
    headers={"Authorization": "Bearer jack_xxxxxxxx"}
)

print(response.json())
bash
curl https://api.usejack.io/v1/documents/f6c5ea1b-4d9b-4fbf-bb18-b10b97680340 \
  -H "Authorization: Bearer jack_xxxxxxxx"

Response

json
{
  "id": "f6c5ea1b-4d9b-4fbf-bb18-b10b97680340",
  "filename": "employee-handbook.pdf",
  "source_type": "file",
  "metadata": {
    "document_type": "handbook",
    "department": "HR"
  },
  "status": "ready",
  "error_message": null,
  "chunk_count": 24,
  "created_at": "2026-06-12T14:24:52Z",
  "updated_at": "2026-06-12T14:25:03Z"
}

Polling pattern

python
import time, httpx

def wait_until_ready(doc_id: str, api_key: str, timeout: int = 120) -> bool:
    start = time.time()
    while time.time() - start < timeout:
        resp = httpx.get(
            f"https://api.usejack.io/v1/documents/{doc_id}",
            headers={"Authorization": f"Bearer {api_key}"}
        )
        status = resp.json().get("status")
        if status == "ready":
            return True
        if status == "failed":
            print("Error:", resp.json().get("error_message"))
            return False
        time.sleep(5)
    return False
GET/v1/documents

Returns all documents in your organisation, newest first. Use this to build a document management UI or audit what has been ingested.

Request

python
response = httpx.get(
    "https://api.usejack.io/v1/documents",
    headers={"Authorization": "Bearer jack_xxxxxxxx"}
)

docs = response.json()
for doc in docs:
    print(doc["filename"], doc["status"], doc["chunk_count"])
bash
curl https://api.usejack.io/v1/documents \
  -H "Authorization: Bearer jack_xxxxxxxx"

Response

json
[
  {
    "id": "f6c5ea1b-...",
    "filename": "employee-handbook.pdf",
    "status": "ready",
    "chunk_count": 24,
    "created_at": "2026-06-12T14:24:52Z"
  },
  {
    "id": "a1b2c3d4-...",
    "filename": "remote-work-policy.pdf",
    "status": "ready",
    "chunk_count": 8,
    "created_at": "2026-06-11T10:11:00Z"
  }
]
DELETE/v1/documents/{document_id}

Permanently removes a document from jack's index — both the vector store and knowledge graph. It will no longer appear in any query results. This action is irreversible.

Request

python
response = httpx.delete(
    "https://api.usejack.io/v1/documents/f6c5ea1b-4d9b-4fbf-bb18-b10b97680340",
    headers={"Authorization": "Bearer jack_xxxxxxxx"}
)

print(response.json())  # {"deleted": "f6c5ea1b-..."}
bash
curl -X DELETE https://api.usejack.io/v1/documents/f6c5ea1b-4d9b-4fbf-bb18-b10b97680340 \
  -H "Authorization: Bearer jack_xxxxxxxx"

Response — 200 OK

json
{ "deleted": "f6c5ea1b-4d9b-4fbf-bb18-b10b97680340" }

Deletion is permanent and immediate. There is no soft-delete or recycle bin. Re-ingest the document if you delete it by mistake.

← PREVIOUSQueryNEXT →API Keys