---
title: "Issue a demo credential"
description: ""
canonical: "https://pgbeam.com/docs/api/demo/createDemoCredential"
last-updated: "2026-09-07T14:43:27.000Z"
---

# Issue a demo credential

> 

URL: https://pgbeam.com/docs/api/demo/createDemoCredential

Issues a scoped, read-only, short-lived PostgreSQL credential plus a hosted MCP token against PgBeam's own demo database, with no account and no key. The credential is governed by the same wire-protocol policy engine every customer credential runs through, so a SELECT of a PII column comes back masked, a statement naming the table left off the allowlist is blocked, and a write is refused, all with machine-readable reasons. The connection string and MCP token are shown once. The response also carries the policy document that governed the demo, so a caller who then opens an account can create the same policy on its own database verbatim.
Refusals are distinct on purpose. 429 means this client has asked for too many credentials in the last hour and should wait. 503 with a Retry-After header means the global ceiling on concurrent demo credentials is full, so backing off individually will not help; the header says when the oldest session expires. 503 also covers a deployment with no demo database configured.