---
title: "Controller Build Audience For Rfm"
method: POST
path: "/rfm/build_audience_for_rfm"
---

# Controller Build Audience For Rfm

`POST /rfm/build_audience_for_rfm`

## Request

- Base URL: `https://api.akkio.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.akkio.com/rfm/build_audience_for_rfm`
- Auth: none declared

Builds the audience for an RFM model

## Request body

- RFMBuildAudienceForRfmPayload
  - `segment_ids` integer[], required: The IDs of the segments to build audience for
  - `project_id` string, required: The ID of the project to build audience for
  - `new_audience_name` string, nullable: The name of the new audience to create
  - `org_id` string, required: The ID of the organization to build audience for

## Response `201`

Successful Response

- SrcAsyncJobServiceBuildConcreteAsyncJobRecordClassLocalsConcreteAsyncJobRecord8
  - `id` integer, nullable: ID of this object.
  - `created_at` string, date-time, nullable: datetime object representing when this object was created.
  - `updated_at` string, date-time, nullable: datetime object representing when this object was updated.
  - `deleted_at` string, date-time, nullable: datetime object representing when this object was deleted.
  - `status` 'RUNNING' | 'COMPLETED' | 'FAILED'
  - `endpoint` string: Endpoint spawning async job
  - `request` union: request sent to endpoint
    - object
    - unknown[]
      - unknown
  - `sync_response` union: sync response
    - object
    - unknown[]
      - unknown
  - `error` string, nullable: error message
  - `response` RFM: Main RFM model for RFM analysis with equal-width segmentation and UPC upload support. Supports 1:N relationship with brands, sub-brands, products, and product categories.
    - `id` integer, nullable: ID of this object.
    - `created_at` string, date-time, nullable: datetime object representing when this object was created.
    - `updated_at` string, date-time, nullable: datetime object representing when this object was updated.
    - `deleted_at` string, date-time, nullable: datetime object representing when this object was deleted.
    - `async_job_id` integer, required: ID of the async job used for this RFM analysis.
    - `name` string, nullable: Optional name for this RFM analysis.
    - `audience_id` string, nullable: ID of the audience used for this RFM analysis.
    - `start_date` string, date-time, nullable: Start date for the RFM analysis.
    - `end_date` string, date-time, nullable: End date for the RFM analysis.
    - `upc_batch_id` integer, nullable: ID of the UPC batch used for this analysis.
    - `product_selections` object, nullable: Structured selection of brands, sub-brands, products, and categories for analysis.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/akkio/apis/akkio-api.md) - [All operations](https://skmtc.dev/akkio/apis/akkio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/akkio/apis/akkio-api/revisions/c477deff6271?raw)
