Skip to main content
PATCH
Update an AI learning

Authorizations

Authorization
string
header
required

Authenticate every request with a Bearer token. Pass your Reply API key in the Authorization header:

Get your API key from the Reply dashboard: Settings → API Key.

Path Parameters

id
integer
required

AI learning ID

Required range: x >= 1

Body

application/json

Partial update of an AI learning. Send at least one field; every field you leave out keeps its current value.

text
string

New wording of the rule. Rewording a learning whose source is aiGenerated turns it into a manual one.

Required string length: 1 - 1000
categories
enum<string>[]

Where the rule applies

Minimum array length: 1

Where a learning applies. personalizedMessage shapes outbound message drafting, replyHandling shapes answers to incoming mail. A learning can carry both.

Available options:
personalizedMessage,
replyHandling
scope
enum<string>

Who the learning binds. Moving a learning off the sequence scope drops its sequenceIds — send scope on its own. workspace and organization need the matching permission.

Available options:
organization,
workspace,
user,
sequence
isEnabled
boolean

Whether the learning is switched on

sequenceIds
integer[]

Sequences the learning is limited to; any sequence added must be one you can see. Required once the learning ends up on the sequence scope and rejected on every other scope.

Maximum array length: 50
Required range: x >= 1

Response

The updated learning

A standing rule that shapes how the AI writes, together with the learnings it contradicts.

id
integer
read-only

Unique identifier of the learning

text
string
read-only

The standing rule the AI follows

categories
enum<string>[]
read-only

Where the rule applies

Where a learning applies. personalizedMessage shapes outbound message drafting, replyHandling shapes answers to incoming mail. A learning can carry both.

Available options:
personalizedMessage,
replyHandling
source
enum<string>

Whether the AI derived the learning or a person wrote it

Available options:
aiGenerated,
manual
scope
enum<string>

Who the learning binds

Available options:
organization,
workspace,
user,
sequence
sequenceIds
integer[]
read-only

Sequences the learning is limited to. Empty unless scope is sequence.

isEnabled
boolean
read-only

Whether the learning is switched on

createdAt
string<date-time>
read-only

When the learning was created (UTC)

updatedAt
string<date-time> | null
read-only

When the learning was last changed (UTC). null if it has never been changed.

ownerUserId
integer | null
read-only

User ID of the learning's owner. null when the owner is no longer a Reply user.

isOwn
boolean
read-only

Whether the learning is yours. false for a learning a team or organization admin set for everyone.

conflictState
enum<string>

How the learning stands against the learnings it contradicts. An unresolved learning is not applied.

Available options:
none,
overridden,
takesPrecedence,
unresolved
conflicts
AiLearningConflict · object[]
read-only

Every other learning this one contradicts. Empty when conflictState is none.