curl --request POST \
--url https://api.veryfront.com/projects/{project_reference}/dependencies/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"specifiers": [
"styled-components",
"@radix-ui/react-dialog",
"[email protected]",
"zod@^3"
],
"branch": "feature-a",
"expected_declarations": {
"styled-components": "^6",
"got": null
}
}
'import requests
url = "https://api.veryfront.com/projects/{project_reference}/dependencies/resolve"
payload = {
"specifiers": ["styled-components", "@radix-ui/react-dialog", "[email protected]", "zod@^3"],
"branch": "feature-a",
"expected_declarations": {
"styled-components": "^6",
"got": None
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
specifiers: ['styled-components', '@radix-ui/react-dialog', '[email protected]', 'zod@^3'],
branch: 'feature-a',
expected_declarations: {'styled-components': '^6', got: null}
})
};
fetch('https://api.veryfront.com/projects/{project_reference}/dependencies/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.veryfront.com/projects/{project_reference}/dependencies/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'specifiers' => [
'styled-components',
'@radix-ui/react-dialog',
'[email protected]',
'zod@^3'
],
'branch' => 'feature-a',
'expected_declarations' => [
'styled-components' => '^6',
'got' => null
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.veryfront.com/projects/{project_reference}/dependencies/resolve"
payload := strings.NewReader("{\n \"specifiers\": [\n \"styled-components\",\n \"@radix-ui/react-dialog\",\n \"[email protected]\",\n \"zod@^3\"\n ],\n \"branch\": \"feature-a\",\n \"expected_declarations\": {\n \"styled-components\": \"^6\",\n \"got\": null\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.veryfront.com/projects/{project_reference}/dependencies/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"specifiers\": [\n \"styled-components\",\n \"@radix-ui/react-dialog\",\n \"[email protected]\",\n \"zod@^3\"\n ],\n \"branch\": \"feature-a\",\n \"expected_declarations\": {\n \"styled-components\": \"^6\",\n \"got\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/projects/{project_reference}/dependencies/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"specifiers\": [\n \"styled-components\",\n \"@radix-ui/react-dialog\",\n \"[email protected]\",\n \"zod@^3\"\n ],\n \"branch\": \"feature-a\",\n \"expected_declarations\": {\n \"styled-components\": \"^6\",\n \"got\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"pins": {
"styled-components": "6.3.5",
"got": "12.6.1",
"zod": "3.23.8"
},
"persisted": true,
"skipped": {
"zod": "declaration_changed"
}
}Resolve and Pin Project Dependencies
Resolves npm package specifiers to exact version strings and persists them into the project’s package.json. Inline exact versions are used as-is; ranges and bare names are resolved against the npm registry (cached in Redis). Pre-existing exact pins are never overwritten. Unknown packages and registry failures produce partial success — the affected specifiers are omitted from the response rather than failing the entire batch.
curl --request POST \
--url https://api.veryfront.com/projects/{project_reference}/dependencies/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"specifiers": [
"styled-components",
"@radix-ui/react-dialog",
"[email protected]",
"zod@^3"
],
"branch": "feature-a",
"expected_declarations": {
"styled-components": "^6",
"got": null
}
}
'import requests
url = "https://api.veryfront.com/projects/{project_reference}/dependencies/resolve"
payload = {
"specifiers": ["styled-components", "@radix-ui/react-dialog", "[email protected]", "zod@^3"],
"branch": "feature-a",
"expected_declarations": {
"styled-components": "^6",
"got": None
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
specifiers: ['styled-components', '@radix-ui/react-dialog', '[email protected]', 'zod@^3'],
branch: 'feature-a',
expected_declarations: {'styled-components': '^6', got: null}
})
};
fetch('https://api.veryfront.com/projects/{project_reference}/dependencies/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.veryfront.com/projects/{project_reference}/dependencies/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'specifiers' => [
'styled-components',
'@radix-ui/react-dialog',
'[email protected]',
'zod@^3'
],
'branch' => 'feature-a',
'expected_declarations' => [
'styled-components' => '^6',
'got' => null
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.veryfront.com/projects/{project_reference}/dependencies/resolve"
payload := strings.NewReader("{\n \"specifiers\": [\n \"styled-components\",\n \"@radix-ui/react-dialog\",\n \"[email protected]\",\n \"zod@^3\"\n ],\n \"branch\": \"feature-a\",\n \"expected_declarations\": {\n \"styled-components\": \"^6\",\n \"got\": null\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.veryfront.com/projects/{project_reference}/dependencies/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"specifiers\": [\n \"styled-components\",\n \"@radix-ui/react-dialog\",\n \"[email protected]\",\n \"zod@^3\"\n ],\n \"branch\": \"feature-a\",\n \"expected_declarations\": {\n \"styled-components\": \"^6\",\n \"got\": null\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/projects/{project_reference}/dependencies/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"specifiers\": [\n \"styled-components\",\n \"@radix-ui/react-dialog\",\n \"[email protected]\",\n \"zod@^3\"\n ],\n \"branch\": \"feature-a\",\n \"expected_declarations\": {\n \"styled-components\": \"^6\",\n \"got\": null\n }\n}"
response = http.request(request)
puts response.read_body{
"pins": {
"styled-components": "6.3.5",
"got": "12.6.1",
"zod": "3.23.8"
},
"persisted": true,
"skipped": {
"zod": "declaration_changed"
}
}Authorizations
Use a JWT bearer token or a Veryfront API key in the Authorization header.
Path Parameters
Project slug, UUID, or domain
Body
npm package specifiers to resolve. Each entry may be a bare name, a name with an inline exact version, or a name with a semver range (e.g. "react", "[email protected]", "zod@^3", "@radix-ui/react-dialog").
1 - 100 elements1 - 200[ "styled-components", "@radix-ui/react-dialog", "[email protected]", "zod@^3" ]
Preview branch name or ID whose package.json receives the resolved pins.
1 - 255"feature-a"
Package declarations observed by the caller. A null value means the package was absent. When supplied, every requested package must be present and stale declarations are not overwritten.
Show child attributes
Show child attributes
{ "styled-components": "^6", "got": null }
Response
Resolved pins (may be a partial set if some specifiers failed)
Resolved exact version pins keyed by package name. Includes both newly-written pins and pre-existing exact pins for all requested specifiers that were successfully resolved.
Show child attributes
Show child attributes
{ "styled-components": "6.3.5", "got": "12.6.1", "zod": "3.23.8" }
Whether the resolved pins were successfully written to the project's package.json. A false value means resolution succeeded but the write failed; pins still reflect the intended values and the caller may retry.
Requested packages not written because the current declaration no longer matched the caller snapshot.
Show child attributes
Show child attributes
{ "zod": "declaration_changed" }