> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reelevant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or replace the branch category settings for the current company



## OpenAPI

````yaml https://openapi.production.reelevant.io/v1/render/workflow-api put /workflows/settings/branch-category
openapi: 3.0.0
info:
  title: workflow-api
  version: 0.0.0
  description: |-
    # Errors
    | Error code | Message | HTTP status code | Payload |
    | :--- | :--- | :--- | :--- |
    | number | string | 404 |  |
servers:
  - url: https://api.reelevant.com/v2/
    description: production
security: []
paths:
  /workflows/settings/branch-category:
    put:
      tags:
        - WorkflowSettings
      summary: Create or replace the branch category settings for the current company
      operationId: upsert-workflow-branch-category-settings
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/BranchCategoryTree'
                - $ref: >-
                    #/components/schemas/SerializedWorkflowBranchCategorySettings_With_ResourceGroupIds
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - success
                    required:
                      - status
                    additionalProperties: false
                  - $ref: >-
                      #/components/schemas/InternalResponse_SerializedWorkflowBranchCategorySettings
        '400':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/InternalResponse_'
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - fail
                      error_code:
                        type: number
                      code:
                        type: number
                      message:
                        type: string
                      data:
                        oneOf:
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              errors:
                                type: array
                                items:
                                  oneOf:
                                    - $ref: '#/components/schemas/Error'
                                    - $ref: '#/components/schemas/Error'
                            required:
                              - errors
                            additionalProperties: false
                          - $ref: >-
                              #/components/schemas/MissingContentDependencyErrorPayload
                          - type: object
                            properties:
                              alias:
                                type: string
                            required:
                              - alias
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                              index:
                                type: number
                            required:
                              - id
                              - index
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                              entrypointId:
                                type: string
                            required:
                              - id
                              - entrypointId
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              companyId:
                                type: string
                            required:
                              - companyId
                            additionalProperties: false
                          - type: object
                            properties:
                              maxDepth:
                                type: number
                              actualDepth:
                                type: number
                            required:
                              - maxDepth
                              - actualDepth
                            additionalProperties: false
                          - type: object
                            properties:
                              reason:
                                type: string
                            required:
                              - reason
                            additionalProperties: false
                          - type: object
                            properties:
                              companyId:
                                type: string
                            required:
                              - companyId
                            additionalProperties: false
                          - type: object
                            properties:
                              templateIds:
                                type: array
                                items:
                                  type: string
                            required:
                              - templateIds
                            additionalProperties: false
                          - type: object
                            properties:
                              templateId:
                                type: string
                            required:
                              - templateId
                            additionalProperties: false
                          - type: object
                            properties:
                              tagKeyId:
                                type: string
                            required:
                              - tagKeyId
                            additionalProperties: false
                          - type: object
                            properties:
                              tagKeyId:
                                type: string
                              tagValueId:
                                type: string
                            required:
                              - tagKeyId
                              - tagValueId
                            additionalProperties: false
                          - type: object
                            properties:
                              branchId:
                                type: string
                              tagKeyId:
                                type: string
                            required:
                              - branchId
                              - tagKeyId
                            additionalProperties: false
                          - type: object
                            properties:
                              tagKeyId:
                                type: string
                            required:
                              - tagKeyId
                            additionalProperties: false
                    required:
                      - status
                      - error_code
                      - code
                      - message
                    additionalProperties: false
      security:
        - password_auth: []
components:
  schemas:
    BranchCategoryTree:
      type: object
      properties:
        rootOrder:
          type: array
          items:
            type: string
        categories:
          type: object
          properties: {}
          additionalProperties:
            $ref: '#/components/schemas/BranchCategory'
      required:
        - rootOrder
        - categories
      additionalProperties: false
    SerializedWorkflowBranchCategorySettings_With_ResourceGroupIds:
      type: object
      properties:
        resourceGroupIds:
          type: array
          items:
            type: string
      required:
        - resourceGroupIds
      additionalProperties: false
    InternalResponse_SerializedWorkflowBranchCategorySettings:
      type: object
      properties:
        program:
          type: string
        version:
          type: string
        datetime:
          type: string
        status:
          type: string
        code:
          type: number
        message:
          type: string
        data:
          $ref: '#/components/schemas/SerializedWorkflowBranchCategorySettings'
      required:
        - program
        - version
        - datetime
        - status
        - message
        - data
      additionalProperties: false
    InternalResponse_:
      type: object
      properties:
        program:
          type: string
        version:
          type: string
        datetime:
          type: string
        status:
          type: string
        code:
          type: number
        message:
          type: string
        data:
          type: object
          properties: {}
          additionalProperties: false
      required:
        - program
        - version
        - datetime
        - status
        - message
        - data
      additionalProperties: false
    Error:
      type: object
      properties:
        path:
          type: string
        message:
          type: string
        payload:
          type: object
          properties: {}
          additionalProperties:
            $ref: '#/components/schemas/AnyValue'
      required:
        - path
        - message
      additionalProperties: false
    MissingContentDependencyErrorPayload:
      type: object
      properties:
        workflows:
          type: array
          items:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    errors:
                      type: array
                      items:
                        oneOf:
                          - allOf:
                              - type: object
                                properties:
                                  dependencyId:
                                    type: string
                                required:
                                  - dependencyId
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - datasource
                                  id:
                                    type: string
                                  group:
                                    type: object
                                    properties:
                                      by:
                                        type: string
                                      mode:
                                        oneOf:
                                          - type: string
                                            enum:
                                              - aggregated
                                          - type: string
                                            enum:
                                              - onePerValue
                                          - type: string
                                            enum:
                                              - topValueOnly
                                          - type: string
                                            enum:
                                              - oneValueOnly
                                    required:
                                      - by
                                      - mode
                                    additionalProperties: false
                                required:
                                  - type
                                  - id
                                additionalProperties: false
                          - allOf:
                              - type: object
                                properties:
                                  dependencyId:
                                    type: string
                                required:
                                  - dependencyId
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - url-parameter
                                  name:
                                    type: string
                                  subtype:
                                    type: string
                                required:
                                  - type
                                  - name
                                  - subtype
                                additionalProperties: false
                          - allOf:
                              - type: object
                                properties:
                                  dependencyId:
                                    type: string
                                required:
                                  - dependencyId
                                additionalProperties: false
                              - type: object
                                properties:
                                  type:
                                    oneOf:
                                      - type: string
                                        enum:
                                          - weather
                                      - type: string
                                        enum:
                                          - context
                                      - type: string
                                        enum:
                                          - geolocation
                                      - type: string
                                        enum:
                                          - live-polling
                                required:
                                  - type
                                additionalProperties: false
                    contentId:
                      type: string
                    contentIndex:
                      type: number
                  required:
                    - errors
                    - contentId
                    - contentIndex
                  additionalProperties: false
              id:
                type: string
              nodeId:
                type: string
            required:
              - errors
              - id
              - nodeId
            additionalProperties: false
      required:
        - workflows
      additionalProperties: false
    BranchCategory:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        children:
          type: array
          items:
            type: string
      required:
        - name
        - children
      additionalProperties: false
    SerializedWorkflowBranchCategorySettings:
      allOf:
        - $ref: '#/components/schemas/SerializedWorkflowSettings'
        - $ref: '#/components/schemas/BranchCategoryTree'
    AnyValue:
      description: Can be any value
      nullable: true
    SerializedWorkflowSettings:
      allOf:
        - $ref: >-
            #/components/schemas/WorkflowSettingsDocument_Without_CompanyId_ResourceGroupIds
        - type: object
          properties:
            id:
              type: string
            companyId:
              type: string
            resourceGroupIds:
              type: array
              items:
                type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
          required:
            - id
            - companyId
            - resourceGroupIds
            - createdAt
            - updatedAt
    WorkflowSettingsDocument_Without_CompanyId_ResourceGroupIds:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        id:
          type: string
        type:
          $ref: '#/components/schemas/WorkflowSettingsType'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - _id
        - id
        - type
      additionalProperties: false
    ObjectId:
      type: string
    WorkflowSettingsType:
      type: string
      enum:
        - WorkflowBranchCategories
        - WorkflowVariableProfiles
        - WorkflowJsonTemplates
  securitySchemes:
    password_auth:
      type: oauth2
      flows:
        password:
          tokenUrl: https://api.reelevant.com/v1/auth/token
          refreshUrl: https://api.reelevant.com/v1/auth/token
          scopes: {}

````