Zernio
Zernio
API Reference

Lead Gen

List leads for a single formGETList lead formsGETList submitted leadsGETCreate a lead formPOSTCreate a test leadPOSTGet a lead formGETDelete a test leadDELETEArchive a lead formDELETE
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Lead Gen

Delete a test lead

Removes a test lead created for the form (DELETE /{leadgen_id}), so a new one can be submitted: Meta keeps one test lead per form and refuses a second until the first is gone. The same test lead appears in Meta's Lead Ads Testing Tool. Meta only deletes test leads; a real lead is refused.


PlatformsMeta
DELETE
/v1/ads/lead-forms/{formId}/test-leads

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Path Parameters

formId*string

Query Parameters

accountId*string

The facebook or metaads account whose Page owns the form.

leadId?string

The test lead id returned by createTestLead (or shown in the Testing Tool). Omitted = the test lead currently on the form.

Response Body

application/json

application/json

application/json

import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.leadgen.deleteTestLead({  path: {    formId: 'form_abc123',  },  query: {    accountId: 'account_abc123',  },});console.log(data);
{  "status": "string",  "deleted": [    "string"  ]}
Was this page helpful?

Get a lead form

Returns the full form, including the thank-you page, so a form can be diffed against what was created. Meta forms are scoped to the Page the accountId manages: a form on any other Page is a 404, never a read.

Archive a lead form

Neither platform hard-deletes a form; this archives it (Meta status=ARCHIVED; LinkedIn state=ARCHIVED via PARTIAL_UPDATE). Meta forms must belong to the Page the accountId manages.