v2GetBrandsBrandIdDrafts
List drafts for one brand. Filter by status to build a review queue, or use item_id to find drafts for a content item.
See the REST reference for GET /v2/brands/{brand_id}/drafts.
Signature
v2GetBrandsBrandIdDrafts(
brand_id: string,
options?: {
signal?: AbortSignal;
item_id?: string | null;
limit?: number;
offset?: number;
status?: "draft" | "in_review" | "changes_requested" | "approved" | "handed_off" | "publication_failed" | "published" | "archived" | "rolled_back" | null;
},
): Promise<ApiResponse<unknown>>Parameters
brand_id- ID of the brand that owns the record.
options- Pass the named options in the signature. The selected action or view determines which fields are required.
options.signal- Optional AbortSignal to cancel the HTTP request.
options.status- "draft" | "in_review" | "changes_requested" | "approved" | "handed_off" | "publication_failed" | "published" | "archived" | "rolled_back" | null.
options.limit- integer.
Return value
Promise<ApiResponse<unknown>>. Read summaries from data.items. Pass data.next_offset as offset to continue. A null next_offset ends the list.
Errors
- The SDK throws AeoApiError if the API returns an error. Inspect status, code, fieldErrors and requestId.
- AeoTransportError means the request failed to connect or the client could not finish reading a successful response. Invalid JSON in a successful response throws SyntaxError. If you abort the request, the SDK throws the reason from the AbortSignal.
- For HTTP 422, check fieldErrors for the input field and validation message.
TypeScript example
import { AeoClient } from "@aeoapi/aeo-sdk";
const apiKey = process.env.AEO_API_KEY;
if (!apiKey) throw new Error("Set AEO_API_KEY on your server.");
const client = new AeoClient(apiKey, { baseUrl: "https://api.aeoapi.dev" });
// Substitute your own record IDs and values.
const response = await client.v2GetBrandsBrandIdDrafts("00000000-0000-4000-8000-000000000001", {
"status": "in_review",
"limit": 10
});
console.log(response.status, response.body);Requests by feature
Content drafts and editorial generation
See TypeScript client setup for authentication, timeouts and retry settings.