> ## 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.

# Set the Slack auto-join rule

> Saves the whole rule: send all four parts, with null for an unused id_field or name_field and [] for unused prefixes or suffixes. A rule that is not empty runs at the next hourly Slack run (a full read of the channels), so within about an hour. Up to 20 prefixes and 20 suffixes, each 3 to 80 characters after a leading # and spaces are removed (it is stored in lower case), none twice; a CRM field must be an account field, and not the same for both. A 422 lists each bad part (`field`, `index`). Slack need not be connected.



## OpenAPI

````yaml /api/statisfy-api.openapi.json put /v1/integrations/slack/auto-join
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/slack/auto-join:
    put:
      tags:
        - integrations
      summary: Set the Slack auto-join rule
      description: >-
        Saves the whole rule: send all four parts, with null for an unused
        id_field or name_field and [] for unused prefixes or suffixes. A rule
        that is not empty runs at the next hourly Slack run (a full read of the
        channels), so within about an hour. Up to 20 prefixes and 20 suffixes,
        each 3 to 80 characters after a leading # and spaces are removed (it is
        stored in lower case), none twice; a CRM field must be an account field,
        and not the same for both. A 422 lists each bad part (`field`, `index`).
        Slack need not be connected.
      operationId: integrations_slack_put_auto_join
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                id_field:
                  anyOf:
                    - maxLength: 200
                      type: string
                    - type: 'null'
                  description: >-
                    The account CRM field that holds a channel id to join; null:
                    none
                  title: Id Field
                name_field:
                  anyOf:
                    - maxLength: 200
                      type: string
                    - type: 'null'
                  description: >-
                    The account CRM field that holds a channel name to join;
                    null: none
                  title: Name Field
                prefixes:
                  description: Join the channels whose name starts with one
                  items:
                    maxLength: 200
                    type: string
                  maxItems: 20
                  title: Prefixes
                  type: array
                suffixes:
                  description: Join the channels whose name ends with one
                  items:
                    maxLength: 200
                    type: string
                  maxItems: 20
                  title: Suffixes
                  type: array
              required:
                - id_field
                - name_field
                - prefixes
                - suffixes
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackAutoJoin'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    SlackAutoJoin:
      properties:
        id_field:
          anyOf:
            - type: string
            - type: 'null'
          title: Id Field
        id_field_missing:
          title: Id Field Missing
          type: boolean
        name_field:
          anyOf:
            - type: string
            - type: 'null'
          title: Name Field
        name_field_missing:
          title: Name Field Missing
          type: boolean
        prefixes:
          items:
            type: string
          title: Prefixes
          type: array
        suffixes:
          items:
            type: string
          title: Suffixes
          type: array
      required:
        - id_field
        - name_field
        - prefixes
        - suffixes
        - id_field_missing
        - name_field_missing
      title: SlackAutoJoin
      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.