Read the answer an app ships for a location

Reads what the location answers a new anonymous person in production, in the shape the SDK's resolvePaywall returns, for an app at interfaceRevision: what it shows everyone, never a pin or rule, and the control arm of an A/B test there, running or paused.

It is what an app ships to show when it cannot reach Voidhash. It names the build the location shows, or the earlier build resolve serves instead to an app at an older revision, or while the build shown is withdrawn (withdrawnBuild names it then). The build is chosen for an SDK that shows every build; requirements says what an app's SDK needs to show it. A test key gets the same answer as a production key: production's.

Guide: Paywalls in your app

GET
/api/v1/projects/{projectId}/paywall-locations/{paywallLocationId}/default-answer

Authorization

AuthorizationBearer <token>

A project secret key: vh_sk_... for production, vh_sk_test_... for test. Keep it on your servers.

In: header

Path parameters

projectId*string

The project's id, proj_.... A secret key works only in the project it belongs to.

paywallLocationId*string

The location's id, pw_loc_....

Query parameters

interfaceRevision?integer

The revision of the location's interface the app presents it at, as its SDK reports it: the one in flowRevisions or the generated types. Defaults to 0, an app that names none.

Range0 <= value

Examples

curl -X GET "https://api.voidhash.com/api/v1/projects/proj_tz4a98xxat96iws9zmbrgj3a/paywall-locations/pw_loc_m4x1c6v8b3n5q0w2e7h7d2k9/default-answer" \  -H "Authorization: Bearer vh_sk_..."
{  "answer": {    "location": {      "id": "string",      "interfaceRevision": 0,      "name": "string",      "slug": "onboarding"    },    "showing": {      "id": "string",      "paywall": {        "id": "string",        "name": "string",        "slug": "string"      },      "paywallId": "string",      "paywallRelease": {        "flowPackage": {          "abiVersion": 0,          "kind": "string",          "productIds": [            "string"          ],          "shouldEndFlowOnPurchase": true,          "sha256": "string",          "url": "string",          "runtime": {            "version": "0.1.0",            "sha256": "string",            "url": "string",            "signature": "string"          }        },        "publishedAt": "string",        "releaseId": "string",        "version": 0      },      "paywallReleaseId": "string",      "startedAt": "2026-03-14T09:26:53.000Z",      "type": "paywall_release",      "exposureToken": "string"    },    "withdrawnPackages": [      "string"    ]  },  "interfaceRevision": 0,  "experiment": {    "id": "string",    "name": "string",    "status": "draft"  },  "withdrawnBuild": {    "releaseId": "string",    "buildNumber": -9007199254740991  },  "requirements": {    "packageFormat": -9007199254740991,    "nativeComponents": [      {        "id": "string",        "version": "string"      }    ]  }}
{  "error": {    "type": "invalid_request",    "code": "string",    "message": "string",    "param": "string"  }}
{  "error": {    "type": "unauthenticated",    "code": "invalid_api_key",    "message": "This secret key is not valid."  }}
{  "error": {    "type": "permission_denied",    "code": "permission_denied",    "message": "Insufficient permissions."  }}
{  "error": {    "type": "not_found",    "code": "project_not_found",    "message": "There is no project proj_tz4a98xxat96iws9zmbrgj3a, or this credential cannot use it.",    "param": "projectId"  }}

{  "error": {    "type": "conflict",    "code": "paywall_location_archived",    "message": "Paywall location pw_loc_m4x1c6v8b3n5q0w2e7h7d2k9 is archived, so it cannot show anything.",    "param": "paywallLocationId"  }}

{  "error": {    "type": "internal",    "code": "internal_error",    "message": "Something went wrong on our side. Try again, and contact support with the Request-Id header if it keeps failing."  }}

Response body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

Errors

StatustypecodeWhen
409conflictpaywall_location_archivedFor an archived location.
409conflictpaywall_location_shows_nothingWhen the location shows nothing.
409conflictpaywall_release_withdrawnWhen its build is withdrawn and no earlier build can be served instead.
409conflictpaywall_interface_revision_unsupportedWhen no build of it can be shown by an app at that revision.

It can also fail with the errors every operation shares, such as unauthenticated; see Errors.

More in Paywall locations

Something wrong or missing on this page? Tell us by email or on Discord.