Navigation
VigilbaseDocs

    Type at least two letters.

    Open Vigilbase One

    Update partner settings

    PATCH /api/partners/settings on the Vigilbase One API.

    PATCH/api/partners/settings

    Authorizations

    Send one of these:

    AuthorizationstringAccess tokenheaderrequired

    Bearer access token from Vigilbase Identity (auth.vigilbase.com), sent as Authorization: Bearer <token>. The CLI gets one with vigilbase login.

    AuthorizationstringAPI keyheaderrequired

    Organisation API key (vb_one_…) from Settings → API keys in Vigilbase One, sent as Authorization: Bearer vb_one_…. Needs a key with write access: read-only keys get 403 with the code read_only_key. See organisation API keys.

    Permissions checkedadmin:fullread:partner_customerswrite:organizationswrite:partner_services

    Query Parameters

    impersonate_customer_idstring

    Body

    application/json

    The catalog has no JSON Schema for this body. One validates it with the schema below.

    Validation schema
    PartnerSettingsSchema = z.object({
      reportRecipientEmails: z
        .array(z.string().email())
        .max(20, 'At most 20 report recipients are allowed')
        .transform((emails) => Array.from(new Set(emails.map((email) => email.trim().toLowerCase()))))
        .optional(),
      supportEmail: PartnerSupportEmailSchema.optional(),
      /** Emergency line on branded datasheets; blank or null clears it (Vigilbase's line). */
      emergencyContact: PartnerEmergencyContactSchema.optional(),
      brandColor: z
        .string()
        .trim()
        .regex(/^#[0-9a-fA-F]{6}$/u, 'Enter the brand colour as a hex value like #1a73e8')
        .transform((color) => color.toLowerCase())
        .optional(),
      /** Go back to the website brand for these parts. The logo resets only once no uploaded logo is current (DELETE /api/partners/logo first). */
      resetToWebsite: z.array(z.enum(['color', 'logo'])).min(1).max(2).optional(),
    }).refine(
      (body) => body.reportRecipientEmails !== undefined || body.supportEmail !== undefined ||
        body.emergencyContact !== undefined || body.brandColor !== undefined || body.resetToWebsite !== undefined,
      'Provide reportRecipientEmails, supportEmail, emergencyContact, brandColor or resetToWebsite',
    ).refine(
      (body) => !(body.brandColor !== undefined && body.resetToWebsite?.includes('color')),
      'Set a brand colour or reset it to the website colour, not both',
    )

    Response

    Success

    Was this page helpful?