Skip to main content
POST
Create 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.

Body

application/json

Request body for creating an AI learning. A learning created through the API is always enabled and counts as manually authored.

text
string
required

The standing rule the AI should follow

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

Where the rule applies. Send one or both values, without repeats.

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>
required

Who the learning binds. workspace and organization need the matching permission, and organization also needs you to belong to an organization.

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

Sequences the learning is limited to, each one a sequence you can see. Required when scope is sequence and rejected for every other scope.

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

Response

The learning was created

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.