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

# How do I use the chatobserver Data API?

> Use service-account credentials to access connected data, versioned queries, schedules, transfers, and results.

The Data API is available under `/api/v2/metrics`. It uses service-account credentials, resource permissions, and operation-specific scopes to manage connected marketing data and reusable reporting workflows.

## Use a service-account credential

A regular visibility credential is not sufficient. Associate the credential with a service account and grant the scopes required by the operations your integration uses. Common scopes include `metrics:read`, `metrics:write`, `metrics:execute`, and `metrics:webhooks`; individual operations define their requirements.

Source access, resource visibility, and workspace network restrictions still apply. A scope grants a capability, not unrestricted access to every connection or private resource.

## Discover available connections and fields

Use the connector and connection endpoints to identify available sources and the accounts the service account can access. Use catalogue information to build a query against the actual fields exposed by those accounts.

```bash theme={null}
curl --fail-with-body \
  'https://app.chatobserver.com/api/v2/metrics/connectors' \
  -H "Authorization: Bearer $CHATOBSERVER_DATA_API_KEY"
```

Connector availability is workspace-specific. Do not infer access merely from knowing a connector's name.

## Work with versions

Queries and other configurable resources separate their identity from their versioned definition. Create a draft, inspect validation results, and publish the intended version before using it in a production integration. Service-account-created queries require workspace visibility.

Follow each operation's idempotency and version-precondition requirements. Use [operations and webhooks](/docs/developers/data-operations) to observe accepted work and retrieve results. Use [pagination](/docs/developers/pagination-and-filters) for collections; the Data API returns a top-level `nextCursor`.
