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

# Update Object Schema By Key / Id

> Update Custom Object Schema  or standard object's like contact, opportunity, business searchable fields. To understand objects and records, please have a look at the documentation here : https://help.hoopai.com/api-reference/overview/objects



## OpenAPI

````yaml /api-reference/objects/openapi.json put /objects/{key}
openapi: 3.0.0
info:
  title: CUSTOM_OBJECTS API
  description: >-
    Custom objects are completely customizable objects that allow you to store
    and manage information tailored to your unique business needs. With custom
    objects, you can create custom fields, establish relationships, and
    integrate them into workflows, providing flexibility beyond standard objects
    like Contacts, Opportunities or Companies.
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Custom Objects Schema
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: Object Schema
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: Sub-Account (Formerly Location)
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: Records
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: Search Object Records
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: Search
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: Tags
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: Tasks Search
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: Custom Field
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: Custom Value
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: Timezone
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: Template
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
  - name: ElasticSearch
    description: >-
      Custom objects are completely customizable objects that allow you to store
      and manage information tailored to your unique business needs. With custom
      objects, you can create custom fields, establish relationships, and
      integrate them into workflows, providing flexibility beyond standard
      objects like Contacts, Opportunities or Companies.
paths:
  /objects/{key}:
    put:
      tags:
        - Object Schema
      summary: Update Object Schema By Key / Id
      description: >-
        Update Custom Object Schema  or standard object's like contact,
        opportunity, business searchable fields. To understand objects and
        records, please have a look at the documentation here :
        https://help.hoopai.com/api-reference/overview/objects
      operationId: update-custom-object
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
        - name: key
          required: true
          in: path
          description: >-
            key of the custom or standard object. For custom objects, the key
            must include the prefix “custom_objects.”. This key can be found on
            the Object Details page under Settings in the UI.
          schema:
            example: custom_objects.pet
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomObjectSchemaDTO'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectResponseDTO'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - bearer:
            - objects/schema.write
      externalDocs:
        url: https://help.hoopai.com/api-reference/overview/objects
        description: >-
          To understand objects and records, please have a look at the
          documentation here 
components:
  schemas:
    UpdateCustomObjectSchemaDTO:
      type: object
      properties:
        labels:
          $ref: '#/components/schemas/CustomObjectLabelUpdateDto'
          example:
            singular: Pet
            plural: Pets
        description:
          type: string
          example: These are non vaccinated pets
          description: Pet Object`s description
          nullable: true
        locationId:
          type: string
          description: location id
          example: 632c34b4c9b7da3358ac9891
        searchableProperties:
          description: >-
            Searchable Fields: Provide the field key of your object that you
            want to search on, using the format
            (custom_object.<object_name>.<field_key>).
          example:
            - custom_objects.mad.mad
            - custom_objects.mad.record_1
            - custom_objects.mad.nn
          type: array
          items:
            type: string
      required:
        - locationId
        - searchableProperties
    CustomObjectResponseDTO:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/ICustomObjectSchema'
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          type: array
          items:
            type: string
          example:
            - Unprocessable Entity
        error:
          type: string
          example: Unprocessable Entity
      required:
        - statusCode
        - message
        - error
    CustomObjectLabelUpdateDto:
      type: object
      properties:
        singular:
          type: string
          example: Car
          description: Singular name of the custom object
        plural:
          type: string
          example: Cars
          description: Plural name of the custom object
    ICustomObjectSchema:
      type: object
      properties:
        id:
          type: string
          example: 661c06b4ffde146bdb469442
          description: id of the custom / standard object schema
        standard:
          type: boolean
          example: false
          description: >-
            false in case of custom objects and true in case of standard objects
            like contacts and opportunities 
        key:
          type: string
          example: custom_objects.pet
          description: >-
            key that would be used to refer the custom / standard Object
            internally (lowercase + underscore_separated). For custom objects,
            'custom_objects.' would be added as prefix by default
        labels:
          $ref: '#/components/schemas/CustomObjectLabelDto'
          example:
            singular: Pet
            plural: Pets
        description:
          type: string
          example: These are non vaccinated pets
          description: >-
            Custom / Standard  Object Descriptions for example , Pet Object`s
            description
        locationId:
          type: string
          description: location's id
          example: Q9DT3OAqEXDLYuob1G32
        primaryDisplayProperty:
          type: string
          description: >-
            Primary property for the custom / standard  Object. This would be
            used as primary data when rendering the UI.
            'custom_objects.{{object_key}} or business.{{object_key}} (for
            company)' would be added as prefix by default for all the custom /
            standard objects
          example: custom_objects.pet.name
        dateAdded:
          type: string
          description: Date and time when the object was added
          format: date-time
        dateUpdated:
          type: string
          description: Date and time when the object was last updated
          format: date-time
        type:
          type: object
          example: The Object type can either USER_DEFINED or SYSTEM_DEFINED
          description: Object`s Type
      required:
        - id
        - standard
        - key
        - labels
        - locationId
        - primaryDisplayProperty
        - dateAdded
        - dateUpdated
    CustomObjectLabelDto:
      type: object
      properties:
        singular:
          type: string
          example: Pet
          description: Singular name of the custom object
        plural:
          type: string
          example: Pets
          description: Plural name of the custom object
      required:
        - singular
        - plural
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Use the Access Token generated with user type as Sub-Account (OR)
        Private Integration Token of Sub-Account.
      type: http

````