---
title: "ReleaseDemoCredential"
description: "Release a demo credential"
canonical: "https://pgbeam.com/docs/go-sdk/demo/releaseDemoCredential"
last-updated: "2026-09-07T14:43:27.000Z"
---

# ReleaseDemoCredential

> Release a demo credential

URL: https://pgbeam.com/docs/go-sdk/demo/releaseDemoCredential

Revokes a demo credential before its TTL runs out and returns its slot to the global ceiling. Callers that finish early should do this so the next evaluating agent is not turned away by a session nobody is using. The MCP token issued with the credential proves the caller holds it. Releasing an already-expired or already-released session succeeds with released=false.

## Usage

## Parameters

Parameter

Type

Required

Description

ctx

`context.Context`

Yes

Request context

sessionID

`string`

Yes

The demo session to release, as returned when it was issued.

req

`pgbeam.ReleaseDemoCredentialRequest`

Yes

Request body

req.McpToken

`string`

Yes

The mcp\_token returned when the credential was issued.

## Response

`(*pgbeam.DemoReleaseResult, error)`: the session was released, or was already gone.

## Example

## Errors

Status

Description

400

Invalid request parameters.

401

Missing or invalid authentication.

404

Resource not found.

429

Rate limited. Try again later.

503

Service temporarily unavailable.