# Retrieve a prompt

> GET /v1/prompts/{id} retrieves one stored prompt as JSON with its text and version status, or as the Markdown text alone: parameters, examples and errors.

Source: https://esigncomply.com/docs/api/account/retrieve-a-prompt

Last updated November 26, 2026

In the Esign Comply API, `GET /v1/prompts/{id}` retrieves one stored prompt as JSON with its text and version status, or as the Markdown text alone. Use it to read a prompt again by its ID, which resolves permanently, and hand the text to your coding tool.

`GET /v1/prompts/{id}` · API version `2026-11-21`

## Authentication

Send a secret key in the `Authorization` header: `Bearer $ESIGNCOMPLY_API_KEY`. The key needs any permission. Test keys and live keys both work, and each reads and writes the objects of its own environment. Call it from your server: a secret key never goes to a browser. Keys and permissions are described under [Authentication](https://esigncomply.com/docs/api.md#authentication).

## Request example

### cURL

```bash
curl https://esigncomply.com/v1/prompts/esc_prompt_i5Yi \
  -H "Authorization: Bearer $ESIGNCOMPLY_API_KEY"
```

### Node SDK

```ts
import { EsignComply } from "esigncomply";

const esc = new EsignComply(process.env.ESIGNCOMPLY_API_KEY);

const { data, error } = await esc.prompts.get("esc_prompt_i5Yi");
```

This request ran against the API on November 26, 2026, and the response below is what came back. IDs are example values, and long values are shortened with `...`.

## What it does

Returns one stored prompt with its Markdown. A prompt ID resolves permanently: code built from an earlier prompt can always read the instructions it was given.

With `format=markdown`, or an `Accept: text/markdown` header and no `format`, the response is the prompt text alone, as `text/markdown`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | Yes | ID of the prompt. |
| `format` | query | string | No | markdown or json. Default json. |

Headers: `Esign-Comply-Version` (optional, a dated API version). See [API conventions](https://esigncomply.com/docs/api.md).

## Response

`200 OK` with a Prompt object.

```json
{
  "object": "prompt",
  "id": "esc_prompt_i5Yi",
  "livemode": false,
  "title": "Esign Comply integration: signup acceptance",
  "content_hash": "sha256:80170d02...",
  "markdown": "# Esign Comply integration: signup acceptance\nPrompt esc_prompt_i5Yi · blocks 2026.11 · guidance 2026.11.2 · region US\nJurisdictions: US-FED, US-CA · mode auto · unknown U.S. state: strictest\n\nYou are...",
  "word_count": 2163,
  "guidance_release": "2026.11.2",
  "jurisdictions": [
    "US-FED",
    "US-CA"
  ],
  "pack_versions": {
    "US-CA": "2026-11-21",
    "US-FED": "2026-11-22"
  },
  "block_versions": {
    "tool.other": "2026.11",
    "us.routing": "2026.11",
    "core.client": "2026.11",
    "core.errors": "2026.11",
    "core.gating": "2026.11",
    "core.header": "2026.11",
    "core.server": "2026.11",
    "us.state.ca": "2026.11",
    "core.reports": "2026.11",
    "stack.vercel": "2026.11",
    "verify.steps": "2026.11",
    "core.documents": "2026.11",
    "stack.supabase": "2026.11",
    "core.obligations": "2026.11",
    "stack.nextjs_app": "2026.11",
    "core.assent_design": "2026.11",
    "core.recommendations": "2026.11"
  },
  "profiles": [
    {
      "id": "prof_SVAG",
      "name": "Signup acceptance",
      "source": "created",
      "use_case": "signup_terms"
    }
  ],
  "documents": [],
  "env": [
    "ESIGNCOMPLY_API_KEY",
    "ESIGNCOMPLY_WEBHOOK_SECRET"
  ],
  "files": [
    "app/api/esigncomply/webhook/route.ts",
    "app/signup/page.tsx",
    "app/legal/[slug]/page.tsx",
    "app/accept-updates/page.tsx",
    "lib/esigncomply.ts",
    "supabase/migrations/<timestamp>_esign_acceptances.sql"
  ],
  "fact_keys": [],
  "selections": {
    "company": "Acme, Inc.",
    "use_cases": [
      {
        "use_case": "signup_terms",
        "assurance_level": "L1",
        "method": "checkbox",
        "documents": [
          {
            "name": "Terms of Service",
            "type": "terms"
          }
        ]
      }
    ],
    "signers": "mixed",
    "jurisdictions": [
      "US-FED",
      "US-CA"
    ],
    "jurisdiction_mode": "auto",
    "on_unknown_region": "strictest",
    "governing_law": null,
    "consumer_econsent": "no",
    "failure_mode": "fail_closed",
    "stack": {
      "hosting": "vercel",
      "database": "supabase",
      "language": "typescript",
      "framework": "nextjs_app"
    },
    "tool": "other",
    "options": {
      "receipts": true,
      "confirmation": "lookup",
      "mobile": false,
      "languages": [],
      "certificate_action": false,
      "reports": [],
      "guidance_updates": "off"
    }
  },
  "warnings": [
    "use_cases_defaulted:signup_terms",
    "document_id_missing:Terms of Service"
  ],
  "status": {
    "state": "current",
    "behind": 0,
    "blocks": [],
    "packs": [],
    "guidance_release": {
      "built": "2026.11.2",
      "current": "2026.11.2"
    }
  },
  "regenerated_from": null,
  "created_by": "key:key_Doqa",
  "created_at": "2026-11-26T00:17:54.181Z"
}
```

### Response fields

| Field | Type | Description |
|---|---|---|
| `object` | string |  |
| `id` | string | esc_prompt_... |
| `content_hash` | string |  |
| `markdown` | string |  |
| `profiles` | array |  |
| `guidance_release` | string |  |

## Errors

| Code | HTTP | When |
|---|---|---|
| [`invalid_request`](https://esigncomply.com/docs/api/errors.md#invalid_request) | 400 | `format` is neither `markdown` nor `json`. `param` is `format`. |
| [`not_found`](https://esigncomply.com/docs/api/errors.md#not_found) | 404 | No such prompt in this domain and environment. |

Like every call made with a secret key, it can also return [`missing_api_key`](https://esigncomply.com/docs/api/errors.md#missing_api_key), [`invalid_api_key`](https://esigncomply.com/docs/api/errors.md#invalid_api_key), [`domain_not_verified`](https://esigncomply.com/docs/api/errors.md#domain_not_verified), [`insufficient_permission`](https://esigncomply.com/docs/api/errors.md#insufficient_permission), [`region_mismatch`](https://esigncomply.com/docs/api/errors.md#region_mismatch), [`rate_limit_exceeded`](https://esigncomply.com/docs/api/errors.md#rate_limit_exceeded) and [`internal_error`](https://esigncomply.com/docs/api/errors.md#internal_error).

Every error has the same body: `error.type`, `error.code`, `error.message`, `error.doc_url` and `error.request_id`. See [Errors](https://esigncomply.com/docs/api/errors.md).

## Questions about GET /v1/prompts/{id}

### Which credential does GET /v1/prompts/{id} need?

A secret key with any permission. Send it as a Bearer token in the Authorization header, from your server only. A session client token is refused with insufficient_permission.

### Does GET /v1/prompts/{id} work with a test key?

Yes. It works with test keys and live keys. A test key reads and writes test objects only, and a live key works once the domain is verified.

### Does GET /v1/prompts/{id} count as a signature event?

No. A signature event is counted when a live record is written, by completing a session or by submitting a deferred acceptance. This call writes no record.

### Is GET /v1/prompts/{id} idempotent?

It is a read, so it is safe to repeat. It takes no Idempotency-Key header.

### What is the rate limit for GET /v1/prompts/{id}?

The limit is counted for each key and depends on the plan: 2 requests per second on Free, 10 on Starter, 50 on Unlimited and 100 on Enterprise. Past the limit the API answers 429 rate_limit_exceeded with a Retry-After header.

### Does the Node SDK have a method for GET /v1/prompts/{id}?

Yes: esc.prompts.get() in the esigncomply package. It resolves to { data, error } and does not throw.

## Related

- [Account](https://esigncomply.com/docs/api/account.md): the overview of the resource and all of its operations.
- [Retrieve a prompt update](https://esigncomply.com/docs/api/account/retrieve-a-prompt-update.md): `GET /v1/prompts/{id}/update`
- [Register a domain](https://esigncomply.com/docs/api/account/register-a-domain.md): `POST /v1/domains`
- [List domains](https://esigncomply.com/docs/api/account/list-domains.md): `GET /v1/domains`
- [Retrieve a domain](https://esigncomply.com/docs/api/account/retrieve-a-domain.md): `GET /v1/domains/{id}`
- [Domains](https://esigncomply.com/docs/guides/domains.md)
- [Test mode](https://esigncomply.com/docs/guides/test-mode.md)
- [Errors](https://esigncomply.com/docs/api/errors.md): every error code, with what to do.
- [API conventions](https://esigncomply.com/docs/api.md): authentication, idempotency, rate limits and versioning.
