Forms
Query form data for the forms that belong to a specified owner (account).
Table Specific Information
To use this view, the Account column must be specified in the criteria.Select
For the Account column, the = operator is fully supported server-side. The IN operator is partially supported server-side and partially client-side. For example:
SELECT * FROM Forms WHERE Account = '512859024';
SELECT * FROM Forms WHERE Account IN ('512859024', '513009855');
When no criteria is specified, such as in this example:
SELECT * FROM Forms;
... we internally post-process the query as follows:
SELECT * FROM Forms WHERE Account IN (SELECT Id FROM Accounts);
The rest of the query is processed client-side.
Insert
To create a new form, the following fields are required: Account, Headline, LandingPage, Message, Questions, Name, Country, Language, Status.
The following fields are optional: Description, PrivacyPolicy, LegalDisclaimer.
INSERT INTO Forms (
Account,
Description,
Headline,
LandingPage,
LegalDisclaimer,
Name,
PrivacyPolicy,
Country,
Language,
Status,
Message,
Questions ) VALUES (
'urn:li:sponsoredAccount:512859024',
'This is a sample form used for collecting leads.',
'Join our newsletter!',
'https://example.com/thank-you',
'You agree to our terms and conditions.',
'Sample Form Name',
'https://example.com/privacy-policy',
'us',
'EN',
'ARCHIVED',
'This is a sample message.',
'[
{
\"question\": {
\"localized\": {
\"en_US\": \"First Name\"
}
},
\"name\": \"firstName\",
\"questionDetails\": {
\"textQuestionDetails\": {
}
},
\"predefinedField\": \"FIRST_NAME\"
},
{
\"question\": {
\"localized\": {
\"en_US\": \"Last Name\"
}
},
\"name\": \"lastName\",
\"questionDetails\": {
\"textQuestionDetails\": {
}
},
\"predefinedField\": \"LAST_NAME\"
}
]' );
Update
To modify an existing form, use an UPDATE statement. Note that the Id column is required in the WHERE clause.
The following columns are mutable after creation: Description, Headline, LandingPage, Message, LegalDisclaimer, Questions, Name, PrivacyPolicy, Country, Language, Status.
UPDATE Forms
SET
Description = 'New campaign form description.',
Headline = 'Try our newest product!',
LandingPage = 'https://example.com/new-landing',
Message = 'Thank you for your interest! We will contact you soon.',
LegalDisclaimer = 'By submitting this form you agree to our updated policies.',
Questions = '[
{
\"question\": {
\"localized\": {
\"en_US\": \"First Name\"
}
},
\"name\": \"firstName\",
\"questionDetails\": {
\"textQuestionDetails\": {
}
},
\"predefinedField\": \"FIRST_NAME\"
},
{
\"question\": {
\"localized\": {
\"en_US\": \"Last Name\"
}
},
\"name\": \"lastName\",
\"questionDetails\": {
\"textQuestionDetails\": {
}
},
\"predefinedField\": \"LAST_NAME\"
}
]',
Name = 'June 2025 LeadGen Form',
PrivacyPolicy = 'https://example.com/privacy',
Country = 'us',
Language = 'EN',
Status = 'DRAFT'
WHERE
Id = '13420673';
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
Identifier for the form. | |
| Account | String | False |
Accounts.Id |
Identifier for the owner of the form. This is the advertiser account. |
| Created | Timestamp | True |
Timestamp for creation of the form. | |
| LastModified | Timestamp | True |
Timestamp for last modification of the form. | |
| Description | String | False |
Description of the form, visible to both the owner and the viewer. | |
| Headline | String | False |
Headline of the form, visible to both the owner and the viewer. | |
| LandingPage | String | False |
The landing page URL after the viewer clicks on submit. | |
| Message | String | False |
The message displayed to a member after the Lead Form is submitted. | |
| LegalDisclaimer | String | False |
Advertiser's legal disclaimer to accompany this form. | |
| Questions | String | False |
Questions to request information from the viewer. At least one question should be present. | |
| Name | String | False |
Name of the form, visible to the owner of the form but not visible to the viewer. | |
| PrivacyPolicy | String | False |
The URL of the privacy policy that covers any data passed to the owner of the form. | |
| Country | String | False |
A lowercase two-letter language code as defined by ISO-639-1 | |
| Language | String | False |
An uppercase two-letter country code as defined by ISO-3166. | |
| ReviewStatus | String | True |
The status of the review of the form. 使用できる値は次のとおりです。AUTO_REJECTED, NEEDS_REVIEW, AUTO_APPROVED, PREAPPROVED, REJECTED, APPROVED, PENDING | |
| ReviewedAt | Timestamp | True |
Timestamp for when the form's review status was initiated/last updated. | |
| Status | String | False |
Indicates the state of review for the Lead Form. Can be one of the following: DRAFT, PUBLISHED, or ARCHIVED. | |
| VersionTag | String | True |
The number of times the form has been modified. |