Ruby
Ingest a record
Persist a record for asynchronous moderation
result = client.ingest_a_record(
client_id: "post-123", name: "A post", entity: "post", content: "Hello world"
)The required arguments are client_id, name, entity, and content; client_url, metadata, and user are optional. IngestRecordResponse includes the Insion record ID and, when queued, the moderation ID.
Use this for imports and feeds that receive results through webhooks. Passing an existing client_id updates that record.
Method shape
client.ingest_a_record(request_options: {}, **params)Parameters
| Keyword | Required | Type | Description |
|---|---|---|---|
client_id | Yes | String | Your stable record identifier; reusing it updates the record. |
name | Yes | String | Record title or name. |
entity | Yes | String | Record kind. |
content | Yes | String or content object | Content to process. |
client_url | No | String | Original-content URL. |
metadata | No | Hash | Custom record context. |
user | No | Insion::Types::UserInput or hash | Associated user profile. |
Response and delivery
The result is Insion::Types::IngestRecordResponse. Preserve its record ID; when a moderation ID is present, use it to correlate webhook delivery with this request. This method stores content first and does not wait for a moderation decision.