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

# Create Custom Object

> Allows you to create a custom object schema. 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 post /objects
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:
    post:
      tags:
        - Object Schema
      summary: Create Custom Object
      description: >-
        Allows you to create a custom object schema. To understand objects and
        records, please have a look at the documentation here :
        https://help.hoopai.com/api-reference/overview/objects
      operationId: create-custom-object-schema
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomObjectSchemaDTO'
      responses:
        '201':
          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:
        - Agency-Access:
            - 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:
    CreateCustomObjectSchemaDTO:
      type: object
      properties:
        labels:
          $ref: '#/components/schemas/CustomObjectLabelDto'
          example:
            singular: Pet
            plural: Pets
        key:
          type: string
          example: custom_objects.pet
          description: >-
            key that would be used to refer the Custom Object internally
            (lowercase + underscore_separated). 'custom_objects.' would be added
            as prefix by default
        description:
          type: string
          example: These are non vaccinated pets
          description: Pet Object`s description
        locationId:
          type: string
          description: Location Id
          example: ve9EPM428h8vShlRW1KT
        primaryDisplayPropertyDetails:
          $ref: '#/components/schemas/CustomObjectDisplayPropertyDetails'
      required:
        - labels
        - key
        - locationId
        - primaryDisplayPropertyDetails
    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
    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
    CustomObjectDisplayPropertyDetails:
      type: object
      properties:
        key:
          type: string
          example: custom_objects.pet.name
          description: >-
            key that would be used to refer the custom field internally
            (lowercase + underscore_separated). 'custom_objects.{{objectKey}}'
            would be added as prefix by default is not passed
        name:
          type: string
          example: Pet name
          description: >-
            Name of the Primary property name which will be displayed on the
            record page
        dataType:
          type: string
          example: TEXT
          description: Primary property data Type (it can either be TEXT or NUMERICAL type)
      required:
        - key
        - name
        - dataType
    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

````