Conversation Records API
Aideify turns conversation messages into typed records with source quotations, protected human edits and revision-checked review. Your application supplies the schema and conversation; Aideify maintains the record.
My account: create a Conversation records key · OpenAPI contract
Aideify turns conversation messages into typed records with source quotations and editable proposals. Your application supplies a versioned schema and sends conversation turns. It receives field changes, review states and a durable revision. Conversation delivery and the user interface remain in your application.
Account access
Sign in at API console, open API access and create a key with Conversation records access. Choose read/write for schema registration, turns, reviews and deletion, or read-only for inspection. The existing one-credit API activation applies once per account; key replacements are free. Existing Form Filler keys do not grant record access.
An integration can instead
POST /api/v1/records/authorizations with
{"name":"My
integration","scope":"records:write"}. Show the returned authorizationUrl to the account owner.
After they approve, poll the returned tokenUrl with
{"secret":"<returned secret>"},
no more often than the returned interval. This uses Aideify's
shared account authorization endpoints. Never log the secret or returned
key. Approval does not grant turn allowance or authorize an automatic
payment.
Usage allowance
GET /api/v1/records/usage reports granted, used and
remaining user-turn starts. The initial grant is zero.
Aideify must grant a conversation-record allowance before user
extraction starts. This API takes no automatic payment. A failed or
interrupted user-turn start consumes one allowance unit; an identical
idempotent retry does not consume another or repeat inference. Schema
operations, reads, reviews, context-only turns and deletion do not
consume user-turn allowance. Optional composition is included within a
user-turn start and uses the existing bounded processing policy.
Allowance usage is separate from Form Filler completion credits.
Schema and session
Use Authorization: Bearer <customer key> for every
product operation below. Keep keys on your server.
1. POST /api/v1/records/schemas with an immutable
{id,version,fields}. Each field has key,
description, type (string or
chapters), kind (extracted or
composed) and maxLength. Chapter values are
arrays of {place,period,detail} strings. Composed fields
also declare fromFields, use only reviewed supported
inputs, have a maximum length of 2,000 and produce unapproved drafts.
They cannot depend on other composed fields. Unchanged schema
registration is repeatable; changed schemas require a new version.
2. POST /api/v1/records/sessions with
{id,schema,version}. Choose a stable opaque session id for
one of your users. Repeating the same id and schema resumes that record.
Customer keys isolate schemas and sessions from other accounts.
3. POST /api/v1/records/sessions/{id}/turns with
{expectedRevision,turn:{id,role,text},compose:false}. Set
Idempotency-Key equal to turn.id. User text
supplies evidence; assistant and system messages supply context only.
compose:true opts into suggested wording from reviewed
inputs. allowRemote:false prohibits external processing for
that turn.
4. GET /api/v1/records/sessions/{id} reads answers, current
revision and processing status. Answer states are
supported, check or missing.
Quoted evidence identifies user source turns; it does not prove the
proposed interpretation is correct. Generated wording is a separate
unapproved draft, never extracted evidence.
5. PATCH /api/v1/records/sessions/{id}/answers/{field} with
{expectedRevision,action,value?} and a unique
Idempotency-Key. Actions are edit,
approve, omit or accept a pending
revision. Human wording, approved answers and intentionally cleared
values remain protected from automatic replacement.
Example schema:
{"id":"person","version":1,"fields":[{"key":"name","description":"The person's self-stated name","type":"string","kind":"extracted","maxLength":100},{"key":"places","description":"Places the person lived; retain vague periods without inventing dates","type":"chapters","kind":"extracted","maxLength":3000}]}
Example turn:
{"expectedRevision":0,"turn":{"id":"turn-1","role":"user","text":"I'm Alex. I grew up in Boston and now I'm nomadic."}}
Required fields and completion
Set required: false on optional schema fields. Fields default to required when omitted. Changing requirements needs a new schema version; existing sessions keep their pinned version.
Every session creation, read, turn and review response includes completion.percent: Math.round(100 * answeredRequired / totalRequired). Zero required fields is 100%. Valid nonempty answers count while awaiting review. Whitespace, empty chapter arrays, clears and pending replacements for clears do not count. Approval is separate; 100% does not submit, publish or provision anything.
The same object returns totalRequired, answeredRequired, missingRequired, optional, missingOptional and unknownRequired (empty for record schemas). Existing missing and check lists cover all fields. Uploading a source alone does not answer fields. Completion comes from the saved answer revision.
Revisions, retries and errors
Only one mutation can process a session at a time. A concurrent turn,
review or deletion receives 409; read the record and retry after
processing finishes. Stale revisions receive 409 without replacing data.
A reused idempotency key with different input receives 409. Invalid
input receives 422, missing/revoked keys 401, wrong scope 403 and
exhausted allowance 429. Errors include error,
code and requestId.
A turn response with availability: unavailable preserves
existing answers and stores the user turn without pretending extraction
succeeded. An interrupted reservation becomes indeterminate after 90
seconds; the same operation never auto-replays. Read the record before
choosing a new turn id. This prevents automatic duplicate provider
execution but does not promise exactly-once execution after network
failure.
Inspection, retention and limits
GET /sessions/{id}/sources returns user evidence text;
GET /sessions/{id}/history returns field revision history,
under the same /api/v1/records prefix.
DELETE /sessions/{id} removes the active session's
source text, answers, history and content-bearing idempotency receipts.
Aggregate allowance usage remains and is not reset by deletion.
DELETE /schemas/{id}/versions/{version} removes an unused
schema version after its sessions are deleted. Record content remains
until deletion; see Data & privacy for the
service's broader processing terms.
Limits are 100 schema versions and 100 active sessions per customer, 30 fields per schema, 200 turns per session, 4,000 characters per turn and 2 MiB per persisted record. Chapter arrays allow up to 30 entries; place/period are at most 200 characters and detail at most 2,000. Key/account rate limits are 120/240 requests per minute. Storage or processing limits return explicit errors and preserve the previous record.
OpenAPI contract · API console · Developer APIs
Source artifacts
Upload writing samples, documents and photos to an owned record session with your records:write key, without a target form. Sources remain distinct from approved profile facts.
POST /api/v1/records/sessions/{id}/artifacts accepts multipart file, expectedRevision, kind (photo, writing, document), subject and authorship (subject, other, unknown), optional caption and period. A unique Idempotency-Key becomes the source ID. The response supplies source text with locators, attribution, extraction status and the new record revision.
PDF (up to 20 pages), DOCX, UTF-8 TXT and Markdown use source readers with remote processing disabled. Unreadable sources return an error; incomplete reading is flagged. JPEG, PNG and WebP originals are stored privately for the client’s image workflow. Source-only reading performs no semantic rewriting and consumes no form completion credits or user-turn allowance.
GET the session’s /artifacts to list sources, /artifacts/{sourceId} for extracted text and metadata, or /artifacts/{sourceId}/file to download the original through customer authorization. DELETE a source with JSON expectedRevision and a fresh Idempotency-Key to remove its original, extracted text and upload receipt. Session deletion removes all its artifacts. Client-created interpretations and derived fields remain the client’s responsibility.
Limits: 3 MiB per file, 10 artifacts and 20 MiB per session, 60 MiB per customer, 100,000 extracted characters per upload, captions up to 1,000 characters and periods up to 200. See the complete guide and OpenAPI contract for operation and retry details.