Update Brand Details

PATCHhttps://backend.sindri1.stacks.localbusiness.pro/api/v1/brand-details

Update brand details. Creates the record if it doesn't exist. Note: send accent_color in the request — it's stored as tertiary_color in the response.

X-Public-Keystringrequired

Your business public key. Used to identify which business is making the request.

X-Timestampstringrequired

Current Unix timestamp in seconds. Requests older than 5 minutes are rejected.

X-Signaturestringrequired

HMAC-SHA256 signature of the signing string: {timestamp}\n{METHOD}\n{path}\n{body}, using your private key as the secret.

namestring

Brand name (max 255).

logostring

Logo URL (max 500).

primary_colorstring

Primary color (hex #rrggbb).

secondary_colorstring

Secondary color (hex #rrggbb).

accent_colorstring

Accent color (hex #rrggbb). Stored as tertiary_color.

Responses

{
  "brand_details": {
    "id": 42,
    "business_id": 123,
    "name": "Summit Brand",
    "logo": null,
    "primary_color": "#0f3047",
    "secondary_color": "#ffffff",
    "tertiary_color": "#ff5500"
  }
}

Authentication — HMAC-SHA256

Every authenticated request requires three headers:

X-Public-KeyYour business public key
X-TimestampUnix timestamp (seconds)
X-SignatureHMAC-SHA256 of signing string

Signing string: {timestamp}\n{METHOD}\n{path}\n{body}

Request

PATCHhttps://backend.sindri1.stacks.localbusiness.pro/api/v1/brand-details

Rate Limits

With X-Public-Key: 60 req/min per key

Without: 10 req/min per IP

Code Examples

PUBLIC_KEY="pk_live_..."
PRIVATE_KEY="sk_live_..."
TIMESTAMP=$(date +%s)
PATH_URI="/api/v1/brand-details"
BODY='{"primary_color":"#1a73e8","accent_color":"#ff5500"}'

SIGNATURE=$(printf '%s\n%s\n%s\n%s' "$TIMESTAMP" "PATCH" "$PATH_URI" "$BODY" \
  | openssl dgst -sha256 -hmac "$PRIVATE_KEY" | awk '{print $2}')

curl -X PATCH \
     -H "Content-Type: application/json" \
     -H "X-Public-Key: $PUBLIC_KEY" \
     -H "X-Timestamp: $TIMESTAMP" \
     -H "X-Signature: $SIGNATURE" \
     -d "$BODY" \
     "https://backend.sindri1.stacks.localbusiness.pro$PATH_URI"