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

# Update Rule Settings

> Switch Rules & Actions on or off for this workspace, and whether its email rules may send from Upsolve's address while the organization has no verified sending domain. Switching on is refused for an organization that can never have rules. Returns the settings as they now stand



## OpenAPI

````yaml put /v2/api/projects/{projectId}/workspaces/{workspaceId}/rule-settings
openapi: 3.1.0
info:
  title: Upsolve API
  version: 1.5.0
servers:
  - url: https://api.upsolve.ai
security: []
tags: []
paths:
  /v2/api/projects/{projectId}/workspaces/{workspaceId}/rule-settings:
    put:
      summary: Switch Rules & Actions on or off for this workspa…
      description: >-
        Switch Rules & Actions on or off for this workspace, and whether its
        email rules may send from Upsolve's address while the organization has
        no verified sending domain. Switching on is refused for an organization
        that can never have rules. Returns the settings as they now stand
      operationId: PutV2ApiProjectsProjectIdWorkspacesWorkspaceIdRuleSettings
      parameters:
        - name: projectId
          in: path
          required: true
          description: The project the workspace belongs to.
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
            description: The project the workspace belongs to.
        - name: workspaceId
          in: path
          required: true
          description: The workspace to read or change.
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
            description: The workspace to read or change.
      requestBody:
        description: >-
          PUT /v2/api/projects/:projectId/workspaces/:workspaceId/rule-settings
          Request body
        content:
          application/json:
            schema:
              type: object
              properties:
                apiKey:
                  type: string
                  minLength: 1
                  description: >-
                    Upsolve API key, generated under Account → Developer
                    settings in the Upsolve Hub. Keys are user-scoped: pass
                    organizationId alongside the key to select which org to act
                    on.
                  examples:
                    - up_embed_************
                organizationId:
                  description: >-
                    Your Upsolve organization's UUID — the org that owns the API
                    key and project. This is NOT a project organization: do not
                    pass a value registered via /projects/register-organization,
                    and do not pass an `externalId` (only
                    `projectOrganizationId` accepts those). Omit it when using
                    an org-bound API key — the org is read from the key and any
                    value sent here is ignored. Required only for user-scoped
                    API keys (created under Account → Developer settings) and
                    for the Supabase JWT path, where the org is ambiguous and
                    membership is verified against it.
                  examples:
                    - 123e4567-e89b-12d3-a456-426614174000
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                enabled:
                  description: >-
                    Switch Rules & Actions on or off for this workspace. On by
                    default. Switching on is refused for an organization that
                    can never have rules. Unchanged when omitted.
                  type: boolean
                emailFallbackSender:
                  description: >-
                    Let this workspace's email rules send from Upsolve's own
                    address while the organization has no verified sending
                    domain. Off by default; the organization's own domain always
                    wins. Unchanged when omitted.
                  type: boolean
              required: []
            examples:
              example1:
                value:
                  apiKey: up_embed_************
                  organizationId: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: >-
            PUT
            /v2/api/projects/:projectId/workspaces/:workspaceId/rule-settings
            Positive response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    type: object
                    properties:
                      available:
                        type: boolean
                        description: >-
                          Whether the caller may use rules in this workspace
                          right now.
                      reason:
                        type:
                          - string
                          - 'null'
                        enum:
                          - not_cloud
                          - confidential_org
                          - workspace_disabled
                          - null
                        description: >-
                          Why rules are unavailable: not_cloud (Upsolve Local
                          and on-prem have no rules in v0), confidential_org
                          (rules send this organization's data, and it may not
                          leave) or workspace_disabled (a builder has switched
                          rules off for this workspace).
                      enabled:
                        type: boolean
                        description: >-
                          Whether rules are on for this workspace: true unless a
                          builder has switched them off. Rules still need the
                          rest of `available` to hold.
                      emailFallbackSender:
                        type: boolean
                        description: >-
                          Whether this workspace's email rules may send from
                          Upsolve's address while the organization has no
                          verified sending domain.
                      emailSender:
                        type:
                          - object
                          - 'null'
                        properties:
                          from:
                            type: string
                            description: 'Who rule emails are from: "Name <address>".'
                          source:
                            type: string
                            enum:
                              - organization
                              - upsolve
                            description: >-
                              'organization' the organization's verified sending
                              domain, 'upsolve' Upsolve's own address (the
                              fallback this workspace allows).
                        required:
                          - from
                          - source
                        additionalProperties: false
                        description: The sender this workspace's email rules use right now.
                    required:
                      - available
                      - reason
                      - enabled
                      - emailFallbackSender
                      - emailSender
                    additionalProperties: false
                required:
                  - status
                  - data
                additionalProperties: false
        '400':
          description: >-
            PUT
            /v2/api/projects/:projectId/workspaces/:workspaceId/rule-settings
            Negative response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: error
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      details:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                    required:
                      - message
                    additionalProperties: false
                required:
                  - status
                  - error
                additionalProperties: false
      security:
        - APIKEY_1: []
components:
  securitySchemes:
    APIKEY_1:
      type: apiKey
      in: query
      name: apiKey
      x-in-actual: body
      description: apiKey MUST be supplied within the request body instead of query

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.