Skip to content
Open Prescient AI
Use the API

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.

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

  • modeledMetrics returns the modeled revenue, customers, leads, and subscriptions for each campaign and day.
  • reportedMetrics returns the reported spend for each campaign and day.
  • models returns the models of your workspace and the unit of each one.
  • channelNames returns the source names of the channels that you have in use.

The Types page lists each object, enum, and scalar that the queries use.

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

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 lists each change to the schema and to the behavior.

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.

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.

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.