Save a new kit (creates the next version; previous ones are unchanged). Requires brand.manage
PUT
/v1/brands/{brand}/brand-kit
const url = 'https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/brand-kit';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"colors":{"primary":"example","secondary":"example","text":"example","background":"example","link":"example"},"fonts":{"heading":{"web":"example","stack":"sans"},"body":{"web":"example","stack":"sans"}},"logos":{"light":"example","dark":"example","square":"example"},"voice":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/brand-kit \ --header 'Content-Type: application/json' \ --data '{ "colors": { "primary": "example", "secondary": "example", "text": "example", "background": "example", "link": "example" }, "fonts": { "heading": { "web": "example", "stack": "sans" }, "body": { "web": "example", "stack": "sans" } }, "logos": { "light": "example", "dark": "example", "square": "example" }, "voice": "example" }'Color pairs with contrast below 4.5 do not block: they are returned in warnings (brand_kit_contrast).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”brand
required
string
Example
brd_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
colors
required
object
primary
required
#RRGGBB
string
secondary
required
#RRGGBB
string
text
required
#RRGGBB
string
background
required
#RRGGBB
string
link
required
#RRGGBB
string
fonts
object
heading
object
web
string
stack
required
string
body
object
web
string
stack
required
string
logos
Drive version ids (image or SVG from the same brand, active file).
object
light
string
dark
string
square
string
voice
Tone of voice for the AI.
string
Responses
Section titled “Responses”New kit version
Media typeapplication/json
object
id
required
string
version
required
number
colors
required
object
key
additional properties
string
fonts
required
object
key
additional properties
object
web
string
stack
required
string
logos
required
object
key
additional properties
string
voice
required
string
createdAt
required
string
safeStacks
required
Safe stack the compiler writes for each font, whether or not there is a web font family.
object
key
additional properties
string
contrast
required
object
text
required
number
link
required
number
button
required
number
warnings
required
Array<object>
object
code
required
string
pair
required
string
ratio
required
number
min
required
number
Example
{ "warnings": [ { "code": "brand_kit_contrast" } ]}Invalid data
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Internal error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}