Skip to documentation
SparkGlimSparkGlim Developer
Search all documentation

Try a topic in your language or an exact API path.

    API reference

    Update campaign

    Updates supported fields of a campaign owned by the authenticated organization; account permissions and status rules still apply.

    PATCHhttps://api.sparkglim.net/api/white-label/v1/campaigns/:campaignId

    Access model

    Access model
    Server-side Organization HMAC
    Required scope
    campaigns:write
    Documented availability
    Implemented in source

    Availability is verified from source, not a live production guarantee.

    Private signing stays on your server. API Version 1 uses signature format v2; it is not API v2.

    Headers

    NameTypeValidation
    x-white-label-domainRequired

    Verified website hostname used to resolve the approved organization account and bind this request.

    stringValidation: verified HTTPS hostname.
    x-white-label-key-idRequired

    Identifier extracted from the single issued Private Key value; never send its secret in this header.

    stringValidation: issued private key internal identifier.
    x-white-label-signature-versionRequired

    Selects the domain-bound signing format; API routes remain Version 1.

    stringValidation: 2.
    x-white-label-timestampRequired

    Request signing time in milliseconds, checked against the server clock to reject stale requests.

    stringValidation: 13 digit milliseconds; within five minutes.
    x-white-label-nonceRequired

    Fresh random signing value recorded by the server to reject replay of a signed request.

    stringValidation: fresh 16–128 [A-Za-z0-9_-].
    x-white-label-signatureRequired

    HMAC-SHA256 of the canonical domain, idempotency key, campaign credential, timestamp, nonce, method, path, sorted query and exact body hash.

    stringValidation: lowercase hexadecimal HMAC-SHA256.
    x-white-label-campaign-keyOptional

    Optional complete Campaign Key that narrows a private request to the same authorized campaign.

    stringValidation: complete optional scoped keyId:secret.

    Parameters

    NameTypeValidation
    campaignIdRequired

    Existing campaign record within the caller’s account and any narrower campaign credential.

    stringValidation: UUID or documented resource identifier.

    Request

    NameTypeValidation
    titleOptional

    Public-facing campaign title supplied by the authorized organizer.

    stringValidation: 3–255.
    descriptionOptional

    Organizer-provided description explaining this campaign or ticket type.

    stringValidation: 10–5000.
    campaign_typeOptional

    Selects ticketing, awards voting or donation campaign services; does not grant access to an unrelated module.

    enumValidation: ticketing | voting | donation.
    start_dateOptional

    Campaign opening timestamp in ISO datetime format.

    stringValidation: ISO datetime.
    end_dateOptional

    Campaign closing timestamp in ISO datetime format.

    stringValidation: ISO datetime.
    country_codeOptional

    Configured selling country code; the server checks account and market eligibility.

    stringValidation: ISO2.
    currency_codeOptional

    Existing permitted campaign currency; choosing a country never authorizes a new currency.

    stringValidation: ISO3.
    slugOptional

    URL-friendly identifier for the existing campaign or published article.

    stringValidation: configured slug schema.
    statusOptional

    Requested supported lifecycle state; account and campaign approval rules still control publication and access.

    enumValidation: draft | pending_approval | approved | rejected | archived.
    vote_priceOptional

    Campaign configuration value for the selected product, stored in the campaign’s own currency or capacity unit.

    numberValidation: >=0.
    donation_goalOptional

    Campaign configuration value for the selected product, stored in the campaign’s own currency or capacity unit.

    numberValidation: >=0.
    ticket_priceOptional

    Campaign configuration value for the selected product, stored in the campaign’s own currency or capacity unit.

    numberValidation: >=0.
    ticket_capacityOptional

    Campaign configuration value for the selected product, stored in the campaign’s own currency or capacity unit.

    integerValidation: >0.
    image_urlOptional

    URL of the resource’s supplied image; use authorized public media.

    string|nullValidation: URL.
    banner_urlOptional

    Campaign cover artwork URL supplied by the organizer.

    string|nullValidation: URL.
    categoryOptional

    Configured campaign category or approved settings category, depending on the resource.

    string|nullValidation: <=120.
    locationOptional

    Public campaign location or discovery location filter; separate from the financial selling country.

    string|nullValidation: <=255.
    event_dateOptional

    Scheduled event date/time, distinct from the campaign selling period.

    string|nullValidation: ISO datetime.
    verification_requiredOptional

    Controls the supported verification requirement for the resource; it does not bypass server eligibility checks.

    booleanValidation: default true.
    metadataOptional

    Additional JSON metadata accepted by the documented schema; it never overrides authorization, prices or account ownership.

    objectValidation: JSON object.

    Request

    Examples describe the contract and are not executed. Use authorized test records; never paste a real secret into these pages.

    PATCH /api/white-label/v1/campaigns/:campaignId
    http
    PATCH /api/white-label/v1/campaigns/11111111-1111-4111-8111-111111111111 HTTP/1.1
    Host: api.sparkglim.net
    x-white-label-domain: events.example.com
    x-white-label-key-id: <ISSUED_KEY_ID>
    x-white-label-signature-version: 2
    x-white-label-timestamp: <FRESH_MILLISECONDS>
    x-white-label-nonce: <FRESH_SIGNING_NONCE>
    x-white-label-signature: <SERVER_GENERATED_SIGNATURE>
    Content-Type: application/json
    
    {
      "title": "Updated example campaign"
    }

    Response

    Success response · HTTP 200
    json
    {
      "success": true,
      "data": {
        "id": "11111111-1111-4111-8111-111111111111",
        "status": "pending"
      },
      "requestId": "wlapi_example"
    }
    Error response · HTTP 400
    json
    {
      "success": false,
      "error": "<ERROR_MESSAGE>",
      "requestId": "wlapi_example"
    }

    Validation, permissions, unavailable records and temporary service failures use the handler’s HTTP status and error payload.

    Limits & retries

    Organization limiter: 120 requests per key and 300 per IP per window; honor Retry-After and X-RateLimit headers.

    Source compatibility

    Authorized operations require account-specific testing.

    • server/src/api/router.ts
    • server/src/api/routes/white-label.ts
    • server/src/white-label/auth.ts
    • server/src/white-label/schemas.ts
    • server/src/white-label/organization-service.ts
    • server/src/white-label/service.ts