Install a registry component
Installs a registry component into the project at the newest ready version in versionRange.
Guide: Publishing
A project secret key: vh_sk_... for production, vh_sk_test_... for test. Keep it on your servers.
In: header
Path parameters
The project's id, proj_.... A secret key works only in the project it belongs to.
Request body
application/json
TypeScript definitions
Use the request body type in TypeScript.
The id of the registry component to install, cmp_pkg_....
The versions to follow: *, an exact version such as 1.2.0, ^1.2.0 (same major version) or ~1.2.0 (same minor version). Defaults to ^ the newest ready version.
Acceptance of the reviewed version, required when the install review needs consent.
Examples
curl -X POST "https://api.voidhash.com/api/v1/projects/proj_tz4a98xxat96iws9zmbrgj3a/component-installs" \ -H "Authorization: Bearer vh_sk_..." \ -H "Content-Type: application/json" \ -d '{ "registryComponentId": "cmp_pkg_h2j7k4l9z1x6c3v8b5n0m4q7", "versionRange": "^1.2.0", "consent": { "version": "1.2.0", "capabilities": [ "commerce" ] } }'{ "id": "cmp_inst_b9n4m7q2w5e8r1t6y3u0i5o8", "projectId": "proj_tz4a98xxat96iws9zmbrgj3a", "registryComponentId": "cmp_pkg_h2j7k4l9z1x6c3v8b5n0m4q7", "slug": "acme/plan-picker", "versionRange": "^1.2.0", "versionId": "cmp_pkg_ver_w8e3r6t1y4u9i2o7p5a0s3d6", "version": "1.2.0", "versionStatus": "ready", "consentedCapabilities": [ "commerce" ], "availableUpdate": null, "installedBy": "user_k3m8q1z6v9c2x5b7n4w0e8r1", "createdAt": "2026-03-12T09:00:00.000Z", "updatedAt": "2026-03-12T09:00:00.000Z"}{ "error": { "type": "invalid_request", "code": "invalid_version_range", "message": "The version range is invalid. \"1.x\" is not a version range: use *, an exact version (1.2.3), ^1.2.3 or ~1.2.3.", "param": "versionRange" }}{ "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": "registry_component_not_found", "message": "This organization's registry has no component cmp_pkg_h2j7k4l9z1x6c3v8b5n0m4q7.", "param": "registryComponentId" }}{ "error": { "type": "conflict", "code": "consent_required", "message": "acme/plan-picker 1.3.0 needs your review: it asks for analytics. Accept it to continue.", "param": "consent" }}{ "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
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request | invalid_version_range | — |
| 404 | not_found | registry_component_not_found | — |
| 409 | conflict | consent_required | , changing nothing, until consent accepts the reviewed version and every capability it asks for (see the install review). |
| 409 | conflict | already_installed | — |
| 409 | conflict | registry_component_deprecated | — |
| 409 | conflict | no_matching_version | — |
| 409 | conflict | no_installable_version | — |
It can also fail with the errors every operation shares, such as unauthenticated; see Errors.
More in Component registry
- Retrieve the registry publisher
GET - Claim a registry namespace
PUT - List registry components
GET - Publish a component bundle
POST - Publish a project component
POST - Retrieve a registry component
GET - Update a registry component
PATCH - List a registry component's versions
GET - Retrieve a registry component version
GET - Update a registry component version
PATCH - Retrieve a version's file
GET - Review an install
GET - List installed components
GET - Retrieve an install
GET - Update an install
PATCH - Uninstall a registry component
DELETE
Something wrong or missing on this page? Tell us by email or on Discord.