Compose

Preview an AI-composed message

identity accepts the same forms as leads: a LinkedIn public identifier, /in/ path, profile URL, or user id; or an Instagram username, @handle, or profile URL.

POST

/api/v1/compose

Request bodyrequired

channelrequired

"linkedin" | "instagram"

connectedAccountIdrequired

string · uuid

identityrequired

string

LinkedIn public identifier, /in/ path, profile URL, or user id (ACoAAA…); or Instagram username, @handle, or profile URL. Stored as the identifier.

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

channelCalls

integer

remainingBudget

object

requestId

string · uuid

Id of this request, for support and troubleshooting

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