Create a new secret
curl --request PUT \
--url https://api.nexrender.com/api/v2/secrets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"value": "<string>"
}
'import requests
url = "https://api.nexrender.com/api/v2/secrets"
payload = {
"name": "<string>",
"value": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', value: '<string>'})
};
fetch('https://api.nexrender.com/api/v2/secrets', 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.nexrender.com/api/v2/secrets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'value' => '<string>'
]),
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.nexrender.com/api/v2/secrets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.nexrender.com/api/v2/secrets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nexrender.com/api/v2/secrets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Rendering Jobs
Secrets Management
Store and manage secure environment variables for rendering jobs. Secrets allow you to reference API keys, storage credentials, or any sensitive values without exposing them in job payloads.
PUT
/
secrets
Create a new secret
curl --request PUT \
--url https://api.nexrender.com/api/v2/secrets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"value": "<string>"
}
'import requests
url = "https://api.nexrender.com/api/v2/secrets"
payload = {
"name": "<string>",
"value": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', value: '<string>'})
};
fetch('https://api.nexrender.com/api/v2/secrets', 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.nexrender.com/api/v2/secrets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'value' => '<string>'
]),
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.nexrender.com/api/v2/secrets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.nexrender.com/api/v2/secrets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nexrender.com/api/v2/secrets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}What Are Secrets?
Secrets are securely stored values that can be referenced in job payloads or upload configurations.They are encrypted, team-scoped, and never exposed in plaintext once created. Use secrets to keep API keys, S3 credentials, or other sensitive environment variables out of job definitions.
Endpoints
List Secrets
curl -X GET https://api.nexrender.com/api/v2/secrets \
-H "Authorization: Bearer YOUR_API_KEY"
[
{
"id": "01K0ABCDEFXYZ1234567GHJ89Q",
"name": "AWS_ACCESS_KEY_ID",
"createdAt": "2025-09-09T10:15:32.000Z"
},
{
"id": "01K0ABCDEFXYZ1234567GHJ89R",
"name": "AWS_SECRET_ACCESS_KEY",
"createdAt": "2025-09-09T10:16:05.000Z"
}
]
Create a Secret
curl -X PUT https://api.nexrender.com/api/v2/secrets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "AWS_ACCESS_KEY_ID",
"value": "AKIAIOSFODNN7EXAMPLE"
}'
{
"id": "01K0ABCDEFXYZ1234567GHJ89Q",
"name": "AWS_ACCESS_KEY_ID",
"createdAt": "2025-09-09T10:15:32.000Z"
}
Secret Already Exists
{
"error": "Secret already exists",
"errorCode": "SECRET_ALREADY_EXISTS"
}
Using Secrets in Rendering Jobs
When defining upload configuration or other sensitive fields inside a job payload, you can reference secrets by instead of hardcoding credentials:{
"upload": {
"provider": "s3",
"params": {
"region": "us-east-1",
"bucket": "my-renders",
"accessKeyId": "${secrets.AWS_ACCESS_KEY_ID}",
"accessKeySecret": "${secrets.AWS_SECRET_ACCESS_KEY}"
}
}
}
upload object, assets, and in webhook fields.
Removing Secrets
curl --request DELETE \
--url https://api.nexrender.com/api/v2/secrets/<SECRET_ID> \
--header "Authorization: Bearer <YOUR_API_TOKEN>"
Best Practices
- Use secrets for all credentials (API keys, S3 credentials, webhooks with auth).
- Prefer fine-grained secrets (per-project, per-environment) rather than global catch-alls.
Authorizations
Bearer token authentication using API tokens for team-based access control.
You can generate your own API token at: https://app.nexrender.com/settings/api-tokens
Body
application/json
Response
Secret successfully created
Was this page helpful?

