@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Properties
@base https://api.hubapi.com
@version v3
@auth OAuth2 | ApiKey private-app-legacy in header | ApiKey private-app in header
@common_fields {objectType: str}
@endpoints 13
@toc crm(13)

@endpoint GET /crm/v3/properties/{objectType}
@optional {archived: bool=false, dataSensitivity: str(highly_sensitive/non_sensitive/sensitive)=non_sensitive, locale: str, properties: str}
@returns(200) {results: [map]}

@endpoint POST /crm/v3/properties/{objectType}
@required {fieldType: str(booleancheckbox/calculation_equation/checkbox/date/file/html/number/phonenumber/radio/select/text/textarea), groupName: str, label: str, name: str, type: str(bool/date/datetime/enumeration/number/phone_number/string)}
@optional {calculationFormula: str, currencyPropertyName: str, dataSensitivity: str(highly_sensitive/non_sensitive/sensitive), description: str, displayOrder: int(int32), externalOptions: bool, formField: bool, hasUniqueValue: bool, hidden: bool, options: [map{description: str, displayOrder: int(int32), hidden!: bool, label!: str, value!: str}], referencedObjectType: str, showCurrencySymbol: bool}
@returns(201) {archived: bool, archivedAt: str(date-time), calculated: bool, calculationFormula: str, createdAt: str(date-time), createdUserId: str, currencyPropertyName: str, dataSensitivity: str, dateDisplayHint: str, description: str, displayOrder: int(int32), externalOptions: bool, fieldType: str, formField: bool, groupName: str, hasUniqueValue: bool, hidden: bool, hubspotDefined: bool, label: str, modificationMetadata: map{archivable: bool, readOnlyDefinition: bool, readOnlyOptions: bool, readOnlyValue: bool}, name: str, options: [map], referencedObjectType: str, sensitiveDataCategories: [str], showCurrencySymbol: bool, type: str, updatedAt: str(date-time), updatedUserId: str}

@endpoint POST /crm/v3/properties/{objectType}/batch/archive
@required {inputs: [map{name!: str}]}
@returns(204)

@endpoint POST /crm/v3/properties/{objectType}/batch/create
@required {inputs: [map{calculationFormula: str, currencyPropertyName: str, dataSensitivity: str, description: str, displayOrder: int(int32), externalOptions: bool, fieldType!: str, formField: bool, groupName!: str, hasUniqueValue: bool, hidden: bool, label!: str, name!: str, options: [map], referencedObjectType: str, showCurrencySymbol: bool, type!: str}]}
@returns(201) {completedAt: str(date-time), links: map, requestedAt: str(date-time), results: [map], startedAt: str(date-time), status: str}
@returns(207) {completedAt: str(date-time), errors: [map], links: map, numErrors: int(int32), requestedAt: str(date-time), results: [map], startedAt: str(date-time), status: str}

@endpoint POST /crm/v3/properties/{objectType}/batch/read
@required {archived: bool, dataSensitivity: str(highly_sensitive/non_sensitive/sensitive), inputs: [map{name!: str}]}
@optional {locale: str}
@returns(200) {completedAt: str(date-time), links: map, requestedAt: str(date-time), results: [map], startedAt: str(date-time), status: str}
@returns(207) {completedAt: str(date-time), errors: [map], links: map, numErrors: int(int32), requestedAt: str(date-time), results: [map], startedAt: str(date-time), status: str}

@endpoint GET /crm/v3/properties/{objectType}/groups
@optional {locale: str}
@returns(200) {results: [map]}

@endpoint POST /crm/v3/properties/{objectType}/groups
@required {label: str, name: str}
@optional {displayOrder: int(int32)}
@returns(201) {archived: bool, displayOrder: int(int32), label: str, name: str}

@endpoint GET /crm/v3/properties/{objectType}/groups/{groupName}
@required {groupName: str}
@optional {locale: str}
@returns(200) {archived: bool, displayOrder: int(int32), label: str, name: str}

@endpoint DELETE /crm/v3/properties/{objectType}/groups/{groupName}
@required {groupName: str}
@returns(204)

@endpoint PATCH /crm/v3/properties/{objectType}/groups/{groupName}
@required {groupName: str}
@optional {displayOrder: int(int32), label: str}
@returns(200) {archived: bool, displayOrder: int(int32), label: str, name: str}

@endpoint GET /crm/v3/properties/{objectType}/{propertyName}
@required {propertyName: str}
@optional {archived: bool=false, dataSensitivity: str(highly_sensitive/non_sensitive/sensitive)=non_sensitive, locale: str, properties: str}
@returns(200) {archived: bool, archivedAt: str(date-time), calculated: bool, calculationFormula: str, createdAt: str(date-time), createdUserId: str, currencyPropertyName: str, dataSensitivity: str, dateDisplayHint: str, description: str, displayOrder: int(int32), externalOptions: bool, fieldType: str, formField: bool, groupName: str, hasUniqueValue: bool, hidden: bool, hubspotDefined: bool, label: str, modificationMetadata: map{archivable: bool, readOnlyDefinition: bool, readOnlyOptions: bool, readOnlyValue: bool}, name: str, options: [map], referencedObjectType: str, sensitiveDataCategories: [str], showCurrencySymbol: bool, type: str, updatedAt: str(date-time), updatedUserId: str}

@endpoint DELETE /crm/v3/properties/{objectType}/{propertyName}
@required {propertyName: str}
@returns(204)

@endpoint PATCH /crm/v3/properties/{objectType}/{propertyName}
@required {propertyName: str}
@optional {calculationFormula: str, currencyPropertyName: str, description: str, displayOrder: int(int32), fieldType: str(booleancheckbox/calculation_equation/checkbox/date/file/html/number/phonenumber/radio/select/text/textarea), formField: bool, groupName: str, hidden: bool, label: str, options: [map{description: str, displayOrder: int(int32), hidden!: bool, label!: str, value!: str}], showCurrencySymbol: bool, type: str(bool/date/datetime/enumeration/number/phone_number/string)}
@returns(200) {archived: bool, archivedAt: str(date-time), calculated: bool, calculationFormula: str, createdAt: str(date-time), createdUserId: str, currencyPropertyName: str, dataSensitivity: str, dateDisplayHint: str, description: str, displayOrder: int(int32), externalOptions: bool, fieldType: str, formField: bool, groupName: str, hasUniqueValue: bool, hidden: bool, hubspotDefined: bool, label: str, modificationMetadata: map{archivable: bool, readOnlyDefinition: bool, readOnlyOptions: bool, readOnlyValue: bool}, name: str, options: [map], referencedObjectType: str, sensitiveDataCategories: [str], showCurrencySymbol: bool, type: str, updatedAt: str(date-time), updatedUserId: str}

@end
