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

# Rename a custom object, or turn its Salesforce write-back on or off

> Changes a custom object's `name`, the one people see, and/or `writeback`, the app's Sync to Salesforce switch: while it is on, a value edited in Statisfy is pushed to the Salesforce record the row came from, into the field it came from or the field's `crm_field` (PATCH /v1/fields sets it). Only an object Salesforce fills takes `writeback: true` (a 422 otherwise); a field Salesforce fills is `writable` only while it is on. Its key stays, and so do the paths and field keys made from it. A standard object can't be changed here (a 422).



## OpenAPI

````yaml /api/statisfy-api.openapi.json patch /v1/objects/{object}
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/objects/{object}:
    patch:
      tags:
        - objects
      summary: Rename a custom object, or turn its Salesforce write-back on or off
      description: >-
        Changes a custom object's `name`, the one people see, and/or
        `writeback`, the app's Sync to Salesforce switch: while it is on, a
        value edited in Statisfy is pushed to the Salesforce record the row came
        from, into the field it came from or the field's `crm_field` (PATCH
        /v1/fields sets it). Only an object Salesforce fills takes `writeback:
        true` (a 422 otherwise); a field Salesforce fills is `writable` only
        while it is on. Its key stays, and so do the paths and field keys made
        from it. A standard object can't be changed here (a 422).
      operationId: objects_update
      parameters:
        - description: The custom object's key
          in: path
          name: object
          required: true
          schema:
            maxLength: 200
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                name:
                  anyOf:
                    - maxLength: 50
                      minLength: 1
                      type: string
                    - type: 'null'
                  default: null
                  description: Its new name
                  title: Name
                writeback:
                  anyOf:
                    - type: boolean
                    - type: 'null'
                  default: null
                  description: >-
                    Push edits made in Statisfy back to Salesforce: the app's
                    Sync to Salesforce switch. Only an object Salesforce fills
                    takes true
                  title: Writeback
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectDetail'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    ObjectDetail:
      properties:
        belongs_to:
          anyOf:
            - enum:
                - account
                - contact
              type: string
            - type: 'null'
          description: >-
            A custom object's records each belong to one account, or to one
            contact
          title: Belongs To
        custom:
          description: True for the tenant's own objects, false for the standard ones
          title: Custom
          type: boolean
        fields:
          description: >-
            Its fields, as GET /v1/fields?object=<key> lists them: standard
            first, each kind by key
          items:
            $ref: '#/components/schemas/FieldDef'
          title: Fields
          type: array
        key:
          description: 'Its name on the API: the {object} in /v1/objects/{object}/records'
          title: Key
          type: string
        label:
          title: Label
          type: string
        operations:
          description: >-
            What the API does with its records: list, search and get, and the
            writes it offers
          items:
            type: string
          title: Operations
          type: array
        records:
          description: The path of its records
          title: Records
          type: string
        source:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Who fills a custom object's records: statisfy, or the system it
            syncs from (salesforce, redshift, netsuite …)
          title: Source
        writeback:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            On a custom object: whether edits made in Statisfy are pushed back
            to Salesforce (each field's `crm_field`, or the Salesforce field it
            came from). Null on the standard objects
          title: Writeback
      required:
        - key
        - label
        - custom
        - records
        - operations
        - fields
      title: ObjectDetail
      type: object
    FieldDef:
      properties:
        crm_field:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            On a custom object's field Statisfy fills: the Salesforce field (API
            name) its value is pushed to while the object's `writeback` is on
          title: Crm Field
        currency_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency Code
        decimal_places:
          anyOf:
            - type: integer
            - type: 'null'
          description: 'On a float or percent field: the decimal places shown'
          title: Decimal Places
        destinations:
          description: The CRM fields a value of this field is pushed to, one per CRM
          items:
            $ref: '#/components/schemas/PushDestination'
          title: Destinations
          type: array
        downstream_field:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            On a Salesforce or HubSpot field: the Statisfy field its CRM value
            is also saved into
          title: Downstream Field
        editable:
          default: false
          description: >-
            The app's edit lock: false when people cannot edit the value in the
            app
          title: Editable
          type: boolean
        external_id:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            On a custom object's field: its value identifies a record, and an
            import matches rows on it. Null on a standard object's field
          title: External Id
        formula:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Set on a formula field: how its value is computed, in the shape
            `formula` takes on POST /v1/fields
          title: Formula
        hidden:
          default: false
          title: Hidden
          type: boolean
        key:
          title: Key
          type: string
        kind:
          enum:
            - standard
            - custom
          title: Kind
          type: string
        label:
          title: Label
          type: string
        lifecycle_stages:
          anyOf:
            - items:
                $ref: '#/components/schemas/LifecycleStageDef'
              type: array
            - type: 'null'
          description: 'On a lifecycle_stage field: its stages, in order'
          title: Lifecycle Stages
        mandatory:
          default: false
          title: Mandatory
          type: boolean
        object:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The object whose id(s) the value holds: set on reference fields (one
            id) and on id lists such as a contact's accounts (type text_list)
          title: Object
        option_labels:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Option Labels
        options:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Options
        owner:
          default: statisfy
          enum:
            - statisfy
            - crm
            - warehouse
            - integration
            - ai
            - computed
          title: Owner
          type: string
        pill_options:
          anyOf:
            - items:
                $ref: '#/components/schemas/PillOptionDef'
              type: array
            - type: 'null'
          description: 'On a pill field: its coloured options'
          title: Pill Options
        source:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The system the field comes from, such as SALESFORCE, HUBSPOT or
            GAINSIGHT; null for Statisfy's own
          title: Source
        syncs_to_crm:
          default: false
          title: Syncs To Crm
          type: boolean
        type:
          title: Type
          type: string
        writable:
          default: false
          title: Writable
          type: boolean
      required:
        - key
        - label
        - type
        - kind
      title: FieldDef
      type: object
    PushDestination:
      additionalProperties: false
      description: One CRM field a field's value is pushed to.
      properties:
        destination:
          description: 'The CRM: one of SALESFORCE, HUBSPOT, GAINSIGHT'
          enum:
            - SALESFORCE
            - HUBSPOT
            - GAINSIGHT
          examples:
            - SALESFORCE
          title: Destination
          type: string
        target_field_key:
          description: >-
            The key of the CRM's field on the same object that receives the
            value: a field whose `source` is that CRM (GET /v1/fields lists
            them)
          examples:
            - account_tier__c
          title: Target Field Key
          type: string
      required:
        - destination
        - target_field_key
      title: PushDestination
      type: object
    LifecycleStageDef:
      properties:
        is_active_customer:
          default: false
          description: A record in this stage is an active customer
          title: Is Active Customer
          type: boolean
        is_closed:
          default: false
          description: The stage ends the lifecycle
          title: Is Closed
          type: boolean
        is_won:
          default: false
          description: The stage is a win
          title: Is Won
          type: boolean
        key:
          description: The stage's value, stored on records
          examples:
            - onboarding
          title: Key
          type: string
        label:
          description: Its display label
          examples:
            - Onboarding
          title: Label
          type: string
        probability:
          default: 0
          description: The chance, 0 to 1, of the record closing won from this stage
          title: Probability
          type: number
      required:
        - key
        - label
      title: LifecycleStageDef
      type: object
    PillOptionDef:
      properties:
        color_hex:
          description: 'Its colour, as #RGB or #RRGGBB'
          examples:
            - '#FF2F00'
          title: Color Hex
          type: string
        key:
          description: The option's value
          examples:
            - At risk
          title: Key
          type: string
      required:
        - key
        - color_hex
      title: PillOptionDef
      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.