WatchGuard Accounts API

Manage WatchGuard Cloud accounts and sub-accounts.

OpenAPI Specification

watchguard-accounts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: WatchGuard Cloud Platform Accounts API
  description: The WatchGuard Cloud Platform API provides RESTful access to WatchGuard Cloud account management, including account creation and management, authorization for managed accounts, device and license activations, asset allocations, and operator management. All endpoints require an OAuth 2.0 bearer token and a WatchGuard-API-Key header.
  version: v1
  contact:
    name: WatchGuard Support
    url: https://www.watchguard.com/help/docs/API/
servers:
- url: https://api.usa.cloud.watchguard.com/rest
  description: USA Region
- url: https://api.eu.cloud.watchguard.com/rest
  description: EU Region
- url: https://api.apac.cloud.watchguard.com/rest
  description: APAC Region
tags:
- name: Accounts
  description: Manage WatchGuard Cloud accounts and sub-accounts.
paths:
  /platform/accounts/v1/accounts/{accountId}:
    get:
      operationId: getAccount
      summary: Get Account Information
      description: Retrieve information about a WatchGuard Cloud account including contacts, addresses, parent account, and service properties.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: fields
        in: query
        description: Specify additional fields to include in the response.
        schema:
          type: array
          items:
            type: string
            enum:
            - contacts
            - parent
            - addresses
            - serviceProperties
            - delegatedParent
      security:
      - bearerAuth: []
        apiKeyAuth: []
      responses:
        '200':
          description: Account information retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: createAccount
      summary: Create Account
      description: Create a new WatchGuard Cloud managed account (service provider or subscriber).
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/AccountId'
      security:
      - bearerAuth: []
        apiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountRequest'
      responses:
        '200':
          description: Account created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    patch:
      operationId: updateAccount
      summary: Update Account
      description: Update the name and primary contact details of a managed account.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/AccountId'
      security:
      - bearerAuth: []
        apiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountRequest'
      responses:
        '204':
          description: Account updated successfully.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: deleteAccount
      summary: Delete Account
      description: Delete a managed WatchGuard Cloud account and optionally all its sub-accounts.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: force
        in: query
        description: If true, delete the account and all managed sub-accounts.
        schema:
          type: boolean
          default: false
      security:
      - bearerAuth: []
        apiKeyAuth: []
      responses:
        '200':
          description: Account deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteAccountResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /platform/accounts/v1/accounts/{accountId}/children:
    get:
      operationId: getManagedAccounts
      summary: Get Managed Accounts
      description: Retrieve a paginated list of accounts managed by the specified account.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - name: type
        in: query
        description: Filter by account type (0=All, 1=Service Provider, 2=Subscriber).
        schema:
          type: integer
          enum:
          - 0
          - 1
          - 2
      - name: sortBy
        in: query
        schema:
          type: string
          enum:
          - name
          - type
      - name: sortOrder
        in: query
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
      - name: name
        in: query
        description: Filter accounts by name.
        schema:
          type: string
      - name: includeDelegatedAccounts
        in: query
        schema:
          type: boolean
          default: false
      security:
      - bearerAuth: []
        apiKeyAuth: []
      responses:
        '200':
          description: List of managed accounts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAccountList'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ManagedAccountList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ManagedAccount'
        pageControls:
          $ref: '#/components/schemas/PageControls'
    DeleteAccountResponse:
      type: object
      properties:
        childIds:
          type: array
          items:
            type: string
          description: IDs of deleted child accounts.
    PageControls:
      type: object
      properties:
        limit:
          type: integer
        offset:
          type: integer
        totalItems:
          type: integer
    CreateAccountResponse:
      type: object
      properties:
        accountID:
          type: string
          description: Newly created account ID.
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        details:
          type: string
    ManagedAccount:
      type: object
      properties:
        accountId:
          type: string
        name:
          type: string
        type:
          type: integer
        parentAccess:
          type: string
        totalOperators:
          type: integer
    AccountInfo:
      type: object
      description: WatchGuard Cloud account information.
      properties:
        accountId:
          type: string
        name:
          type: string
        status:
          type: string
        type:
          type: integer
          description: 1=Service Provider, 2=Subscriber
        contacts:
          type: object
          properties:
            primaryContactId:
              type: string
            firstName:
              type: string
            lastName:
              type: string
            email:
              type: string
            phone:
              type: string
        addresses:
          type: object
        parent:
          type: object
          properties:
            id:
              type: string
            access:
              type: string
        serviceProperties:
          type: object
    UpdateAccountRequest:
      type: object
      required:
      - name
      - firstName
      - lastName
      - email
      properties:
        name:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
          format: email
    CreateAccountRequest:
      type: object
      required:
      - type
      - name
      - firstName
      - lastName
      - email
      properties:
        type:
          type: integer
          enum:
          - 1
          - 2
          description: 1=Service Provider, 2=Subscriber
        name:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
          format: email
  responses:
    BadRequest:
      description: Bad request — validation error in request body or parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized — invalid or expired access token or API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  parameters:
    AccountId:
      name: accountId
      in: path
      required: true
      description: WatchGuard Cloud account ID (e.g., WGC-1-123abc456 or ACC-1234567).
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 access token obtained from the WatchGuard Authentication API.
    apiKeyAuth:
      type: apiKey
      in: header
      name: WatchGuard-API-Key
      description: API key from the WatchGuard Cloud Managed Access page.