---
title: "Tailor the sequence to its audience"
method: POST
path: "/sequences/{sequence_id}/agent/tailor/"
tags: ["sequences", "mcp-searchable-tool"]
---

# Tailor the sequence to its audience

`POST /sequences/{sequence_id}/agent/tailor/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Tailor a draft to its audience, in the background (about a minute): choose the library campaign that fits the audience best, rewrite each of its steps' instructions for the company from the business context, and set its goal unless a person set one. Replaces the draft's steps with the campaign's, edits included. Pass the person's own words about what the campaign is for as `intent`, or a `campaign_key` to run a particular campaign. A launched sequence keeps its steps and cannot be tailored. Free, up to a daily number per workspace. Returns where tailoring stands; poll the tailoring read until it settles.

## Path parameters

- `sequence_id` string, uuid, required

## Request body

- SequenceTailorSchema: What a person asks of a tailoring: their own words, and a campaign.
  - `campaign_key` string, nullable: A campaign from the library to run, by key (see the outbound presets' campaigns). Omitted, tailoring chooses the one that fits the audience best.
  - `intent` string: What the campaign is for, in the person's own words: an event, a launch, an offer, who to reach. The one part of a campaign an email may state as fact.

## Response `200`

Successful Response

- SequenceTailoringReadSchema: Where a sequence's tailoring stands: the campaign it runs, and its newest job.
  - `campaign` SequenceCampaignReadSchema, required: The campaign a sequence runs, why tailoring chose it, and an older tailoring's brief.
    - `angle` string, required: An older tailoring's brief: the angle.
    - `audience` string, required: An older tailoring's brief: who it writes to.
    - `campaign_key` string, required
    - `campaign_name` string, required
    - `chosen_by_person` boolean, required
    - `goal` string, required: The goal tailoring set; empty when it set none. The agent's own goal is the one it writes toward.
    - `intent` string, required: What the person asked for, in their own words.
    - `reason` string, required: Why tailoring chose it, in one line; empty when a person chose it.
    - `step_notes` object, required: An older tailoring's notes, one per step, by step id.
    - `table_name` string, required
    - `tailoring_off` boolean, required: The person chose the standard instructions.
    - `why_now` string, nullable, required: An older tailoring's brief: why now.
  - `in_flight` boolean, required: A job is still working; launch waits for it.
  - `job` SequenceTailoringJobReadSchema, required: One tailoring job: how far it got and what it chose.
    - `campaign_key` string, nullable, required
    - `campaign_name` string, nullable, required
    - `created_at` string, date-time, required
    - `finished_at` string, date-time, nullable, required
    - `id` string, uuid, required
    - `reason` string, nullable, required: Why it ended as it did, as a code: daily_cap, no_context, guard, launched, edited, and the like.
    - `status` string, required: queued, running, applied, failed, skipped or superseded; ready_for_review and kept_stock only on jobs from before tailoring rewrote steps.
    - `steps` AiStep[]: What the run did, one step per piece of work once it is done: the business context and audience it read, the campaign it chose, the steps it rewrote. Grows while the job is in flight; kept once it settles.
      - `action` string, required: What kind of move this was, e.g. `read_table`, `plan`, `write_column`.
      - `detail` string: The step's input: the instruction, the column it read, the query it ran.
      - `duration_ms` integer, nullable: Wall clock for the work this step describes, never an estimate.
      - `observation` string: One line on what came back. The half that makes a step worth reading.
      - `outcome` string: `completed`, `failed`, `refused` or `stopped`. Clients must tolerate new tokens.
      - `thought` string, nullable: The model's stated reasoning for choosing this step. Set by the agent loop; the assistant surfaces leave it null, and the renderer simply omits the rung.
    - `trigger` string, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found.
- `409`: Nothing to tailor (no audience, or no step the agent writes), or the sequence is launched.
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
