Beladed Docs
Help Sign in Create account

Beladed Embeds API

Update

beta

Update through the reviewed Beladed Embeds contract.

PUT/api/vote/embed/update
curl --request PUT 'https://api.beladed.dev/api/vote/embed/update' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-Beladed-API-Key: BELADED_SECRET_KEY' \
  --data '{
  "embedId": "id_demo_001",
  "name": "Updated Website Audience Pulse",
  "title": "Updated Website Audience Pulse",
  "description": "Updated embed configuration.",
  "domain": "example_domain",
  "targetUrl": "https://merchant.example.invalid",
  "selector": "#beladed-vote-widget-updated",
  "placement": "floating",
  "brandName": "Beladed",
  "primaryColor": "#4F46E5",
  "secondaryColor": "#0F172A",
  "revShareEnabled": true,
  "allowAnonymous": false,
  "showBranding": true,
  "status": "active",
  "options": [
    {
      "id": "id_demo_001",
      "text": "Absolutely",
      "color": "#16A34A"
    },
    {
      "id": "id_demo_001",
      "text": "Not Yet",
      "color": "#DC2626"
    }
  ],
  "config": {
    "placement": "floating",
    "selector": "#beladed-vote-widget-updated"
  }
}'

Parameters

This operation has no documented parameters.

Request body

Requestapplication/json
Schema
{
  "type": "object",
  "properties": {
    "embedId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "targetUrl": {
      "type": "string"
    },
    "selector": {
      "type": "string"
    },
    "placement": {
      "type": "string"
    },
    "brandName": {
      "type": "string"
    },
    "primaryColor": {
      "type": "string"
    },
    "secondaryColor": {
      "type": "string"
    },
    "revShareEnabled": {
      "type": "boolean"
    },
    "allowAnonymous": {
      "type": "boolean"
    },
    "showBranding": {
      "type": "boolean"
    },
    "status": {
      "type": "string"
    },
    "options": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "color": {
            "type": "string"
          }
        }
      }
    },
    "config": {
      "type": "object",
      "properties": {
        "placement": {
          "type": "string"
        },
        "selector": {
          "type": "string"
        }
      }
    }
  }
}
{
  "embedId": "id_demo_001",
  "name": "Updated Website Audience Pulse",
  "title": "Updated Website Audience Pulse",
  "description": "Updated embed configuration.",
  "domain": "example_domain",
  "targetUrl": "https://merchant.example.invalid",
  "selector": "#beladed-vote-widget-updated",
  "placement": "floating",
  "brandName": "Beladed",
  "primaryColor": "#4F46E5",
  "secondaryColor": "#0F172A",
  "revShareEnabled": true,
  "allowAnonymous": false,
  "showBranding": true,
  "status": "active",
  "options": [
    {
      "id": "id_demo_001",
      "text": "Absolutely",
      "color": "#16A34A"
    },
    {
      "id": "id_demo_001",
      "text": "Not Yet",
      "color": "#DC2626"
    }
  ],
  "config": {
    "placement": "floating",
    "selector": "#beladed-vote-widget-updated"
  }
}

Responses

200The request succeeded.
Responseapplication/json
Schema
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "requestId": {
      "type": "string"
    }
  }
}
{
  "data": {
    "id": "id_demo_001",
    "status": "available"
  },
  "requestId": "req_demo_001"
}

Errors

400invalid_request

The request did not satisfy the documented contract.

401authentication_required

The credential is missing or invalid.

403not_authorized

The account, product scope, permission, or origin is not eligible.

404not_found

The requested public or account-owned resource was not found.

429rate_limited

Retry after the current product limit resets.

Reliability

Idempotency
No public Idempotency-Key guarantee is declared; use a stable client reference and confirm resource state before retrying.
Pagination
Not applicable.
Rate limit
Subject to current account, product, and abuse-protection limits. Honor Retry-After when returned.
Webhook events
No related public event is declared.

Contract provenance

This operation is published from reviewed repository contracts. Source metadata is included for traceability without exposing internal implementation details.

Route owner
../beladed-api-cloudflare/src/functions/vote.js
Handler owner
../beladed-api-cloudflare/src/functions/core/VoteEmbed.js
Verified
2026-07-11
Type to search the complete public documentation catalog.