> ## 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 a project template's portal settings: customer sharing, hidden tasks and fields

> Changes the settings sent, as the app's template page saves them; the rest are kept. Projects made from the template afterwards take them (but for `shared_with_customer`: a new project always starts unshared, as in the app); projects already made keep theirs. In `field_sharing`, `fields_shown`, `task_hidden_fields` and `task_field_order` only the entries sent change, and null puts one back to the default. `hidden_tasks` is the whole list of the template's tasks kept from the customer. A task `hidden_tasks` or `task_hidden_fields` newly names must be one of the template's (GET /v1/project_templates/{template_id} lists them), or it is a 422; one the settings already hold may stay even if its task was deleted since. `fields_shown` takes a task's standard fields; a custom field is added to or removed from a template with PUT or DELETE /v1/project_templates/{template_id}/fields/{field_key}, which also keeps it internal for sharing; `fields_shown_default` is read only. A setting sent as null (`field_sharing: null`, say) is a 422: leave it out to keep it, or send its entries as null to put them back to the default. A template another request is changing is a 409: try again. A template synced from another tool takes settings here too, as in the app. Returns the settings as saved.



## OpenAPI

````yaml /api/statisfy-api.openapi.json patch /v1/project_templates/{template_id}/settings
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/project_templates/{template_id}/settings:
    patch:
      tags:
        - project_templates
      summary: >-
        Change a project template's portal settings: customer sharing, hidden
        tasks and fields
      description: >-
        Changes the settings sent, as the app's template page saves them; the
        rest are kept. Projects made from the template afterwards take them (but
        for `shared_with_customer`: a new project always starts unshared, as in
        the app); projects already made keep theirs. In `field_sharing`,
        `fields_shown`, `task_hidden_fields` and `task_field_order` only the
        entries sent change, and null puts one back to the default.
        `hidden_tasks` is the whole list of the template's tasks kept from the
        customer. A task `hidden_tasks` or `task_hidden_fields` newly names must
        be one of the template's (GET /v1/project_templates/{template_id} lists
        them), or it is a 422; one the settings already hold may stay even if
        its task was deleted since. `fields_shown` takes a task's standard
        fields; a custom field is added to or removed from a template with PUT
        or DELETE /v1/project_templates/{template_id}/fields/{field_key}, which
        also keeps it internal for sharing; `fields_shown_default` is read only.
        A setting sent as null (`field_sharing: null`, say) is a 422: leave it
        out to keep it, or send its entries as null to put them back to the
        default. A template another request is changing is a 409: try again. A
        template synced from another tool takes settings here too, as in the
        app. Returns the settings as saved.
      operationId: project_templates_update_settings
      parameters:
        - description: The template's id, as GET /v1/project_templates lists it
          in: path
          name: template_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                comment_sharing_default:
                  default: null
                  enum:
                    - internal
                    - external
                  title: Comment Sharing Default
                  type: string
                field_sharing:
                  additionalProperties:
                    anyOf:
                      - enum:
                          - internal
                          - external
                        type: string
                      - type: 'null'
                  default: null
                  description: >-
                    The fields to change, each external or internal; an entry
                    sent as null puts that field back to the default (the whole
                    map as null is refused: leave it out). Fields not sent keep
                    theirs
                  maxProperties: 5000
                  propertyNames:
                    maxLength: 300
                    minLength: 3
                  title: Field Sharing
                  type: object
                field_sharing_default:
                  default: null
                  enum:
                    - internal
                    - external
                  title: Field Sharing Default
                  type: string
                fields_shown:
                  additionalProperties:
                    anyOf:
                      - type: boolean
                      - type: 'null'
                  default: null
                  description: >-
                    A task's standard fields to show (true) or remove (false),
                    as `task:<key>`; null puts one back to the default. Fields
                    not sent keep theirs. A custom field is added to or removed
                    from a template with PUT or DELETE
                    /v1/project_templates/{template_id}/fields/{field_key},
                    which also keeps it internal for sharing
                  maxProperties: 5000
                  propertyNames:
                    maxLength: 300
                    minLength: 3
                  title: Fields Shown
                  type: object
                hidden_tasks:
                  default: null
                  description: >-
                    The whole list of the template's tasks kept from the
                    customer, by id: tasks not in it are shown, and [] shows
                    them all
                  items:
                    maxLength: 64
                    minLength: 1
                    type: string
                  maxItems: 5000
                  title: Hidden Tasks
                  type: array
                shared_with_customer:
                  default: null
                  title: Shared With Customer
                  type: boolean
                task_field_order:
                  additionalProperties:
                    anyOf:
                      - items:
                          maxLength: 200
                          minLength: 1
                          type: string
                        maxItems: 500
                        type: array
                      - type: 'null'
                  default: null
                  description: >-
                    For each task kind sent (activity, milestone), the drawer's
                    fields in order, by key; null or an empty list goes back to
                    the default order. Kinds not sent keep theirs
                  propertyNames:
                    enum:
                      - activity
                      - milestone
                  title: Task Field Order
                  type: object
                task_hidden_fields:
                  additionalProperties:
                    anyOf:
                      - items:
                          maxLength: 200
                          minLength: 1
                          type: string
                        maxItems: 500
                        type: array
                      - type: 'null'
                  default: null
                  description: >-
                    For each template task sent (by id), the whole list of task
                    fields kept from the customer on it, by bare key (`status`,
                    not `task:status`); an empty list or null clears it. Tasks
                    not sent keep theirs
                  maxProperties: 5000
                  propertyNames:
                    maxLength: 64
                    minLength: 1
                  title: Task Hidden Fields
                  type: object
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateSettings'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    TemplateSettings:
      properties:
        comment_sharing_default:
          description: >-
            Whether a new comment is shown to the customer unless its writer
            says
          enum:
            - internal
            - external
          title: Comment Sharing Default
          type: string
        field_sharing:
          additionalProperties:
            enum:
              - internal
              - external
            type: string
          description: >-
            Fields shown to (external) or kept from (internal) the customer, by
            name: `project:<key>` for a field of the project, `task:<key>` for a
            column of its task table, with the keys `GET
            /v1/fields?object=project` (or `task`) lists, standard ones included
            (`task:status`)
          title: Field Sharing
          type: object
        field_sharing_default:
          description: >-
            Whether a field not listed in `field_sharing` is shown to the
            customer. A project's custom field is the exception: it is shown
            only when listed external
          enum:
            - internal
            - external
          title: Field Sharing Default
          type: string
        fields_shown:
          additionalProperties:
            type: boolean
          description: >-
            Fields shown (true) or removed (false) in the app (the Edit fields
            dialog), by name
          title: Fields Shown
          type: object
        fields_shown_default:
          description: >-
            Whether a custom field not listed in `fields_shown` shows in the
            app. Read only: the app never changes it
          title: Fields Shown Default
          type: boolean
        hidden_tasks:
          description: >-
            The template's tasks (by id, as GET
            /v1/project_templates/{template_id} lists them) kept from the
            customer: the project's tasks made from them are hidden from the
            customer
          items:
            type: string
          title: Hidden Tasks
          type: array
        shared_with_customer:
          description: >-
            The template's own Share switch. A project made from the template
            always starts unshared, as in the app: it is shared from the project
          title: Shared With Customer
          type: boolean
        task_field_order:
          additionalProperties:
            items:
              type: string
            type: array
          description: >-
            The order of the fields in the template's task drawer, by task kind
            (activity, milestone): field keys, the listed ones first
          title: Task Field Order
          type: object
        task_hidden_fields:
          additionalProperties:
            items:
              type: string
            type: array
          description: >-
            For a template task (by id), the task fields kept from the customer
            on that task alone, on top of `field_sharing`, by bare key
            (`status`, not `task:status`)
          title: Task Hidden Fields
          type: object
      required:
        - shared_with_customer
        - field_sharing_default
        - field_sharing
        - comment_sharing_default
        - fields_shown_default
        - fields_shown
        - hidden_tasks
        - task_hidden_fields
        - task_field_order
      title: TemplateSettings
      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.