Delete a campaign
Permanently deletes a campaign. Use archive for soft deletion.
Authorization
ApiKeyAuth API key generated from your Leadsail dashboard Settings page
In: header
Path Parameters
The campaign ID
Response Body
application/json
application/json
application/json
package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://api.leadsail.app/api/v1/campaigns/string" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}{
"success": true,
"message": "string"
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}Update a campaign
Partially updates a campaign. Only provided fields are modified. **Update semantics:** - **Omit a field**: no change (field untouched) - **Send `null`**: removes/unsets the field from the document - **Send `[]`**: clears array fields (sets to empty array) - **Send new value**: overwrites the field - **Nested objects** (`webhooks`, `firstSubmissionAction`, `campaignAiAgents`, `settings`): deep-merged — only provided sub-fields are updated, sibling sub-fields are preserved
Archive a campaign
Soft-deletes a campaign by setting an archivedAt timestamp. The campaign can be restored later.