Create Custom Object

POSThttps://backend.sindri1.stacks.localbusiness.pro/api/v1/custom-objects

Create a new custom object with optional field definitions.

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.

display_namestringrequired

Object name (max 255).

descriptionstring

Description (max 1000).

iconstring

Icon name (max 50).

colorstring

Color code (max 20).

ai_collection_enabledboolean

Enable AI data collection (default: false).

ai_collection_promptstring

Prompt for AI collection.

fieldsobject[]

Field definitions.

Responses

{
  "custom_object": {
    "id": "new-uuid-...",
    "display_name": "Vehicles",
    "status": "active",
    "active_fields": [
      {
        "display_name": "Make",
        "type": "text"
      }
    ]
  }
}

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

POSThttps://backend.sindri1.stacks.localbusiness.pro/api/v1/custom-objects

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/custom-objects"
BODY='{"display_name":"Vehicles","description":"Customer vehicles","fields":[{"display_name":"Make","type":"text","is_required":true},{"display_name":"Model","type":"text"}]}'

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

curl -X POST \
     -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"