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

# Save Draft

> Saves an immutable draft using expected_version. The published version stays live. A stale version returns 409.



## OpenAPI

````yaml /api-reference/openapi.json put /v1/builder/signal-sets/{identifier}/draft
openapi: 3.1.0
info:
  description: >-
    Selected current-source customer operations under preview. Access and
    integrations require workspace enablement; this is not a
    general-availability, onboarding or external-client registration promise.
    Request and query models come from code; many success responses have no
    response model and are intentionally untyped.
  title: Gather customer API — preview
  version: 0.1.0-preview
servers:
  - url: https://workspace.example.com
security: []
tags:
  - name: Governed data
  - name: HubSpot
  - name: Reviewed workflows
  - name: Rules and previews
  - name: Website preview
  - name: Workspace and observations
paths:
  /v1/builder/signal-sets/{identifier}/draft:
    put:
      tags:
        - Rules and previews
      summary: Save Draft
      description: >-
        Saves an immutable draft using expected_version. The published version
        stays live. A stale version returns 409.
      operationId: customer_put_v1_builder_signal_sets_identifier_draft
      parameters:
        - in: path
          name: identifier
          required: true
          schema:
            format: uuid
            title: Identifier
            type: string
        - description: >-
            Required for browser-session mutations. Origin must exactly match
            the workspace; read the CSRF token from GET /v1/me using the browser
            session. A bearer-authenticated /v1/me response has csrf_token=null.
            Not required for bearer-token-only requests.
          in: header
          name: Origin
          required: false
          schema:
            type: string
        - description: >-
            Required for browser-session mutations. Origin must exactly match
            the workspace; read the CSRF token from GET /v1/me using the browser
            session. A bearer-authenticated /v1/me response has csrf_token=null.
            Not required for bearer-token-only requests.
          in: header
          name: X-CSRF-Token
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Draft'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '401':
          description: Missing, expired or invalid workspace authentication.
        '403':
          description: >-
            Missing permission, browser-session requirement or CSRF validation
            failure.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '423':
          description: Workspace lifecycle currently denies activity.
        '503':
          description: Workspace control or required dependency unavailable.
      security:
        - TenantBearer: []
        - TenantSession: []
components:
  schemas:
    Draft:
      additionalProperties: false
      properties:
        definition:
          $ref: '#/components/schemas/Definition'
        expected_version:
          minimum: 1
          title: Expected Version
          type: integer
      required:
        - expected_version
        - definition
      title: Draft
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    Definition:
      additionalProperties: false
      properties:
        contributions:
          items:
            $ref: '#/components/schemas/Contribution'
          maxItems: 20
          title: Contributions
          type: array
        fit_conditions:
          items:
            $ref: '#/components/schemas/FitCondition'
          maxItems: 10
          title: Fit Conditions
          type: array
        fit_points:
          default: 100
          maximum: 10000
          minimum: 1
          title: Fit Points
          type: integer
        mode:
          default: events
          enum:
            - events
            - company_fit
          title: Mode
          type: string
        name:
          maxLength: 100
          minLength: 1
          title: Name
          type: string
        threshold:
          default: 100
          maximum: 1000000
          minimum: 1
          title: Threshold
          type: integer
        website_site_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Website Site Id
        window_days:
          default: 7
          maximum: 365
          minimum: 1
          title: Window Days
          type: integer
      required:
        - name
      title: Definition
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    Contribution:
      additionalProperties: false
      properties:
        event_type:
          pattern: ^[a-z][a-z0-9_]{0,63}$
          title: Event Type
          type: string
        max_count:
          default: 1
          maximum: 100
          minimum: 1
          title: Max Count
          type: integer
        points:
          maximum: 10000
          minimum: 1
          title: Points
          type: integer
        use_saved_website_points:
          default: false
          title: Use Saved Website Points
          type: boolean
      required:
        - event_type
        - points
      title: Contribution
      type: object
    FitCondition:
      additionalProperties: false
      properties:
        operator:
          enum:
            - present
            - equals
            - gte
            - lte
          title: Operator
          type: string
        property:
          enum:
            - domain
            - industry
            - numberofemployees
            - aantal_medewerkers
          title: Property
          type: string
        value:
          default: ''
          maxLength: 200
          title: Value
          type: string
      required:
        - property
        - operator
      title: FitCondition
      type: object
  securitySchemes:
    TenantBearer:
      bearerFormat: JWT
      description: >-
        Organization-bound Auth0 API access token. Required permissions are
        listed per operation; this does not offer API-key or client-registration
        issuance.
      scheme: bearer
      type: http
    TenantSession:
      description: >-
        Production host-only browser session. Read csrf_token from GET /v1/me
        using this session; bearer authentication returns a null CSRF token and
        takes precedence over cookies. Session mutations require exact Origin
        and X-CSRF-Token. Development uses signal_session.
      in: cookie
      name: __Host-signal_session
      type: apiKey

````

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