API referenceLaunches

Attach lead form

Turns on instant forms for the lead-generation ad set adsetNodeId and sets leadFormId as its form. Draft ad sets only; a live ad set returns 409.

POST
/v1/brands/{brandId}/launches/{launchId}/ad-sets/{adsetNodeId}/lead-form
bearerAuth
headerAuthorizationBearer <token>

An organization API key (koast_sk_…) with the API surface enabled, or an OAuth access token issued by Koast (koast_at_…) whose audience covers this API. REST access requires an active Agency plan.

brandId*integer

The brand the request acts on. Every brand-scoped resource lives under its brand.

launchId*string

The campaign launch (batch) id.

adsetNodeId*string

Koast adset node id to attach the lead form to.

Length1 <= length
Idempotency-Key?string

Retrying with the same key within 24 hours returns the first response without acting again.

Lengthlength <= 255
application/json
  1. body
leadFormId*string

Meta lead form id from listLeadForms.

Length1 <= length
leadFormName?string

Optional human name of the lead form (from listLeadForms).

Response Body

Attach lead form

application/json
  1. response
[key: string]?unknown
curl -X POST "https://example.com/v1/brands/0/launches/string/ad-sets/string/lead-form" \  -H "Authorization: Bearer koast_sk_..." \  -H "Content-Type: application/json" \  -d '{    "leadFormId": "string"  }'
{  "property1": null,  "property2": null}

Required scope: write. CLI: koast attach-lead-form, see Launches commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.