> For the complete documentation index, see [llms.txt](https://help.recart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.recart.com/developers/public-api/flow/receive-a-single-automated-flow.md).

# Receive a single automated flow

One automated flow with its full structure: every item with its content and outbound edges resolved to item ids — `entryFlowItemId` is the first item; `nextItemId: null` means end of branch. The id of a campaign-backed flow returns 404 — use `/campaign-flows/{id}` instead.

```json
{"openapi":"3.1.0","info":{"title":"Recart API","version":"2023-12"},"tags":[{"name":"Flow","description":"Flows"}],"servers":[{"url":"https://api.recart.com/app-integrations/2023-12","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Recart-API-Key","description":"It can be obtained in Recart account after contacting Support"}},"schemas":{"AutomatedFlowDetail":{"type":["object"],"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["automated-flows"]},"attributes":{"allOf":[{"$ref":"#/components/schemas/AutomatedFlowAttributes"},{"type":"object","required":["entryFlowItemId","items"],"properties":{"entryFlowItemId":{"type":"string","description":"ID of the first item in the flow"},"items":{"type":"array","description":"Every item of the flow, linked by resolved ids","items":{"$ref":"#/components/schemas/FlowItem"}}}}]}}},"AutomatedFlowAttributes":{"type":"object","required":["id","name","status","tags"],"properties":{"id":{"type":"string","description":"ID of the automated flow"},"name":{"type":"string","description":"Name of the automated flow"},"status":{"type":"string","description":"Status of the automated flow","enum":["draft","active","inactive","cancelled"]},"tags":{"type":"array","items":{"type":"string"},"description":"Flow tags"},"isQuietHoursEnabled":{"type":"boolean","description":"Whether messages from this flow are held during the subscriber's quiet hours"},"isSmartSendingEnabled":{"type":"boolean","description":"Whether Smart Sending is enabled, suppressing sends to recently-messaged subscribers"},"segmentId":{"type":"string","description":"ID of the segment gating entry into the flow, if configured"},"triggerDiscountId":{"type":"string","description":"ID of the discount code associated with the flow's trigger, if configured"},"createdAt":{"type":"string","format":"date-time","description":"When the flow was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the flow was last updated"}}},"FlowItem":{"type":"object","description":"One item of the flow's item graph. The resource `type` is always\n`flow-item`; the shape is picked by `attributes.type`.\nItems link to each other by resolved ids — `nextItemId` (or a\nbranch's `nextItemId`) — rather than nesting; null means end of\nbranch. An internal item type this API doesn't model is returned\nwith `attributes.type` \"unsupported\" and only its id.\n","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["flow-item"]},"attributes":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","description":"Kind of item","enum":["sms","delay","conditional-split","random-split","adaptive-test","user-input","unsupported"]},"id":{"type":"string","description":"ID of the item"},"name":{"type":"string","description":"Item's display name (sms only)"},"messages":{"type":"array","description":"Messages to send (sms only)","items":{"$ref":"#/components/schemas/FlowMessage"}},"discountCodes":{"type":"array","description":"Static discount codes attached to the message (sms only)","items":{"type":"string"}},"discounts":{"type":"array","description":"Discounts attached to the message (sms only)","items":{"type":"object"}},"discountCodePoolId":{"type":"string","description":"ID of the discount code pool the message draws a unique code from (sms only)"},"uniqueDiscountIssuanceType":{"type":"string","description":"How a unique discount code is issued to the subscriber (sms only)"},"replyKeywordSettings":{"type":"object","description":"Keyword auto-reply configuration for this message (sms only)"},"delayType":{"type":"string","description":"Kind of delay (delay only)","enum":["delay","delay-until","delay-scheduled"]},"durationInSeconds":{"type":"integer","description":"Length of the delay, in seconds (delay only)"},"branches":{"type":"array","description":"Outgoing branches (conditional-split, random-split)","items":{"$ref":"#/components/schemas/FlowItemBranch"}},"defaultNextItemId":{"type":"string","nullable":true,"description":"ID of the next item when no branch matches (conditional-split only)"},"isSticky":{"type":"boolean","description":"Whether a returning subscriber is kept on the same arm (random-split only)"},"adaptiveTest":{"type":"object","description":"Adaptive test configuration (adaptive-test only)","properties":{"variants":{"type":"array","description":"Variant flow items under test","items":{"type":"object","properties":{"flowItemId":{"type":"string","description":"ID of the variant's flow item"}}}},"evaluation":{"type":"object","description":"Evaluation configuration used to pick a winner"},"audienceSplitPercentage":{"type":"number","description":"Share of the audience sampled before picking a winner"}}},"fieldName":{"type":"string","description":"Name of the captured field. LEGACY: user-input items are\nno longer creatable; existing flows may still contain\none.\n"},"validationRule":{"type":"string","description":"Validation applied to the subscriber's reply. LEGACY:\nuser-input items are no longer creatable; existing flows\nmay still contain one.\n"},"skippedNextItemId":{"type":"string","nullable":true,"description":"ID of the next item when the subscriber doesn't respond.\nLEGACY: user-input items are no longer creatable;\nexisting flows may still contain one.\n"},"nextItemId":{"type":"string","nullable":true,"description":"ID of the next item; null means end of branch (sms, delay, user-input)"}}}}},"FlowMessage":{"type":"object","description":"One SMS/MMS message of an sms flow item","properties":{"text":{"type":"string","description":"Message body"},"imageUrl":{"type":"string","nullable":true,"description":"MMS image attached to the message"}}},"FlowItemBranch":{"type":"object","description":"One outgoing branch of a split item. conditional-split branches\nuse conditions or expression with nextItemId; random-split\nbranches use percentage with nextItemId.\n","properties":{"conditions":{"type":"array","items":{"type":"object"},"description":"v1 conditional split conditions"},"expression":{"type":"object","description":"v2 conditional split expression: `and[].or[]` of conditions,\neach with a `slug`, `type`, `operator` and, depending on the\nslug, a `value`, a `dateFilter` (time window the condition\napplies to) and `filters` (occurrence or count). A condition\nnarrows its match with either one `subcondition` or, for\n`visited-page`, a `subconditions` list whose rows all apply to\nthe same page view; each row has `slug`, `category`, `operator`\nand a `value`, absent when the operator is `exist`. Conditions\nand subcondition rows whose value is a list of IDs carry\n`values` instead of `value`: one `{ id, name }` entry per ID,\nwhere `name` is the current name of the referenced segment,\nflow, opt-in tool, product, variant or Klaviyo list, or an\nempty string when it could not be resolved. This applies to\n`member-of-a-segment` (segment ids, on the condition), and on\nthe subcondition row for the flow subcondition (flow IDs),\n`subscription-source`/`optin-tool-id` (opt-in tool ids),\n`product`/`product-id` and `product-variant` (Shopify ids),\n`klaviyo-segment-or-list` (Klaviyo ids).\n"},"percentage":{"type":"number","description":"Share of traffic sent down this arm (random split)"},"nextItemId":{"type":"string","nullable":true,"description":"ID of the next item on this branch; null means end of branch (dead arm)"}}},"HttpErrorBody":{"type":"object","required":["errors"],"properties":{"errors":{"type":"array","items":{"type":"object","required":["id","code","title","detail"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"}}}}}}},"responses":{"HttpError":{"description":"HTTP Error response","content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/HttpErrorBody"}}}}}},"paths":{"/automated-flows/{id}":{"get":{"summary":"Receive a single automated flow","tags":["Flow"],"operationId":"getAutomatedFlow","description":"One automated flow with its full structure: every item with its\ncontent and outbound edges resolved to item ids —\n`entryFlowItemId` is the first item; `nextItemId: null` means\nend of branch. The id of a campaign-backed flow returns 404 — use\n`/campaign-flows/{id}` instead.\n","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the automated flow","schema":{"type":"string"}}],"responses":{"200":{"description":"Ok","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AutomatedFlowDetail"}}}}}},"4XX":{"$ref":"#/components/responses/HttpError"},"5XX":{"$ref":"#/components/responses/HttpError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.recart.com/developers/public-api/flow/receive-a-single-automated-flow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
