List color presets
curl --request GET \
--url https://api.autoprintfarm.com/public/v1/colors \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.autoprintfarm.com/public/v1/colors"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.autoprintfarm.com/public/v1/colors', 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.autoprintfarm.com/public/v1/colors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.autoprintfarm.com/public/v1/colors"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.autoprintfarm.com/public/v1/colors")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autoprintfarm.com/public/v1/colors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "<string>",
"color_name": "<string>",
"hex_code": "<string>",
"filament_type": "<string>",
"is_active": true,
"created_at": "<string>"
}
]
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}Products
List color presets
Returns all of your filament color presets. Small reference dataset — no pagination. Gated by the read scope.
GET
/
colors
List color presets
curl --request GET \
--url https://api.autoprintfarm.com/public/v1/colors \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.autoprintfarm.com/public/v1/colors"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.autoprintfarm.com/public/v1/colors', 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.autoprintfarm.com/public/v1/colors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.autoprintfarm.com/public/v1/colors"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.autoprintfarm.com/public/v1/colors")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.autoprintfarm.com/public/v1/colors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "<string>",
"color_name": "<string>",
"hex_code": "<string>",
"filament_type": "<string>",
"is_active": true,
"created_at": "<string>"
}
]
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"details": "<unknown>"
}
}Authorizations
API keys are minted in the AutoPrintFarm web app under Settings → API Keys. Send as Authorization: Bearer apf_live_.... Keys are shown exactly once at creation and can be revoked at any time.
Query Parameters
Filter by filament type (e.g. PLA, PETG)
Filter to active or inactive presets
Available options:
true, false Was this page helpful?
⌘I