Update a campaign
curl --request POST \
--url https://api.datalane.com/v1/campaigns/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaignId": "<string>"
}
'import requests
url = "https://api.datalane.com/v1/campaigns/update"
payload = { "campaignId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({campaignId: '<string>'})
};
fetch('https://api.datalane.com/v1/campaigns/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"status": "draft",
"createdVia": "api",
"name": "July target accounts",
"accounts": {
"requested": 100,
"eligible": 82,
"excluded": {
"total": 18,
"invalid": 5,
"recentlyEnriched": 13,
"crmExcluded": 0
}
},
"credits": {
"charged": 2,
"remaining": 998
},
"excludeEnrichedWithinDays": 30,
"lastEnrichment": {
"status": "failed",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"refunded": true
},
"createdAt": "2026-07-21T14:00:00.000Z",
"completedAt": "2023-11-07T05:31:56Z",
"resultsExpireAt": "2023-11-07T05:31:56Z",
"results": {
"totalAccounts": 100,
"totalContactsFound": 275,
"pctAccountsWithContact": 0.8,
"pctAccountsWithMobile": 0.6
}
},
"error": null
}{
"data": null,
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"issues": [
"<string>"
]
}
}
}{
"data": null,
"error": {
"code": "invalid_api_key",
"message": "<string>"
}
}{
"data": null,
"error": {
"code": "not_found",
"message": "<string>",
"details": {
"resource": "<string>",
"id": "<string>"
}
}
}{
"data": null,
"error": {
"code": "campaign_not_editable",
"message": "<string>",
"details": {
"status": "draft"
}
}
}{
"data": null,
"error": {
"code": "internal_error",
"message": "Internal error."
}
}Campaigns
Update a campaign
POST
/
v1
/
campaigns
/
update
Update a campaign
curl --request POST \
--url https://api.datalane.com/v1/campaigns/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaignId": "<string>"
}
'import requests
url = "https://api.datalane.com/v1/campaigns/update"
payload = { "campaignId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({campaignId: '<string>'})
};
fetch('https://api.datalane.com/v1/campaigns/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"status": "draft",
"createdVia": "api",
"name": "July target accounts",
"accounts": {
"requested": 100,
"eligible": 82,
"excluded": {
"total": 18,
"invalid": 5,
"recentlyEnriched": 13,
"crmExcluded": 0
}
},
"credits": {
"charged": 2,
"remaining": 998
},
"excludeEnrichedWithinDays": 30,
"lastEnrichment": {
"status": "failed",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"refunded": true
},
"createdAt": "2026-07-21T14:00:00.000Z",
"completedAt": "2023-11-07T05:31:56Z",
"resultsExpireAt": "2023-11-07T05:31:56Z",
"results": {
"totalAccounts": 100,
"totalContactsFound": 275,
"pctAccountsWithContact": 0.8,
"pctAccountsWithMobile": 0.6
}
},
"error": null
}{
"data": null,
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"issues": [
"<string>"
]
}
}
}{
"data": null,
"error": {
"code": "invalid_api_key",
"message": "<string>"
}
}{
"data": null,
"error": {
"code": "not_found",
"message": "<string>",
"details": {
"resource": "<string>",
"id": "<string>"
}
}
}{
"data": null,
"error": {
"code": "campaign_not_editable",
"message": "<string>",
"details": {
"status": "draft"
}
}
}{
"data": null,
"error": {
"code": "internal_error",
"message": "Internal error."
}
}Only API-created campaigns in
draft can be updated. Omitted fields are left unchanged; pass null for excludeEnrichedWithinDays to disable the recency exclusion.
Once enrichment starts, the campaign is frozen and permanently records the configuration the launch used, so updates to enriching or later states return 409 campaign_not_editable.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Pattern:
^camp_[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21}$New display name. Omit to leave unchanged.
Required string length:
1 - 200Example:
"July target accounts"
Skip accounts enriched within this many days when enrichment launches. Pass null to disable the exclusion. Omit to leave unchanged.
Required range:
0 <= x <= 9007199254740991Example:
30