Load Zendesk - Main API data to Azure Synapse Analytics

Build a Zendesk - Main API to Azure Synapse Analytics pipeline with your coding agent. One prompt scaffolds it with the dltHub AI harness, plus the Zendesk - Main API API base URL, auth, endpoints, and incremental loading.

Source
Zendesk - Main API
Zendesk API Documentation
Destination
Azure Synapse Analytics
Azure Synapse Analytics is Microsoft's enterprise analytics service for data warehousing and big data.

Zendesk Support is a customer service platform whose API provides access to support resources and incremental exports of records changed since a prior request. Everything needed to build a working Zendesk - Main API → Azure Synapse Analytics pipeline is on this page: the API's base URL, authentication, endpoints, pagination and incremental field — plus a prompt that hands the whole job to your coding agent.


Build your Zendesk - Main API to Azure Synapse Analytics pipeline

Paste this prompt into Claude, Codex, or Cursor. The agent does the rest.

Prompt
Run uvx dlthub-init@latest to build a pipeline from Zendesk - Main API to Azure Synapse Analytics and run it on dltHub

That scaffolds a dltHub workspace and installs the dltHub AI harness — the project rules, the secrets-management skill, and the dlt MCP server your agent needs to work safely. From there it reads the Zendesk - Main API API, proposes the endpoints to load, then writes, runs and validates the pipeline while you review rather than type. Credentials are inspected through MCP tools, so your agent never reads secrets.toml itself. How the LLM-native workflow works →

Prefer to write it yourself? Every fact the agent uses is below.


Zendesk - Main API API at a glance

Base URLhttps://{subdomain}.zendesk.com/api/v2
Example endpointGET tickets
Records found attickets
AuthenticationHTTP Basic auth using the Zendesk account email plus the literal /token suffix and API token — sent in the Authorization header, prefixed Basic
PaginationCursor-based via cursor, next cursor at next_page, page size via limit (default 1000, max 1000). For incremental exports, the initial request uses start_time (the incremental time boundary); subsequent pages use the cursor returned in the next_page URL. The endpoint is cursor-based and returns up to 1,000 results per page. This is distinct from ordinary list endpoints, where cursor pagination uses page[after] and page[size], and offset pagination uses page and per_page. The documentation does not describe a separate next-page token field; follow the next_page URL or extract its cursor query parameter.
Incremental fieldupdated_at
Record idid
API referencehttps://developer.zendesk.com/api-reference/ticketing/ticket-management/incremental_exports/

These values come from the Zendesk - Main API API reference — the authoritative source if anything here looks out of date.


How do I authenticate with the Zendesk - Main API API?

Use HTTP Basic authentication with an Authorization header. For an API token, construct the credential string as {email_address}/token:{api_token}, Base64-encode it, and send Authorization: Basic {base64_value}; Content-Type: application/json is recommended and should be included for JSON requests. Zendesk is deprecating Support API tokens: unused tokens are scheduled for deactivation beginning July 28, 2026, and all API tokens are scheduled to stop working by April 30, 2027, so OAuth migration is required for long-term production use.

1. Get your credentials

As of 2026-10-12, use a Zendesk API token rather than an email/password API credential: Zendesk began phasing out password authentication on January 12, 2026, and API-token authentication is itself scheduled for removal (unused tokens auto-deactivate beginning July 28, 2026; all API tokens stop working by April 30, 2027). For a current production integration, prefer OAuth if available. To obtain a token for a transitional integration: 1) Sign in to Zendesk as an administrator. 2) In Admin Center, open Apps and integrations > APIs > API configuration. 3) Accept the API terms, click Get started if prompted, enable Allow API token access, and Save. 4) Open Apps and integrations > APIs > API tokens. 5) Click Add API token, optionally enter a description, and click Save. 6) Copy the token immediately and store it securely; it is used as the Basic-auth password. Use the verified Zendesk user email with '/token' appended as the username, for example username 'agent@example.com/token' and password '<api_token>'. Send Basic authentication over HTTPS; do not put credentials in the URL or request payload. The account subdomain is the part before '.zendesk.com', and the API base is https://{subdomain}.zendesk.com/api/v2.

2. Add them to .dlt/secrets.toml

[sources.zendesk_main_api_source] email = "agent@example.com/token" api_token = "your_zendesk_api_token"

dlt reads this file automatically at runtime. With the harness, the setup-secrets skill prompts you for the values and never handles the raw credential in chat. For production, see setting up credentials with dlt.


What Zendesk - Main API data can I load into Azure Synapse Analytics?

These are the Zendesk - Main API endpoints dlt can load into Azure Synapse Analytics:

ResourceEndpointMethodData selectorDescription
ticketsticketsGETticketsList tickets; cursor pagination recommended, maximum 100 records per page; supports page[size], page[after]/page[before], sort including updated_at and -updated_at.
usersusersGETusersList users; cursor pagination recommended; supports cursor/offset pagination and sorting, including updated_at.
organizationsorganizationsGETorganizationsList organizations; cursor pagination supported; documented response selector is organizations.
groupsgroupsGETgroupsList groups; cursor pagination recommended; maximum 100 records per page; documented response selector is groups.
ticket_fieldsticket_fieldsGETticket_fieldsList system and custom ticket fields; cursor pagination maximum 100 per page; documented selector is ticket_fields.
organization_fieldsorganization_fieldsGETorganization_fieldsList custom organization fields; cursor pagination supported; documented selector is organization_fields.
user_fieldsuser_fieldsGETuser_fieldsList custom user fields; cursor pagination supported; documented selector is user_fields.
ticket_metricsticket_metricsGETticket_metricsList ticket metrics; maximum 100 records per page; cursor pagination supported; documented selector is ticket_metrics.
incremental_tickets_cursorincremental/tickets/cursorGETticketsCursor-based incremental ticket export. Initial request uses start_time (Unix epoch); subsequent requests use the returned cursor.
incremental_tickets_timeincremental/ticketsGETticketsTime-based incremental ticket export using start_time; response includes end_time and next_page for continuation.
incremental_ticket_metric_eventsincremental/ticket_metric_eventsGETticket_metric_eventsIncremental ticket metric events from start_time; cursor pagination maximum 100 records per page.

How do I load only new Zendesk - Main API records?

Zendesk - Main API exposes updated_at on tickets, so dlt can request only the records that changed since the last run. Set it as the cursor_path and dlt tracks the high-water mark for you between runs.

{"name": "tickets", "endpoint": { "path": "tickets", "data_selector": "tickets", "incremental": {"cursor_path": "updated_at", "initial_value": "2024-01-01T00:00:00Z"}, }}

On the first run dlt loads everything from initial_value; on every run after that it requests only what changed and appends with write_disposition="merge" if you set a primary key. See incremental loading.


What does the generated Zendesk - Main API pipeline look like?

A standard dlt REST API pipeline — the same code you would write by hand, loading /api/v2/tickets.json and /api/v2/incremental/tickets/cursor.json from the Zendesk - Main API API into Azure Synapse Analytics:

import dlt from dlt.sources.rest_api import RESTAPIConfig, rest_api_resources @dlt.source def zendesk_main_api_source(api_token=dlt.secrets.value): config: RESTAPIConfig = { "client": { "base_url": "https://{subdomain}.zendesk.com/api/v2", "auth": {"type": "http_basic", "username": "REPLACE_ME", "password": api_token}, }, "resources": [ {"name": "tickets", "endpoint": {"path": "tickets", "data_selector": "tickets"}}, {"name": "users", "endpoint": {"path": "users", "data_selector": "users"}} ], } yield from rest_api_resources(config) def load_zendesk_main_api_to_synapse() -> None: pipeline = dlt.pipeline( pipeline_name="zendesk_main_api_pipeline", destination="synapse", dataset_name="zendesk_main_api_data", ) load_info = pipeline.run(zendesk_main_api_source()) print(load_info) if __name__ == "__main__": load_zendesk_main_api_to_synapse()

Run it with uv run python zendesk_main_api_pipeline.py. The agent iterates on this until it loads cleanly — you review and approve, rather than write it from scratch.


How do I query Zendesk - Main API data in Azure Synapse Analytics?

dlt creates one table per resource. Query the loaded data with Python or SQL — or ask your agent to, through the MCP server's execute_sql_query tool.

Python (pandas DataFrame):

import dlt data = dlt.pipeline("zendesk_main_api_pipeline").dataset() df = data.tickets.df() print(df.head())

SQL:

SELECT * FROM zendesk_main_api_data.tickets LIMIT 10;

See querying your data with dataset and exploring it in marimo notebooks.


How do I deploy the Zendesk - Main API to Azure Synapse Analytics pipeline in production?

The pipeline runs locally, which is ideal for prototyping and one-off analysis. When you need it on a schedule, monitored on every load, and shared with your team, deploy the same dlt code on the dltHub platform — no infrastructure to maintain. The prompt above already ends with "run it on dltHub", so your agent can take it there directly.

  • Deploy & schedule — run the pipeline as a managed job with automatic retries.
  • Monitor — observable job queues, alerting, and load metrics for every run.
  • Transform — promote raw Zendesk - Main API loads into governed, documented models.
  • Visualize & share — explore data in notebooks and publish live dashboards instead of static screenshots.

Book a demo →


What other destinations can I load Zendesk - Main API data to?

dlt loads into any of these — only the destination argument changes:

DestinationExample value
PostgreSQL"postgres"
BigQuery"bigquery"
Snowflake"snowflake"
Redshift"redshift"
Databricks"databricks"
Filesystem (S3, GCS, Azure)"filesystem"

Set dlt.pipeline(destination="snowflake") and add credentials in .dlt/secrets.toml. On the dltHub platform the same pipeline runs against a managed Iceberg lakehouse. See the full destinations list.


Next steps

Was this page helpful?

Community Hub

Need more dlt context for Zendesk - Main API to Azure Synapse Analytics?

Request dlt skills, commands, AGENT.md files, and AI-native context.