VoidhashDocs
DevelopersHelp centerGuidesAPI reference
voidhash.comOpen Studio
Essentials
API overview
Authentication
Event capture
Push device API
Webhooks
Webhook delivery
Webhook events
Projects & keys
Projects
API keys
Audit log
Customers & access
Persons
Products
Perks
Sandbox
Paywalls
Paywalls
Paywall templates
Paywall locations
Components
Component registry
Assets
Experiments & flags
Experiments
Feature flags
Analytics & events
Analytics
Analytics alerts
Analytics annotations
Cohorts
Group types
Groups
Events
Ingest policy
VoidQL
Tracking domains
Ads
Ads
Ad accounts
Meta measurement
Payments & stores
Payment providers
Payment provider products
Purchase history imports
Payment sources
Webhooks & notifications
Webhooks
Push notifications
Push configurations
Automations
Organization & team
Organizations
Members
Invitations
Billing
Your account
Profile
Session
Notices
Connected apps
Terms of Service
Developer tools
Schema
SDK
List experiments
Create an experiment
Retrieve an experiment
Update an experiment
Archive an experiment
Unarchive an experiment
Start an experiment
Pause an experiment
Conclude an experiment
List an experiment's arms
Replace an experiment's arms
Deploy a build to an experiment arm
Retrieve an experiment's results
Theme

Deploy a build to an experiment arm

Deploys a build of the paywall an arm shows at a location to that arm alone, in one environment or both, while the experiment runs or is paused: the arm shows it from now on, as shipping a fix to one arm needs.

Deploying the paywall itself never changes an arm, which keeps the build it started with. The build must be a ready build of the same paywall that was deployed to each environment named before, normally its deployed build, and fit the location. Deploying the build the arm keeps changes nothing. Recorded in the arm's buildChanges and the audit log; results go on counting everyone in the arm.

Guide: Feature flags and A/B tests

Errors

StatustypecodeWhen
400invalid_requestinvalid_buildFor a build that does not qualify, naming paywallLocationId when the arm shows no paywall at that location and buildId otherwise.
403permission_deniedpermission_deniedWhen the caller may not publish paywalls (project:paywalls:publish).
404not_foundexperiment_not_foundWhen the project has no such experiment.
404not_foundexperiment_variant_not_foundWhen the experiment has no such arm.
409conflictpaywall_build_withdrawnFor a withdrawn build.
409conflictexperiment_not_startedFor a draft.
409conflictexperiment_concluded—
409conflictexperiment_archived—

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

More in Experiments

  • List experiments GET
  • Create an experiment POST
  • Retrieve an experiment GET
  • Update an experiment PATCH
  • Archive an experiment POST
  • Unarchive an experiment POST
  • Start an experiment POST
  • Pause an experiment POST
  • Conclude an experiment POST
  • List an experiment's arms GET
  • Replace an experiment's arms PUT
  • Retrieve an experiment's results GET

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

PreviousReplace an experiment's armsNextRetrieve an experiment's results
© 2026 Voidhash s.r.o.
voidhash.comPricingTermsPrivacyDiscord

On this page

AuthorizationPath parametersRequest bodyExamplesResponse bodyErrorsMore in Experiments
POST
/api/v1/projects/{projectId}/experiments/{experimentId}/variants/{variantId}/deploy

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.

experimentId*string

The experiment's id, exp_....

variantId*string

The arm's id, exp_var_....

Request body

application/json

TypeScript definitions

Use the request body type in TypeScript.

paywallLocationId*string

The location the arm shows the paywall at, pw_loc_....

buildId*string

A ready build of the paywall the arm shows there, pw_build_..., deployed to each environment named before; normally the paywall's deployed build.

environment?|

The one environment to change; omitted, both.

Examples

curl -X POST "https://api.voidhash.com/api/v1/projects/proj_tz4a98xxat96iws9zmbrgj3a/experiments/exp_c6v8b3n5q0w2e7h7d2k9m4x1/variants/exp_var_n5q0w2e7h7d2k9m4x1c6v8b3/deploy" \  -H "Authorization: Bearer vh_sk_..." \  -H "Content-Type: application/json" \  -d '{    "paywallLocationId": "pw_loc_m4x1c6v8b3n5q0w2e7h7d2k9",    "buildId": "pw_build_h7d5b0w8e2k3v8n1q6x2c9m4",    "environment": "production"  }'
{  "id": "exp_var_n5q0w2e7h7d2k9m4x1c6v8b3",  "name": "Annual first",  "isControl": false,  "weightPercentage": 50,  "placements": [    {      "paywallLocationId": "pw_loc_m4x1c6v8b3n5q0w2e7h7d2k9",      "paywallId": "pw_h7d2k9m4x1c6v8b3n5q0w2e7",      "builds": {        "production": {          "keptBuildId": "pw_build_h7d5b0w8e2k3v8n1q6x2c9m4",          "keptBuildNumber": 4,          "deployedBuildNumber": 4,          "concludedBuildNumber": null        },        "test": {          "keptBuildId": "pw_build_k3v8n1q6x2c9m4h7d5b0w8e2",          "keptBuildNumber": 3,          "deployedBuildNumber": 4,          "concludedBuildNumber": null        }      },      "buildChanges": [        {          "environment": "production",          "fromPaywallId": "pw_h7d2k9m4x1c6v8b3n5q0w2e7",          "fromBuildNumber": 3,          "toPaywallId": "pw_h7d2k9m4x1c6v8b3n5q0w2e7",          "toBuildNumber": 4,          "changedAt": "2026-03-18T10:12:00.000Z",          "changedByUserId": "user_k3m8q1z6v9c2x5b7n4w0e8r1"        }      ]    }  ],  "flagValues": [],  "stoppedPlacements": []}
{  "error": {    "type": "invalid_request",    "code": "invalid_build",    "message": "Build #5 was never deployed to production; an arm can only move to a build deployed there before",    "param": "buildId"  }}
{  "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": "experiment_not_found",    "message": "This project has no experiment exp_c6v8b3n5q0w2e7h7d2k9m4x1.",    "param": "experimentId"  }}

{  "error": {    "type": "conflict",    "code": "paywall_build_withdrawn",    "message": "Build #3 is withdrawn, so it cannot be deployed. Restore it first (restoreBuild), or deploy another build.",    "param": "buildId"  }}

{  "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