Skip to main content
The Deasy Labs REST API powers everything the platform does; the Python SDK wraps it one-to-one, so every endpoint here has a matching SDK method. Use this page for the conventions shared by all endpoints, then browse the resources in the sidebar.

Base URL

All requests go to your deployment’s base URL. There is no default.

Authentication

Every request carries a JWT access token issued when you sign in to your deployment:
The Python SDK signs in for you with the email and password you use for the web UI, renews the token before it expires, and retries a request once after a 401. Pass username and password, or set the environment variables UNSTRUCTURED_USERNAME, UNSTRUCTURED_PASSWORD and UNSTRUCTURED_CLIENT_BASE_URL. Sign-in failures raise an authentication error whose message names the step that failed.
The SDK’s sign-in needs password login. Deployments that sign in through SSO (Entra, Okta) and accounts with MFA are not supported yet.

Background Jobs

Long-running operations (ingestion, batch classification, large exports) return immediately and run in the background. Pass a job_id of your choosing, then poll Task Tracking:
  1. Submit the job with a job_id (a UUID you generate).
  2. Poll POST /progress_tracker/task_status with that id.
  3. status moves through in_progress to completed, failed, or aborted, with percent_complete along the way.

Pagination

List endpoints that can return large results offer a paginated variant (/metadata/list_paginated) using limit and offset, returning next_offset until it is null.

Errors

Standard HTTP status codes: 400 bad request, 401 authentication, 403 permission, 404 not found, 409 conflict, 422 validation, 429 rate limit, 5xx server. The SDK retries twice by default on retryable failures and raises typed exceptions per status.