curl --request POST \
--url https://api.luminpdf.com/v1/agreements \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"method": "template",
"agreement_data": {
"template_id": "ag_12312321",
"fields": {
"Client.Name": "Acme Corp",
"Document.EffectiveDate": "2025-08-01"
},
"variables": {
"Client.Name": "Acme Corp",
"Document.EffectiveDate": "2025-08-01"
},
"collections": {
"Opportunity.LineItems": [
{
"Product.Name": "Annual enterprise license",
"Product.Quantity": "1",
"Product.UnitPrice": "$1,000.00",
"Product.Total": "$1,000.00"
},
{
"Product.Name": "Premium support package",
"Product.Quantity": "1",
"Product.UnitPrice": "$500.00",
"Product.Total": "$500.00"
}
]
},
"linked_objects": [
{
"integration": "salesforce",
"entity_type": "opportunity",
"record_id": "0065g00000Vh123ABC",
"reference_url": "https://your-crm-instance.example.com/record/001XXXXXXXXX"
}
],
"signer_roles": [
{
"name": "Tenant",
"preassigned_signer": {
"name": "Alice Nguyen",
"email_address": "[email protected]"
}
},
{
"name": "Landlord",
"preassigned_signer": {
"name": "Brian Tran",
"email_address": "[email protected]"
}
}
]
}
}
'{
"id": "<string>",
"name": "<string>",
"created_at": 123,
"preview_url": "<string>",
"linked_objects": [
{
"integration": "<string>",
"entity_type": "<string>",
"record_id": "<string>",
"reference_url": "<string>"
}
]
}Create Agreement
Create a new AgreementGen document from a AgreementGen template.
curl --request POST \
--url https://api.luminpdf.com/v1/agreements \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"method": "template",
"agreement_data": {
"template_id": "ag_12312321",
"fields": {
"Client.Name": "Acme Corp",
"Document.EffectiveDate": "2025-08-01"
},
"variables": {
"Client.Name": "Acme Corp",
"Document.EffectiveDate": "2025-08-01"
},
"collections": {
"Opportunity.LineItems": [
{
"Product.Name": "Annual enterprise license",
"Product.Quantity": "1",
"Product.UnitPrice": "$1,000.00",
"Product.Total": "$1,000.00"
},
{
"Product.Name": "Premium support package",
"Product.Quantity": "1",
"Product.UnitPrice": "$500.00",
"Product.Total": "$500.00"
}
]
},
"linked_objects": [
{
"integration": "salesforce",
"entity_type": "opportunity",
"record_id": "0065g00000Vh123ABC",
"reference_url": "https://your-crm-instance.example.com/record/001XXXXXXXXX"
}
],
"signer_roles": [
{
"name": "Tenant",
"preassigned_signer": {
"name": "Alice Nguyen",
"email_address": "[email protected]"
}
},
{
"name": "Landlord",
"preassigned_signer": {
"name": "Brian Tran",
"email_address": "[email protected]"
}
}
]
}
}
'{
"id": "<string>",
"name": "<string>",
"created_at": 123,
"preview_url": "<string>",
"linked_objects": [
{
"integration": "<string>",
"entity_type": "<string>",
"record_id": "<string>",
"reference_url": "<string>"
}
]
}Required scopes (OAuth 2.0)
Required scopes (OAuth 2.0)
agreementsAuthorizations
Provide your API key in the X-API-Key header, e.g., X-API-Key: YOUR_API_KEY.
Body
Must be set to template.
template Hide child attributes
Hide child attributes
Unique identifier of the AG template. Obtainable from the template list API.
Key-value map of Variables in the template. Pass values for the variables to render them into the created document or leave values blank to make them available for insertion later.
Key-value pairs for Form Fields defined in the template. Keys must match field names. Values prefill the corresponding form fields in the generated document. Currently supports: text and checkbox fields.
Map of collection name → array of record objects used to expand table-scoped row-loop markers in the template.
- Each key must match a collection name returned by Get Template Details under
collections[].name. - Each value is an ordered array of flat record objects; each record is a key–value map where keys match the collection's variable names and values are strings.
- Records are rendered in array order.
- Maximum 100 items per collection, and up to 50 collections per request.
Applies to AgreementGen templates only. Ignored silently when the resolved template type is not lumin.
CRM or external objects linked to the Agreement.
Hide child attributes
Hide child attributes
The external system or integration where the linked object lives. Example: salesforce, hubspot.
The type of the linked object in that provider's data model. Example: opportunity, contact, deal.
The unique identifier of the linked object in the provider system. Example: 0065g00000Vh123ABC (Salesforce record ID).
The reference URL of the linked object in the provider system.
Describes the signer roles defined in the template. Role name must match the values defined in the template. These values are prefilled when sending the agreement for signature from the AgreementGen editor.
Hide child attributes
Hide child attributes
A label for the role (e.g., "Tenant", "Manager"). Must match a role defined in the template.
Signer preassigned to this role. These values are prefilled when sending the agreement for signature.
Human-friendly title of the agreement (1-255 chars). Defaults to input name or "New document" if not provided in the request body.
1 - 255Response
Returns the Agreement summary object data
The unique identifier for the agreement.
The name of the agreement.
The time the agreement was created (Unix timestamp in milliseconds).
The URL to preview the agreement in the browser.
CRM or external objects linked to the agreement.
Hide child attributes
Hide child attributes
The external system or integration where the linked object lives. Example: salesforce, hubspot.
The type of the linked object in that provider's data model. Example: opportunity, contact, deal.
The unique identifier of the linked object in the provider system. Example: 0065g00000Vh123ABC (Salesforce record ID).
The reference URL of the linked object in the provider system.