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

# Create Learnings

export const EnterprisePlanBadge = ({tip = "This feature is available exclusively as part of the Enterprise plan. Please refer to our pricing page for more information about our plans and features.", title = "Enterprise Plan", cta = "Read more", href = "https://coderabbit.ai/pricing", disabled = false}) => {
  return <Tooltip tip={tip} cta={cta} href={href}>
        <Badge icon="building-2" disabled={disabled || undefined}>
            {title}
        </Badge>
    </Tooltip>;
};

<EnterprisePlanBadge />

## Create Learnings

<Info>
  Requires the `learning:write` permission. Workspace API key owners must also remain workspace admins.
</Info>

## API key eligibility

User and workspace API keys can create Learnings. Legacy organization API keys and agentic API keys cannot use this endpoint. A workspace API key must select one organization for every request by providing that organization's Git provider ID as `org_id`.

## Batch behavior

Each request processes an ordered batch of 1–100 items. Every item identifies a repository and supplies Learning text; file-path and source-URL metadata are optional. CodeRabbit resolves repository ownership from the authenticated organization and records the authenticated user as the author. Callers cannot set either value.

A processed batch returns HTTP 200 even when individual items fail. Check the overall status and every item result: each item is reported as `created`, `duplicate`, or `failed` in request order.

## Redaction and retries

CodeRabbit redacts recognized credentials before storing and indexing Learning text. Each item receives a stable ID derived from its organization, repository, and redacted content, so retrying identical content is safe. A retry can also repair the review index when the canonical record was created but indexing failed.

Publishing content that already exists as a private Learning from an open pull request promotes the existing Learning to shared status instead of creating another record.

## Rate limit

The Learnings write endpoints share a limit of 10 requests per minute per organization.
