POST /gammas/{gammaId}/archive
Archive a Gamma document. Idempotent -- archiving an already archived Gamma succeeds.
Archive a Gamma to remove it from the active workspace without deleting it.
Archives a Gamma document. The operation is idempotent - archiving an already archived Gamma succeeds.
API key for authentication
The unique ID of the Gamma to archive
gamma_abc123Gamma archived successfully
The ID of the archived Gamma
gamma_abc123Confirmation that the Gamma is archived
trueInvalid request parameters
Invalid or missing API key
Access denied - edit permission required
POST /v1.0/gammas/{gammaId}/archive HTTP/1.1
Host: public-api.gamma.app
X-API-KEY: YOUR_API_KEY
Accept: */*
{
"gammaId": "gamma_abc123",
"archived": true
}The gammaId must be the file ID returned by the API (e.g. g_l0mf2jvf1fpmi1v), not the slug from the web app URL. If you pass the URL slug (the ID at the end of gamma.app/docs/My-Doc-bc7s74ruzod20f4), the request returns 403 instead of 404.
Example
Behavior
Idempotent. Archiving an already archived Gamma returns
200with"archived": true.No credits deducted. This endpoint does not consume credits.
Requires edit permission. The API key owner must have edit access, and the Gamma must belong to the API key's workspace.
Finding the gammaId
Poll a completed generation to get the ID:
The gammaId value in the response (e.g. g_l0mf2jvf1fpmi1v) is what you pass to /archive. The gammaUrl field contains the web app link, but the slug in that URL is not the same ID.
Related
GET /generations/{id} to retrieve the
gammaIdfrom a generationError codes for the
403response when using a wrong ID
Last updated
Was this helpful?