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

# Change the Jira config

> Changes the settings you send; the others stay. The save runs the app's checks (a refusal is a 422 with their text) and locks each mapped field. A project that gets its first active rule, or a task project with no Statisfy project yet, starts a 30-day first sync: `sync` says which started and which did not. Turning sync_issue_link on creates the 'JIRA Link' task field. A 409 means the config changed since you read it (or `expected_version` is not the live one): read it again.



## OpenAPI

````yaml /api/statisfy-api.openapi.json patch /v1/integrations/jira/config
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/integrations/jira/config:
    patch:
      tags:
        - integrations
      summary: Change the Jira config
      description: >-
        Changes the settings you send; the others stay. The save runs the app's
        checks (a refusal is a 422 with their text) and locks each mapped field.
        A project that gets its first active rule, or a task project with no
        Statisfy project yet, starts a 30-day first sync: `sync` says which
        started and which did not. Turning sync_issue_link on creates the 'JIRA
        Link' task field. A 409 means the config changed since you read it (or
        `expected_version` is not the live one): read it again.
      operationId: integrations_jira_update_config
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              description: >-
                Only the settings you send change; the rest stay. null puts a
                setting back to its default.
              properties:
                expected_version:
                  anyOf:
                    - description: >-
                        The config `version` you read. Sent: a change against a
                        version that is no longer live is a 409 and writes
                        nothing (0 = the config was never saved). Left out, the
                        version this call reads is used, so a change saved
                        between that read and this write is still a 409: read
                        again and retry
                      minimum: 0
                      type: integer
                    - type: 'null'
                  default: null
                  title: Expected Version
                field_whitelist:
                  anyOf:
                    - $ref: '#/components/schemas/FieldWhitelist'
                    - type: 'null'
                  default: null
                  description: Default field mappings
                project_keys:
                  anyOf:
                    - items:
                        pattern: ^[A-Z][A-Z0-9]{1,49}$
                        type: string
                      type: array
                    - type: 'null'
                  default: null
                  description: The projects to sync, from /projects
                  title: Project Keys
                project_rules:
                  anyOf:
                    - items:
                        $ref: '#/components/schemas/ProjectRule'
                      type: array
                    - type: 'null'
                  default: null
                  description: >-
                    At least one rule for each project in project_keys; see GET
                    /config for the shape
                  title: Project Rules
                site_base_url:
                  anyOf:
                    - maxLength: 2048
                      type: string
                    - type: 'null'
                  default: null
                  description: The Jira site for the links (see /site-url)
                  title: Site Base Url
                sync_issue_link:
                  anyOf:
                    - type: boolean
                    - type: 'null'
                  default: null
                  description: Write each issue's link onto its task
                  title: Sync Issue Link
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JiraConfig'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    FieldWhitelist:
      description: >-
        Which JIRA custom fields propagate to Statisfy account/task records.


        `*_field_mappings` are the structured form used by the self-serve
        wizard:

        each entry pairs a JIRA field with the Statisfy custom field key it
        writes

        to. `account_fields` / `task_fields` are kept for backward compatibility

        with legacy configs that only list JIRA field names; the wizard derives

        them from the mappings on save.
      properties:
        account_field_mappings:
          description: Structured mappings of JIRA field -> Statisfy account custom field.
          items:
            $ref: '#/components/schemas/FieldMapping'
          title: Account Field Mappings
          type: array
        account_fields:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: >-
            Legacy: JIRA field names whitelisted for account-level fields. None
            = none.
          title: Account Fields
        auto_include_new_fields:
          default: true
          description: >-
            Legacy flag retained for backward compatibility; the self-serve
            wizard does not expose it.
          title: Auto Include New Fields
          type: boolean
        task_field_mappings:
          description: Structured mappings of JIRA field -> Statisfy task custom field.
          items:
            $ref: '#/components/schemas/FieldMapping'
          title: Task Field Mappings
          type: array
        task_fields:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: >-
            Legacy: JIRA field names whitelisted for task-level fields. None =
            none.
          title: Task Fields
      title: FieldWhitelist
      type: object
    ProjectRule:
      description: |-
        One handling rule for issues in a JIRA project.

        A single project_key may have multiple rules; runtime picks the rule
        whose `issue_type_filter.include` matches the issue's type, falling
        back to the project's catch-all rule (the rule with no filter, at
        most one per project_key).

        `creates_task=False` puts the rule in projection mode: matching
        issues do not become Statisfy tasks, instead their account-level
        field mappings are projected onto the resolved account. This
        replaces the previous `AccountFieldProjectionConfig`.
      properties:
        creates_task:
          default: true
          description: >-
            When False, matching issues do not create a Statisfy task. Combined
            with `field_whitelist.account_field_mappings`, this puts the rule in
            account-projection mode (the Skyflow Epic pattern).
          title: Creates Task
          type: boolean
        customer_resolution:
          description: >-
            Resolver chain for this rule, tried in order; first non-None match
            wins. Equivalent to a CompositeResolver. Must contain at least one
            entry — Pydantic enforces this so an admin can't accidentally save a
            rule with no way to identify customers.
          items:
            $ref: '#/components/schemas/AccountResolverConfig'
          minItems: 1
          title: Customer Resolution
          type: array
        field_whitelist:
          anyOf:
            - $ref: '#/components/schemas/FieldWhitelist'
            - type: 'null'
          default: null
          description: Optional account/task field whitelist for this rule.
        id:
          description: >-
            Stable client-side id used by the wizard UI as a React key and to
            address rules unambiguously across reorders. Auto-assigned at parse
            time for legacy configs that don't carry one.
          title: Id
          type: string
        is_active:
          default: true
          description: When False, the project rule is registered but not synced.
          title: Is Active
          type: boolean
        issue_type_filter:
          anyOf:
            - $ref: '#/components/schemas/IssueTypeFilter'
            - type: 'null'
          default: null
        project_key:
          description: JIRA project key, e.g. 'CUST', 'SUP'
          title: Project Key
          type: string
        project_type:
          default: software
          description: >-
            Detected from JIRA's projectTypeKey at discovery time. Drives which
            ActivitySource backfill emits and which nebula provider runs at sync
            time. 'service_desk' projects are routed through the JIRA Service
            Desk provider; everything else goes through the JIRA provider.
            Defaults to 'software' for back-compat with configs saved before
            this field existed.
          enum:
            - software
            - service_desk
            - business
          title: Project Type
          type: string
        support_multiple_customers:
          default: false
          description: >-
            When True, a single JIRA issue may resolve to multiple customers
            (used when the source field on the issue is a multi-select / array).
            The provider fans out account writes / task associations across
            every resolved account. Currently honored only by the
            JiraFieldAccountResolver path.
          title: Support Multiple Customers
          type: boolean
      required:
        - project_key
        - customer_resolution
      title: ProjectRule
      type: object
    JiraConfig:
      description: >-
        Jira's settings, as saved. Each setting has the shape that PATCH /config
        takes.
      properties:
        field_whitelist:
          additionalProperties: true
          description: Default field mappings for every project
          title: Field Whitelist
          type: object
        project_keys:
          description: The Jira projects that sync
          items:
            type: string
          title: Project Keys
          type: array
        project_rules:
          description: >-
            Per project: its type, how an issue finds its account, issue-type
            filters and field mappings
          items:
            additionalProperties: true
            type: object
          title: Project Rules
          type: array
        site_base_url:
          anyOf:
            - type: string
            - type: 'null'
          description: The Jira site the issue links point to
          title: Site Base Url
        sync:
          anyOf:
            - $ref: '#/components/schemas/JiraFirstSyncs'
            - type: 'null'
          description: 'Set by a change: the first syncs it started'
        sync_issue_link:
          description: Write each issue's Jira link onto its task
          title: Sync Issue Link
          type: boolean
        version:
          description: >-
            The config's version: send it as `expected_version` with a change (0
            = never saved)
          title: Version
          type: integer
      required:
        - version
        - project_keys
        - field_whitelist
        - project_rules
        - sync_issue_link
        - site_base_url
      title: JiraConfig
      type: object
    FieldMapping:
      description: Pair a JIRA field with the Statisfy custom field it should write to.
      properties:
        jira_field:
          description: JIRA field id (e.g. 'customfield_10042') or display name.
          title: Jira Field
          type: string
        target_field_key:
          description: Statisfy custom field key the JIRA value writes to.
          title: Target Field Key
          type: string
      required:
        - jira_field
        - target_field_key
      title: FieldMapping
      type: object
    AccountResolverConfig:
      description: >-
        How to map record rows to internal Statisfy account IDs.


        Used by warehouse integrations (postgres/redshift/bigquery/snowflake)
        and

        JIRA. The schema is integration-agnostic; resolver types are dispatched
        by

        the integration's hydrator.
      properties:
        abbreviations:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          default: null
          description: >-
            Map of summary prefix abbreviation to canonical customer name
            (abbreviation_map)
          title: Abbreviations
        column:
          description: Source column in record containing the identifier
          title: Column
          type: string
        custom_field_key:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Custom field key for custom_field/custom_field_bulk resolver types
          title: Custom Field Key
        cutoff:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: >-
            Fuzzy matching cutoff for account_name / parent_epic_summary /
            jira_field (name target) / payload_field (name target) resolvers
            (0.0-1.0). Default 0.5; tenants that need stricter matching (e.g.
            Eightfold's 0.9) set explicitly.
          title: Cutoff
        exclude_keywords:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: >-
            Parent-epic summaries equal (after strip) to any of these strings
            are skipped (parent_epic_summary). Exact-match semantics — list the
            full summary text, not a substring.
          title: Exclude Keywords
        field_to_parse:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Record key to parse for the abbreviation prefix (abbreviation_map;
            default 'summary')
          title: Field To Parse
        match_mode:
          anyOf:
            - enum:
                - exact
                - similar
              type: string
            - type: 'null'
          default: null
          description: >-
            How account_name and the name target of payload_field /
            rocketlane_field / jira_field / linear_field compare names. 'exact'
            matches the whole name, ignoring case. It compares the stored name
            as is, so a stored name with an edge space does not match. 'similar'
            or unset uses the fuzzy match with `cutoff`.
          title: Match Mode
        type:
          enum:
            - statisfy_account_id
            - crm_account_id
            - organization_id
            - email_domain
            - custom_field
            - custom_field_bulk
            - account_name
            - parent_epic_summary
            - abbreviation_map
            - jira_field
            - rocketlane_field
            - linear_field
            - payload_field
            - contact_email
          title: Type
          type: string
        value_transform:
          anyOf:
            - $ref: '#/components/schemas/ValueTransformConfig'
            - type: 'null'
          default: null
          description: >-
            Optional pre-lookup transforms on the extracted value. Honored by
            the jira_field resolver to express Milestone- and SproutsAI-style
            value shaping (prefix stripping, sentinel skipping, first-token
            extraction).
      required:
        - type
        - column
      title: AccountResolverConfig
      type: object
    IssueTypeFilter:
      description: Per-rule issue-type allow/deny list. None on a list means no filter.
      properties:
        exclude:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: Blacklist of issue type names. Applied after include if both set.
          title: Exclude
        include:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: Whitelist of issue type names. If set, only these are processed.
          title: Include
      title: IssueTypeFilter
      type: object
    JiraFirstSyncs:
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          description: Why the not_started syncs did not start
          title: Message
        not_started:
          description: Project keys whose first sync was refused
          items:
            type: string
          title: Not Started
          type: array
        started:
          description: Project keys whose 30-day first sync started
          items:
            type: string
          title: Started
          type: array
      required:
        - started
        - not_started
        - message
      title: JiraFirstSyncs
      type: object
    ValueTransformConfig:
      description: >-
        Pre-lookup transforms applied to a raw field value before resolver
        matching.


        Captures shapes the legacy per-tenant providers expressed in code: skip

        sentinel values (Milestone's "Milestone" literal), strip prefixes

        (Milestone's "CUST-" prefix), split on a separator and take the first

        token (SproutsAI's `summary.split("|")[0]`, Milestone's space- or

        underscore-split). All fields are optional and applied left-to-right in

        the order listed below. If any step yields an empty string the resolver

        treats the field as missing.


        Currently honored by `JiraFieldAccountResolver`. Future resolvers can
        opt

        in by reading `value_transform` and applying `apply_value_transform()`.
      properties:
        regex_extract:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Python regex pattern; if it matches, replace the value with the
            first capture group. Applied last so it can post-process the output
            of the other transforms.
          title: Regex Extract
        skip_if_contains:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: If the raw value contains this substring, return None / skip lookup.
          title: Skip If Contains
        skip_if_equals:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            If the raw value equals this string (after strip), return None /
            skip lookup.
          title: Skip If Equals
        split_first_token:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Split the value on this separator and keep the first non-empty
            token. E.g. '|' for SproutsAI's 'Acme | INC-123' summary shape; ' '
            or '_' for Milestone.
          title: Split First Token
        strip_prefix:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: If the value starts with this prefix, remove it before lookup.
          title: Strip Prefix
      title: ValueTransformConfig
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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