import Morphik from 'morphik';const client = new Morphik({ apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted});const document = await client.ingest.ingestText({ content: 'content' });console.log(document.app_id);
Ingest a text document asynchronously (queued like /ingest/file).
POST
/
ingest
/
text
JavaScript
import Morphik from 'morphik';const client = new Morphik({ apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted});const document = await client.ingest.ingestText({ content: 'content' });console.log(document.app_id);
Optional per-field type hints: 'string', 'number', 'decimal', 'datetime', 'date', 'boolean', 'array', 'object'. Enables typed comparisons with $eq, $gt, etc. Types are inferred if omitted.