canonical: https://jentic.com/apis/dg1.dev/dg1

# DG1 GraphQL API

The DG1 GraphQL API is the single-endpoint backend for DG1's all-in-one digital experience platform, covering product catalogues, content pages, contact records, bookings, orders, and marketing assets. Every read and mutation goes through one POST /graphql endpoint and is selected by GraphQL query or mutation name, so agents and apps fetch only the fields they need. It is the system of record for any storefront, booking flow, or CRM workflow built on DG1.

## For AI agents

Run GraphQL queries and mutations against DG1's digital experience platform to manage products, pages, contacts, bookings, and orders through a single endpoint.

## Scope

Does not handle payment processing, email delivery, or hosting infrastructure - use for DG1 storefront, booking, and contact data operations only.

## Capabilities

- Query product catalogue, pricing, and inventory through GraphQL selection sets
- Create and update website pages, blocks, and content blocks within DG1 sites
- Manage contact records, segments, and consent state for marketing flows
- Create, reschedule, and cancel bookings against DG1-managed services
- Submit and track orders, invoices, and payment status for storefront purchases
- Authenticate and refresh user sessions through GraphQL auth mutations

## Use cases

### Headless Storefront Backend

Power a custom storefront or mobile app with DG1 as the catalogue and order backend. The GraphQL endpoint lets the front-end fetch products, variants, prices, and inventory in a single request, then submit orders and payment intents through mutations. Adopting GraphQL means clients pull only the fields they render, keeping mobile payloads small.

Example prompt: Query the catalogue for products tagged summer-2026 with price and inventory, render them, and submit an order mutation when the user checks out

### Booking and Service Management

Manage service bookings - appointments, classes, rentals - through DG1 GraphQL mutations. The API exposes booking creation, rescheduling, cancellation, and availability querying, making it suitable for service businesses that need a programmable scheduling layer.

Example prompt: Query availability for service id svc-42 next Tuesday, create a booking for the requested time slot, and email the confirmation

### Contact and CRM Synchronisation

Synchronise customer records between DG1 and an external CRM or marketing tool. Agents can read contact lists, push new sign-ups in, and update consent state on the way out - all through GraphQL queries and mutations on the contact resource. Useful for unifying storefront identity with downstream marketing systems.

Example prompt: Fetch all contacts created in the last 24 hours, push them to the marketing platform, and update their dg1Synced flag via mutation

### AI Agent Commerce Operator

An AI shopping or operations agent can use DG1 as its commerce backend through Jentic. The agent searches for the operation matching the user's intent (browse products, place an order, cancel a booking), Jentic returns the GraphQL document and variable schema, and the agent executes - without learning the schema in advance.

Example prompt: When a user asks to cancel their booking, find the booking by reference, execute the cancelBooking mutation, and confirm the refund status

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/graphql` | Single GraphQL endpoint for all queries and mutations |

## Key resources

- **Products** — Query catalogue items, variants, pricing, and inventory through GraphQL selection sets
- **Pages** — Create and update DG1 website content pages and blocks
- **Contacts** — Manage customer profiles, segments, and consent records
- **Bookings** — Create, reschedule, and cancel service bookings
- **Orders** — Submit and track orders, invoices, and payment status

## Why Jentic

- **Setup:** Wiring the DG1 GraphQL API by hand means setting the bearer header and building the correct query or mutation and variables against the single graphql endpoint yourself. Through Jentic you install once, import the DG1 GraphQL API from the API Directory, store the bearer token once, and your agent calls it.
- **Permission scoping:** You choose which DG1 GraphQL operations the agent may call, so you can limit it to the ones it needs, such as listing products in stock, and leave booking cancellation or contact writes out unless you add them. That keeps the agent to the storefront operations you intend it to run.
- **Credential handling:** Your DG1 bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'cancel a booking' or 'list products in stock', and Jentic returns the matching DG1 GraphQL operation with its variable schema so the agent calls the right operation without browsing the reference docs.

## Related APIs

- **Shopify Admin API** — Larger headless commerce platform with its own GraphQL Admin API and broader app ecosystem
- **Stripe API** — Payment processing for orders submitted through DG1
- **SendGrid Mail API** — Transactional email for booking confirmations and order receipts

## FAQ

### What authentication does the DG1 GraphQL API use?

DG1 uses HTTP Bearer authentication. Every POST to /graphql must include an Authorization header carrying a DG1-issued token. Through Jentic the token lives in the encrypted vault and is injected at execution time only.

### Can I manage products and bookings in a single request?

Yes. Because the API is GraphQL on a single /graphql endpoint, a query can select fields from products and bookings together in one round trip, and a mutation can update both within one request body.

### What are the rate limits for the DG1 GraphQL API?

DG1 does not publish a public rate limit. Fair-use throttling applies and large queries can be split using GraphQL pagination cursors to avoid timeouts.

### How do I cancel a booking through Jentic?

Run a Jentic search for "cancel a booking". Jentic returns the DG1 cancelBooking GraphQL mutation along with its input schema (booking ID, reason). Load the schema, populate variables, and execute - no need to read the GraphQL SDL.

### Does the API support partial field selection?

Yes. GraphQL requires the client to specify which fields to return, so an agent fetching only product name and price avoids transferring the full product object. This is the main efficiency advantage over a REST equivalent.

### How do I install the Jentic SDK to call DG1?

Run pip install jentic, set JENTIC_AGENT_API_KEY to your ak_* key, then use Jentic with SearchRequest, LoadRequest, and ExecutionRequest. Get started with Jentic One, the self-hosted execution layer.

### Can I limit what my agent is allowed to do with the DG1 GraphQL API?

Yes. Jentic One is self-hosted, so you run it and your own rules decide which DG1 GraphQL operations and which stored credentials the agent may use. You can allow only the operations it needs, such as listing products in stock, and leave booking cancellation or contact writes out unless you add them. That keeps the agent to the storefront read operations you intend, so it cannot run mutations you have not granted.
