API referenceCopies

Generate ad copy

Generates ad copy (headlines, primary text, descriptions) for platform using the brand's stored context, and stores it under a copy generation id. Pass creativeIds to match the copy to those creatives. No ad changes until the id is attached to an ad.

POST
/v1/brands/{brandId}/copies
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.

Idempotency-Key?string

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

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

Target platform. Only facebook and instagram are supported, the value is stored as the copy's platform label.

Value in"facebook""instagram"
tone?string

Tone: professional, casual, urgent, friendly. Optional, defaults to brand voice.

angle?string

Marketing angle. Optional, only pass if the user requested a specific framing.

productDescription?string

Optional override. Backend auto-fills product context from brand (name, URL, business type, voice). Only pass this if the user gave specifics that should take precedence over brand defaults.

creativeIds?array<number>

IDs of creatives attached to this chat. When present, the backend pulls each creative's name + stored visual analysis and feeds it to the copy LLM so the copy matches what the ad actually shows. Pass whenever creatives are listed in the ## Attachments block. Never call readDocument on image MIME types, use this param instead.

Response Body

Generate ad copy

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

Required scope: write. CLI: koast generate-copy, see Copies commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.