> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Write In-App Copy

> Write an in-app message's eyebrow, title, message and button text with AI

Writes copy for one in-app message or card from a short brief, sized for the layout. Nothing is saved: put the result in an in-app step's `eyebrow`, `title`, `body` and `buttons`, adding the `url` each link button opens. The writer never invents prices, dates or numbers the brief does not give, and may greet by name with `{{FIRST_NAME|there}}`. Requires the `sequences:write` scope. Limited to 20 requests a minute per workspace.

## Body

<ParamField body="brief" type="string" required>
  What the message should say, 3 to 1,000 characters. Write it in the language the copy should use.
</ParamField>

<ParamField body="kind" type="string" default="message">
  `message` or `card`. Cards get at most one link button.
</ParamField>

<ParamField body="format" type="string" default="modal">
  `modal`, `banner` or `fullscreen`. Sets the length targets: banners get the shortest copy.
</ParamField>

<ParamField body="hasImage" type="boolean" default="false">
  Whether the step shows an image.
</ParamField>

```bash theme={null}
curl "https://api.sequenzy.com/api/v1/in-app/copy" \
  --request POST \
  --header "Authorization: Bearer $SEQUENZY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{ "brief": "Trial ends in 3 days; nudge them to upgrade so they keep their history" }'
```

## Response

<ResponseField name="copy" type="object">
  `eyebrow` (may be empty), `title`, `body` and `buttons`, each `{ label, action }` with `action` `open_url` or `dismiss`.
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "copy": {
      "eyebrow": "3 days left",
      "title": "Keep your training plan",
      "body": "Upgrade before your trial ends and your plan, history and streak stay put.",
      "buttons": [
        { "label": "Upgrade", "action": "open_url" },
        { "label": "Not now", "action": "dismiss" }
      ]
    }
  }
  ```

  ```json 422 theme={null}
  {
    "error": "Expected string length greater or equal to 3"
  }
  ```

  ```json 429 theme={null}
  {
    "error": "Too many requests. Try again in a minute."
  }
  ```

  ```json 500 theme={null}
  {
    "error": "The AI answer could not be used. Try again or reword the brief."
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.