openapi: 3.2.0 info: title: Sub-Account (Formerly location) Custom Field API description: Documentation for Sub-Account (Formerly location) API version: '1.0' contact: {} servers: - url: https://services.leadconnectorhq.com tags: - name: Custom Field description: Documentation for Sub-Account (Formerly location) API paths: /locations/{locationId}/customFields: get: operationId: get-custom-fields summary: Get Custom Fields parameters: - name: Version in: header description: API Version required: true schema: type: string enum: - '2021-07-28' - name: locationId required: true in: path description: Location Id example: ve9EPM428h8vShlRW1KT schema: type: string - name: model required: false in: query description: Model of the custom field you want to retrieve example: opportunity schema: enum: - contact - opportunity - all type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/CustomFieldsListSuccessfulResponseDto' '400': description: Bad Request content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/BadRequestDTO '401': description: Unauthorized content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnauthorizedDTO '422': description: Unprocessable Entity content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnprocessableDTO tags: - Custom Field security: - bearer: - locations/customFields.readonly post: operationId: create-custom-field summary: Create Custom Field parameters: - name: Version in: header description: API Version required: true schema: type: string enum: - '2021-07-28' - name: locationId required: true in: path description: Location Id example: ve9EPM428h8vShlRW1KT schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateCustomFieldsDTO' responses: '201': description: Successful response content: application/json: schema: $ref: '#/components/schemas/CustomFieldSuccessfulResponseDto' '400': description: Bad Request content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/BadRequestDTO '401': description: Unauthorized content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnauthorizedDTO '422': description: Unprocessable Entity content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnprocessableDTO tags: - Custom Field security: - bearer: - locations/customFields.write /locations/{locationId}/customFields/{id}: get: operationId: get-custom-field summary: Get Custom Field parameters: - name: Version in: header description: API Version required: true schema: type: string enum: - '2021-07-28' - name: locationId required: true in: path description: Location Id schema: example: ve9EPM428h8vShlRW1KT type: string - name: id required: true in: path description: Custom Field Id or Field Key (e.g. "contact.first_name" or "opportunity.pipeline_id") examples: id: value: 00NhGCcN1tlO8ZHcu7Wb summary: Custom Field ID field_key: value: contact.first_name summary: Custom Field Key schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/CustomFieldSuccessfulResponseDto' '400': description: Bad Request content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/BadRequestDTO '401': description: Unauthorized content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnauthorizedDTO '422': description: Unprocessable Entity content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnprocessableDTO tags: - Custom Field security: - bearer: [] put: operationId: update-custom-field summary: Update Custom Field parameters: - name: Version in: header description: API Version required: true schema: type: string enum: - '2021-07-28' - name: locationId required: true in: path description: Location Id example: ve9EPM428h8vShlRW1KT schema: type: string - name: id required: true in: path description: Custom Field Id example: 00NhGCcN1tlO8ZHcu7Wb schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateCustomFieldsDTO' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/CustomFieldSuccessfulResponseDto' '400': description: Bad Request content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/BadRequestDTO '401': description: Unauthorized content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnauthorizedDTO '422': description: Unprocessable Entity content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnprocessableDTO tags: - Custom Field security: - bearer: [] delete: operationId: delete-custom-field summary: Delete Custom Field parameters: - name: Version in: header description: API Version required: true schema: type: string enum: - '2021-07-28' - name: locationId required: true in: path description: Location Id example: ve9EPM428h8vShlRW1KT schema: type: string - name: id required: true in: path description: Custom Field Id example: 00NhGCcN1tlO8ZHcu7Wb schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/CustomFieldDeleteSuccessfulResponseDto' '400': description: Bad Request content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/BadRequestDTO '401': description: Unauthorized content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnauthorizedDTO '422': description: Unprocessable Entity content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnprocessableDTO tags: - Custom Field security: - bearer: [] /locations/{locationId}/customFields/upload: post: operationId: upload-file-customFields summary: Uploads File to customFields parameters: - name: Version in: header description: API Version required: true schema: type: string enum: - '2021-07-28' - name: locationId required: true in: path schema: type: string requestBody: required: true content: multipart/form-data: schema: $ref: '#/components/schemas/FileUploadBody' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/FileUploadResponseDto' '400': description: Bad Request content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/BadRequestDTO '401': description: Unauthorized content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnauthorizedDTO '422': description: Unprocessable Entity content: application/json: schema: $ref: ../common/common-schemas.json#/components/schemas/UnprocessableDTO tags: - Custom Field security: - bearer: - locations/customFields.write components: schemas: CustomFieldDeleteSuccessfulResponseDto: type: object properties: succeded: type: boolean example: true CustomFieldsListSuccessfulResponseDto: type: object properties: customFields: type: array items: $ref: '#/components/schemas/CustomFieldSchema' CustomFieldSuccessfulResponseDto: type: object properties: customField: $ref: '#/components/schemas/CustomFieldSchema' UpdateCustomFieldsDTO: type: object properties: name: type: string example: Custom Field placeholder: type: string example: Placeholder Text acceptedFormat: example: - .pdf - .docx - .jpeg type: array items: type: string isMultipleFile: type: boolean example: false maxNumberOfFiles: type: number example: 2 textBoxListOptions: type: array items: anyOf: - $ref: '#/components/schemas/textBoxListOptionsSchema' - $ref: '#/components/schemas/textBoxListOptionsSchema' position: type: number example: 0 default: 0 model: type: string description: Model of the custom field you want to update example: opportunity enum: - contact - opportunity required: - name FileUploadBody: type: object properties: id: type: string description: Id(Contact Id/Opportunity Id/Custom Field Id) example: aWdODOBVOlH1RUFKWQke maxFiles: type: string description: Max number of files example: '15' CreateCustomFieldsDTO: type: object properties: name: type: string example: Custom Field dataType: type: string example: TEXT placeholder: type: string example: Placeholder Text acceptedFormat: example: - .pdf - .docx - .jpeg type: array items: type: string isMultipleFile: type: boolean example: false maxNumberOfFiles: type: number example: 2 textBoxListOptions: type: array items: anyOf: - $ref: '#/components/schemas/textBoxListOptionsSchema' - $ref: '#/components/schemas/textBoxListOptionsSchema' position: type: number example: 0 default: 0 model: type: string description: Model of the custom field you want to create example: opportunity enum: - contact - opportunity required: - name - dataType textBoxListOptionsSchema: type: object properties: label: type: string example: First prefillValue: type: string example: '' FileUploadResponseDto: type: object properties: uploadedFiles: type: object description: Uploaded files example: FileName.csv: https://highlevel-private-staging.storage.googleapis.com/location/Ar4JQgIyuzRsVuwD9RSK/custom-Field/UpZLmohmKEQYn0ymqplY/56e0d7fc-085c-4a07-9e1d-6d8fdac7e710.csv meta: description: Meta data of uploaded files example: - fieldname: FileName.csv originalname: FileName.csv encoding: 7bit mimetype: text/csv size: 2061 url: https://highlevel-private-staging.storage.googleapis.com/location/Ar4JQgIyuzRsVuwD9RSK/custom-Field/UpZLmohmKEQYn0ymqplY/56e0d7fc-085c-4a07-9e1d-6d8fdac7e710.csv type: array items: type: string CustomFieldSchema: type: object properties: id: type: string example: 3sv6UEo51C9Bmpo1cKTq name: type: string example: pincode fieldKey: type: string example: contact.pincode placeholder: type: string example: Pin code dataType: type: string example: TEXT position: type: number example: 0 picklistOptions: example: - first option type: array items: type: string picklistImageOptions: example: [] type: array items: type: string isAllowedCustomOption: type: boolean example: false isMultiFileAllowed: type: boolean example: true maxFileLimit: type: number example: 4 locationId: type: string example: 3sv6UEo51C9Bmpo1cKTq model: type: string description: Model of the custom field example: opportunity enum: - contact - opportunity securitySchemes: bearer: scheme: bearer bearerFormat: JWT name: Authorization in: header description: Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account. type: http Location-Access: scheme: bearer bearerFormat: JWT name: Authorization in: header description: Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account. type: http Location-Access-Only: scheme: bearer bearerFormat: JWT name: Authorization in: header description: Use the Access Token generated with user type as Sub-Account. type: http Agency-Access: scheme: bearer bearerFormat: JWT name: Authorization in: header description: Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency. type: http x-tagGroups: name: Sub-Account (Formerly location) tags: - Location - Location Tags - Custom Field - Custom Value - Template - Tags Search - Location Notes - Location Tasks - Recurring Tasks - Location Search - Custom Field Search - Location Keys - Labs - Conversation Channel - Search - Sub-Account (Formerly Location) - Tags - Tasks Search - Timezone - ElasticSearch