Agent API (AI & Automation) Entries & Batch
Search valid target entries for a reference field
/agent/v1/collections/{postType}/fields/{fieldKey}/options Searches accent/case-folded reference targets allowed by a reference field, filtered by the API key's allowedPostTypes. Includes suggestedOptions rescue suggestions when a query has 0 matches and totalEligible <= 50. Requires entries:read scope.
Authentication
- Bearer token
BearerApiKeyScoped Agent API key (
Authorization: Bearer ocms_...). Human JWTs and browser cookies are rejected on the Agent Plane.
Path parameters
-
postTypestring requiredSource post type slug. -
fieldKeystring requiredReference field key.
Query parameters
-
qstringSearch query matching display label or slug. -
targetstringRestrict to a specific target post type slug (for polymorphic references). -
limitintegerPage size limit.min 1, max 100
-
cursorstringOpaque reference pagination cursor.
Headers
-
If-Schema-FingerprintstringOptional precondition header with the caller's cached schema fingerprint. Exact match proceeds silently; non-breaking capability gain proceeds withX-Schema-Warning; breaking drift returns409 schema_drift_detected.
Responses
-
200 Matching reference options.
application/json
-
fieldstring requiredExample author
-
hasMoreboolean requiredExample false
-
itemsarray of ReferenceOption requiredShow 5 fields Hide
-
displayLabelstring requiredExample Ada Lovelace
-
idstring, uuid required -
postTypestring requiredExample authors
-
slugstring requiredExample ada-lovelace
-
statusstring requiredAllowed:
draftscheduledpublishedarchivedtrashedExample published
-
-
nextCursorstring -
suggestedOptionsarray of ReferenceOptionPopulated as empty-search rescue suggestions when a query returns 0 matches and totalEligible <= 50.Show 5 fields Hide
-
displayLabelstring requiredExample Ada Lovelace
-
idstring, uuid required -
postTypestring requiredExample authors
-
slugstring requiredExample ada-lovelace
-
statusstring requiredAllowed:
draftscheduledpublishedarchivedtrashedExample published
-
-
targetsarray of string required -
totalEligibleinteger, int64 requiredExample 12
-
-
401 Missing, invalid, expired, or revoked Agent API key (cookies and human JWTs are rejected).
application/json
-
errorAPIError requiredCanonical error payload returned across all OvertCMS planes.Show 6 fields Hide
-
appliedboolean requiredAlways false on 4xx responses, guaranteeing the mutation was not applied.Example false
-
codestring requiredExample validation_error
-
detailsobject -
issuesarray of ValidationIssueShow 7 fields Hide
-
codestring requiredExample max_length
-
constraintobject -
fieldstringExample seoTitle
-
instructionstringExample Keep SEO titles under 60 characters for search snippet display.
-
labelstringExample SEO Title
-
messagestring requiredExample field must be at most 60 graphemes
-
searchEndpointstringExample /agent/v1/collections/posts/fields/author/options
-
-
messagestring requiredExample entry validation failed
-
retryableboolean requiredExample false
-
-
-
403 API key lacks required scope, post-type access, or IP allowlist match.
application/json
-
errorAPIError requiredCanonical error payload returned across all OvertCMS planes.Show 6 fields Hide
-
appliedboolean requiredAlways false on 4xx responses, guaranteeing the mutation was not applied.Example false
-
codestring requiredExample validation_error
-
detailsobject -
issuesarray of ValidationIssueShow 7 fields Hide
-
codestring requiredExample max_length
-
constraintobject -
fieldstringExample seoTitle
-
instructionstringExample Keep SEO titles under 60 characters for search snippet display.
-
labelstringExample SEO Title
-
messagestring requiredExample field must be at most 60 graphemes
-
searchEndpointstringExample /agent/v1/collections/posts/fields/author/options
-
-
messagestring requiredExample entry validation failed
-
retryableboolean requiredExample false
-
-
-
404 Post type or reference field not found.
application/json
-
errorAPIError requiredCanonical error payload returned across all OvertCMS planes.Show 6 fields Hide
-
appliedboolean requiredAlways false on 4xx responses, guaranteeing the mutation was not applied.Example false
-
codestring requiredExample validation_error
-
detailsobject -
issuesarray of ValidationIssueShow 7 fields Hide
-
codestring requiredExample max_length
-
constraintobject -
fieldstringExample seoTitle
-
instructionstringExample Keep SEO titles under 60 characters for search snippet display.
-
labelstringExample SEO Title
-
messagestring requiredExample field must be at most 60 graphemes
-
searchEndpointstringExample /agent/v1/collections/posts/fields/author/options
-
-
messagestring requiredExample entry validation failed
-
retryableboolean requiredExample false
-
-
-
429 Per-key RPM rate limit, daily write cap, or daily media byte quota exceeded.
application/json
-
errorAPIError requiredCanonical error payload returned across all OvertCMS planes.Show 6 fields Hide
-
appliedboolean requiredAlways false on 4xx responses, guaranteeing the mutation was not applied.Example false
-
codestring requiredExample validation_error
-
detailsobject -
issuesarray of ValidationIssueShow 7 fields Hide
-
codestring requiredExample max_length
-
constraintobject -
fieldstringExample seoTitle
-
instructionstringExample Keep SEO titles under 60 characters for search snippet display.
-
labelstringExample SEO Title
-
messagestring requiredExample field must be at most 60 graphemes
-
searchEndpointstringExample /agent/v1/collections/posts/fields/author/options
-
-
messagestring requiredExample entry validation failed
-
retryableboolean requiredExample false
-
-