Beladed Docs
Help Sign in Create account

Beladed Pages API

Create Community Challenge

beta

Create Community Challenge through the reviewed Beladed Pages contract.

POST/api/pages/general/create
curl --request POST 'https://api.beladed.dev/api/pages/general/create' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-Beladed-API-Key: BELADED_SECRET_KEY' \
  --data '{
  "title": "Beladed Challenge Hub",
  "name": "Beladed Challenge Hub",
  "headline": "Vote for your side",
  "description": "A test Pages payload for community voting and signup.",
  "pageType": "Community",
  "pageSubType": "Challenge",
  "status": "published",
  "visibility": "public",
  "templateId": "challenge-starter",
  "sections": [
    {
      "id": "id_demo_001",
      "type": "hero",
      "title": "Challenge accepted"
    },
    {
      "id": "id_demo_001",
      "type": "cta",
      "title": "Join the challenge"
    }
  ],
  "leadCapture": {
    "enabled": true,
    "email": {
      "enabled": true,
      "label": "Email address",
      "placeholder": "Enter your email",
      "consentText": "By subscribing you agree to receive updates."
    },
    "sms": {
      "enabled": true,
      "label": "Mobile number",
      "placeholder": "Enter your mobile number",
      "consentText": "I agree to receive SMS updates related to this page."
    },
    "social": {
      "enabled": true,
      "label": "Social handle",
      "placeholder": "Instagram @handle"
    }
  },
  "audienceChoice": {
    "enabled": true,
    "options": [
      "Blue Team",
      "Gold Team"
    ],
    "collectEmail": "developer@example.invalid",
    "showResults": false
  }
}'

Parameters

This operation has no documented parameters.

Request body

Requestapplication/json
Schema
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "headline": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "pageType": {
      "type": "string"
    },
    "pageSubType": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "visibility": {
      "type": "string"
    },
    "templateId": {
      "type": "string"
    },
    "sections": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      }
    },
    "leadCapture": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "email": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "placeholder": {
              "type": "string"
            },
            "consentText": {
              "type": "string"
            }
          }
        },
        "sms": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "placeholder": {
              "type": "string"
            },
            "consentText": {
              "type": "string"
            }
          }
        },
        "social": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "placeholder": {
              "type": "string"
            }
          }
        }
      }
    },
    "audienceChoice": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "collectEmail": {
          "type": "string"
        },
        "showResults": {
          "type": "boolean"
        }
      }
    }
  }
}
{
  "title": "Beladed Challenge Hub",
  "name": "Beladed Challenge Hub",
  "headline": "Vote for your side",
  "description": "A test Pages payload for community voting and signup.",
  "pageType": "Community",
  "pageSubType": "Challenge",
  "status": "published",
  "visibility": "public",
  "templateId": "challenge-starter",
  "sections": [
    {
      "id": "id_demo_001",
      "type": "hero",
      "title": "Challenge accepted"
    },
    {
      "id": "id_demo_001",
      "type": "cta",
      "title": "Join the challenge"
    }
  ],
  "leadCapture": {
    "enabled": true,
    "email": {
      "enabled": true,
      "label": "Email address",
      "placeholder": "Enter your email",
      "consentText": "By subscribing you agree to receive updates."
    },
    "sms": {
      "enabled": true,
      "label": "Mobile number",
      "placeholder": "Enter your mobile number",
      "consentText": "I agree to receive SMS updates related to this page."
    },
    "social": {
      "enabled": true,
      "label": "Social handle",
      "placeholder": "Instagram @handle"
    }
  },
  "audienceChoice": {
    "enabled": true,
    "options": [
      "Blue Team",
      "Gold Team"
    ],
    "collectEmail": "developer@example.invalid",
    "showResults": false
  }
}

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/pages.js
Handler owner
../beladed-api-cloudflare/src/functions/core/PagesGeneral.js
Verified
2026-07-11
Type to search the complete public documentation catalog.