> ## Documentation index
> Fetch the complete documentation index at: https://docs.prescientai.com/llms.txt
> Use this file to discover all available pages before exploring further. Add `.md` to any page URL to get that page as Markdown.

# API overview

> What the Prescient GraphQL API returns, where to send a request, and which page to read for each task.

The Prescient GraphQL API gives your own tools read access to the modeled metrics and the reported spend of your workspace. The API has four queries and no mutations, so a request cannot change data in Prescient.

## What can you read?

Each query has a reference page with its arguments, its return type, and an example.

- [`modeledMetrics`](https://docs.prescientai.com/api/queries/modeled-metrics) returns the modeled revenue, customers, leads, and subscriptions for each campaign and day.
- [`reportedMetrics`](https://docs.prescientai.com/api/queries/reported-metrics) returns the reported spend for each campaign and day.
- [`models`](https://docs.prescientai.com/api/queries/models) returns the models of your workspace and the unit of each one.
- [`channelNames`](https://docs.prescientai.com/api/queries/channel-names) returns the source names of the channels that you have in use.

The [Types](https://docs.prescientai.com/api/types) page lists each object, enum, and scalar that the queries use.

## Where do you send a request?

Send each request as an HTTP `POST` with a JSON body to one endpoint.

```http
POST https://api.prescient-ai.io/graphql
Authorization: apikey YOUR_API_KEY
Content-Type: application/json
```

The API has no version number in the URL. The [Changelog](https://docs.prescientai.com/api/changelog) lists each change to the schema and to the behavior.

## What do you need before you start?

You need an API key. An Admin creates the key on the **API keys** tab of the **Settings** page. See [Create and revoke an API key](https://docs.prescientai.com/account/manage-api-keys).

A key reads the data of one workspace. If the key has a channel scope, the key reads only the channels in that scope. See [Authentication](https://docs.prescientai.com/api/authentication).

## Where do you go next?

- To send a request in a few minutes, follow [Make your first request](https://docs.prescientai.com/api/make-your-first-request).
- To copy all the rows of a date range, see [Pull modeled metrics for a date range](https://docs.prescientai.com/api/pull-modeled-metrics) and [Pull reported spend for a date range](https://docs.prescientai.com/api/pull-reported-spend).
- To keep a copy of the data current, see [Sync only the rows that changed](https://docs.prescientai.com/api/sync-only-changed-rows).
- To handle a failed request, see [Errors](https://docs.prescientai.com/api/errors) and [Limits](https://docs.prescientai.com/api/limits).

## Can a tool read the schema?

Yes. The endpoint answers a GraphQL introspection query, so a GraphQL client can load the schema from the endpoint. This site also has the schema as one file at [`/api/schema.graphql`](https://docs.prescientai.com/api/schema.graphql).
