@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Forms
@base https://api.hubapi.com
@version v3
@auth OAuth2 | ApiKey private-app in header
@endpoints 6
@toc marketing(6)

@endpoint GET /marketing/v3/forms
@optional {after: str # The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results., archived: bool # Whether to return only results that have been archived., formTypes: [str], limit: int(int32) # The maximum number of results to display per page.}
@returns(200) {paging: map{next: map{after: str, link: str}}, results: [any]} # successful operation

@endpoint POST /marketing/v3/forms
@returns(201) successful operation

@endpoint GET /marketing/v3/forms/{formId}
@desc Get a form definition
@required {formId: str}
@optional {archived: bool # Whether to return only results that have been archived.}
@returns(200) successful operation

@endpoint PUT /marketing/v3/forms/{formId}
@desc Update a form definition
@required {formId: str}
@returns(200) successful operation

@endpoint DELETE /marketing/v3/forms/{formId}
@desc Archive a form definition
@required {formId: str}
@returns(204) No content

@endpoint PATCH /marketing/v3/forms/{formId}
@desc Partially update a form definition
@required {formId: str}
@optional {archived: bool # Whether this form is archived., configuration: map{allowLinkToResetKnownValues!: bool, archivable!: bool, cloneable!: bool, createNewContactForNewEmail!: bool, editable!: bool, embedType: str, language!: str, lifecycleStages!: [map], notifyContactOwner!: bool, notifyRecipients!: [str], postSubmitAction!: map, prePopulateKnownValues!: bool, recaptchaEnabled!: bool}, displayOptions: map{cssClass: str, renderRawHtml!: bool, style!: map, submitButtonText!: str, theme!: str}, fieldGroups: [map{fields!: [any], groupType!: str, richText: str, richTextType!: str}] # The fields in the form, grouped in rows., legalConsentOptions: any # Configuration for legal consent and data processing compliance options. Supports types: none, legitimate_interest, explicit_consent_to_process, implicit_consent_to_process., name: str # The name of the form. Expected to be unique for a hub.}
@returns(200) successful operation

@end
