Omnix

BrandingKitRpc

This RPC group provides CRUD operations for branding kits within the current subscription, along with a helper endpoint for obtaining a secure logo upload key. It also exposes billing metadata on create and delete operations, which is part of the endpoint contract.

Endpoints

POST /api/rpc (Method: BrandingKitRpc.getLogoUploadKey)

  • Description: Gets a secure upload key for a branding kit logo.

  • Request Body:

    {
      "method": "BrandingKitRpc.getLogoUploadKey",
      "params": {}
    }
  • Parameters:

    Name Type Required Description
  • Response:

    {
      "success": true,
      "data": {
        "...": "Response shape is provided by `UploadDownloadService.getUploadKey(...)` and is not defined in this file."
      }
    }
  • Example (cURL):

    curl -X POST "${APP_BASE_URL}/api/rpc" \
      -H "Content-Type: application/json" \
      -d '{
        "method": "BrandingKitRpc.getLogoUploadKey",
        "params": {}
      }'

POST /api/rpc (Method: BrandingKitRpc.getData)

  • Description: Lists branding kits for the current subscription.

  • Request Body:

    {
      "method": "BrandingKitRpc.getData",
      "params": {
        "filter": {},
        "sort": {},
        "page": 1,
        "pageSize": 20
      }
    }
  • Parameters:

    Name Type Required Description
    filter Any No Optional filter object. The schema accepts any value and does not define field-level constraints in this file.
    sort Any No Optional sort object. The schema accepts any value and does not define sort-field constraints in this file.
    page Number No Optional page number.
    pageSize Number No Optional page size.
  • Response:

    {
      "success": true,
      "data": {
        "...": "Response shape is returned by `BrandingKitService.getBrandingKits(...)` and is not defined in this file."
      }
    }
  • Example (cURL):

    curl -X POST "${APP_BASE_URL}/api/rpc" \
      -H "Content-Type: application/json" \
      -d '{
        "method": "BrandingKitRpc.getData",
        "params": {
          "filter": {},
          "sort": {},
          "page": 1,
          "pageSize": 20
        }
      }'

POST /api/rpc (Method: BrandingKitRpc.create)

  • Description: Creates a new branding kit.

  • Request Body:

    {
      "method": "BrandingKitRpc.create",
      "params": {
        "subscriptionId": "000000000000000000000000",
        "name": "Acme",
        "isDefault": false,
        "brandNameShort": "Acme",
        "brandNameLong": "Acme Corporation",
        "logoText": "Acme",
        "logoIconClass": "bi-star",
        "logoImageUrl": "/files/public/branding_assets/...",
        "faviconUrl": "/files/public/branding_assets/...",
        "address": "123 Main St",
        "phone": "555-0100",
        "email": "[email protected]",
        "website": "https://example.com",
        "socials": {
          "twitter": "https://x.com/acme",
          "facebook": null,
          "linkedin": null,
          "instagram": null,
          "youtube": null
        },
        "primaryColor": "#0d6efd",
        "secondaryColor": "#6c757d",
        "accentColor": "#ffc107",
        "backgroundColor": "#f8f9fa",
        "textColor": "#212529",
        "footerText": "© {{currentYear}} {{brandNameLong}}. All rights reserved.",
        "unsubscribeText": "Unsubscribe from our mailing list."
      }
    }
  • Parameters:

    Name Type Required Description
    subscriptionId String Yes The subscription this kit belongs to.
    name String Yes Branding kit name. Must be at least 1 character.
    isDefault Boolean No Whether this is the default kit for the subscription. Defaults to false.
    brandNameShort String No Optional short brand name.
    brandNameLong String No Optional long brand name.
    logoText String No Optional text used with the logo.
    logoIconClass String No Optional icon class used for the logo.
    logoImageUrl String No Relative path to the uploaded logo image.
    faviconUrl String No Relative path to the uploaded favicon.
    address String No Optional address.
    phone String No Optional phone number.
    email String No Optional email address.
    website String No Optional website URL. Empty strings are normalized to null before validation.
    socials Object No Optional social links object with twitter, facebook, linkedin, instagram, and youtube. Each entry accepts a URL, null, or an omitted value.
    primaryColor String No Optional primary color. Defaults to #0d6efd.
    secondaryColor String No Optional secondary color. Defaults to #6c757d.
    accentColor String No Optional accent color. Defaults to #ffc107.
    backgroundColor String No Optional background color. Defaults to #f8f9fa.
    textColor String No Optional text color. Defaults to #212529.
    footerText String No Optional footer text. Defaults to © {{currentYear}} {{brandNameLong}}. All rights reserved.
    unsubscribeText String No Optional unsubscribe text. Defaults to Unsubscribe from our mailing list.
  • Response:

    {
      "success": true,
      "data": {
        "...": "Created branding kit data is returned by `BrandingKitService.createBrandingKit(...)` and is not defined in this file."
      }
    }
  • Example (cURL):

    curl -X POST "${APP_BASE_URL}/api/rpc" \
      -H "Content-Type: application/json" \
      -d '{
        "method": "BrandingKitRpc.create",
        "params": {
          "subscriptionId": "000000000000000000000000",
          "name": "Acme"
        }
      }'

POST /api/rpc (Method: BrandingKitRpc.update)

  • Description: Updates an existing branding kit.

  • Request Body:

    {
      "method": "BrandingKitRpc.update",
      "params": {
        "_id": "64f0c0a0c0a0c0a0c0a0c0a0",
        "name": "Acme Updated",
        "isDefault": true
      }
    }
  • Parameters:

    Name Type Required Description
    _id String Yes Identifier of the branding kit to update.
    subscriptionId String No The subscription this kit belongs to.
    name String No Branding kit name.
    isDefault Boolean No Whether this is the default kit for the subscription.
    brandNameShort String No Optional short brand name.
    brandNameLong String No Optional long brand name.
    logoText String No Optional text used with the logo.
    logoIconClass String No Optional icon class used for the logo.
    logoImageUrl String No Relative path to the uploaded logo image.
    faviconUrl String No Relative path to the uploaded favicon.
    address String No Optional address.
    phone String No Optional phone number.
    email String No Optional email address.
    website String No Optional website URL. Empty strings are normalized to null before validation.
    socials Object No Optional social links object.
    primaryColor String No Optional primary color.
    secondaryColor String No Optional secondary color.
    accentColor String No Optional accent color.
    backgroundColor String No Optional background color.
    textColor String No Optional text color.
    footerText String No Optional footer text.
    unsubscribeText String No Optional unsubscribe text.
    createdAt Date No Creation timestamp, accepted by the schema but typically not supplied by clients.
    updatedAt Date No Last update timestamp, accepted by the schema but typically not supplied by clients.
  • Response:

    {
      "success": true,
      "data": {
        "...": "Updated branding kit data is returned by `BrandingKitService.updateBrandingKit(...)` and is not defined in this file."
      }
    }
  • Example (cURL):

    curl -X POST "${APP_BASE_URL}/api/rpc" \
      -H "Content-Type: application/json" \
      -d '{
        "method": "BrandingKitRpc.update",
        "params": {
          "_id": "64f0c0a0c0a0c0a0c0a0c0a0",
          "name": "Acme Updated"
        }
      }'

POST /api/rpc (Method: BrandingKitRpc.delete)