Compose

Preview an AI-composed message

POST

/api/v1/compose

Request bodyrequired

channelrequired

"linkedin" | "instagram"

connectedAccountIdrequired

string · uuid

identityrequired

string

promptrequired

string

contextoptional

"profile" | "posts" | "conversation" | "lead_properties"[]

modeloptional

string

maxCharsoptional

integer

leadPropertiesoptional

object

Response

200Generated text and compose metadata.

text

string

meta

object

model

string

contextUsed

object[]

usedFallback

boolean

generatedAt

string · date-time

providerCalls

integer

remainingBudget

object

Errors

  • 400: Bad request
  • 401: Unauthorized: missing or invalid API key
  • 403: Forbidden
  • 404: Not found
  • 422: Invalid request payload

Search docs

Search documentation, API reference, and MCP tools

We use cookies to enhance your experience on Needle and keep your data secure. Privacy Policy