The Ingest Rule object
An ingest rule is a standing instruction on one storage origin: when an object matching its filters lands in the bucket, create this job for it. Your storage provider posts its object-created event to the rule’s endpoint_url, and no server of yours is in the path. Ingest Rules explains the endpoint, the event shapes each provider sends, and how deliveries authenticate; this page lists the calls.
Base path: transcodely.v1.IngestRuleService Requires: an app-scoped API key (ak_), or a dashboard session with the X-Organization-ID header. With a session, creating, updating and deleting rules and replaying events needs the member role or higher; the viewer role can only read.
Important: The rule’s inbound secret (ings_…) is returned in full only by Create and by an Update that rotates it. It cannot be read again.
Attributes
| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier. Prefixed with ing_. |
app_id | string | The app that owns the rule. |
origin_id | string | The origin the objects land in. It must have read permission. |
name | string | Human-readable name. |
enabled | boolean | Whether events turn into jobs. A disabled rule still answers 202 and records each event as skipped with reason rule_disabled, so the provider’s subscription does not start failing. |
filters | object | Which objects the rule acts on. See Filters. An empty set matches everything in the bucket. |
action | object | The job to create. See Action. |
endpoint_url | string | Where the event sender posts. Read-only. |
secret_prefix | string | The first 8 characters of the inbound secret, for example ings_a1b. |
secret_hint | string | The last 4 characters of the inbound secret. |
secret_rotated_at | string | When the secret was last rotated. null if never. |
previous_secret_expires_at | string | Until when the previous secret is still accepted after a rotation. null when no rotation is in flight. |
events_received | string | How many events the rule has accepted, all time. |
jobs_created | string | How many jobs the rule has created, all time. |
last_event_at | string | When the last event arrived. null before the first. |
created_at | string | ISO 8601 timestamp. |
updated_at | string | ISO 8601 timestamp. |
{
"id": "ing_a1b2c3d4e5f6",
"app_id": "app_k1l2m3n4o5",
"origin_id": "ori_a1b2c3d4e5f6",
"name": "Watch uploads/",
"enabled": true,
"filters": {
"prefix": "uploads/",
"suffixes": [".mp4", ".mov"],
"content_types": [],
"min_bytes": "1024",
"max_bytes": "0"
},
"action": {
"outputs": [{ "preset": "pst_x9y8z7w6v5" }],
"managed": true,
"thumbnails": [],
"priority": "standard",
"metadata": {}
},
"endpoint_url": "https://api.transcodely.com/ingest/ing_a1b2c3d4e5f6",
"secret_prefix": "ings_a1b",
"secret_hint": "z9y8",
"secret_rotated_at": null,
"previous_secret_expires_at": null,
"events_received": "42",
"jobs_created": "40",
"last_event_at": "2026-12-03T17:42:10Z",
"created_at": "2026-11-20T09:00:00Z",
"updated_at": "2026-11-20T09:00:00Z"
}Filters
Every filter that is set must pass. An object that fails one is recorded as skipped, never as an error.
| Field | Type | Description |
|---|---|---|
prefix | string | Object key prefix, for example uploads/, matched against the URL-decoded key. Up to 1024 characters. |
suffixes | array | Case-insensitive key endings, for example [".mp4", ".mov"]. Up to 20. Empty accepts every extension. |
content_types | array | Exact content types, for example ["video/mp4"]. Up to 20. Empty accepts every type, including an event that reports none. |
min_bytes | integer | Smallest object to act on, in bytes. 0 means no lower bound. Useful against the zero-byte placeholder some clients write first. |
max_bytes | integer | Largest object to act on, in bytes. 0 means no upper bound. Otherwise it must be at least min_bytes. |
Action
The part of a job request that can be decided ahead of time. The input comes from the event: the rule’s origin and the object’s key.
| Field | Type | Description |
|---|---|---|
outputs | array | Output specifications, as on a job. At least one, at most 10. Presets by id or slug. |
managed | boolean | Deliver to Transcodely hosting and create a hosted video. Set this or output_origin_id, not both. |
output_origin_id | string | Your own origin to write to, with write permission. |
output_path_template | string | As on a job, plus {input_key}, {input_name} (the key’s last segment without its extension) and {input_dir}. Must not start with / or contain ... |
thumbnails | array | Thumbnail specifications, as on a job. At most 5. |
priority | string | One of: economy, standard, premium. |
metadata | object | Copied onto every job. The rule adds ingest_rule_id and ingest_object_key itself. Keys starting with transcodely_ are refused. |
The StorageEvent object
One delivery from your storage provider, and what came of it.
| Attribute | Type | Description |
|---|---|---|
id | string | Prefixed with sev_. |
rule_id | string | The rule that received it. |
app_id | string | The app that owns the rule. |
bucket | string | The bucket, as the provider reported it. |
object_key | string | The object key, URL-decoded. |
etag | string | The object’s version identity, used for deduplication. Empty when the provider sent none. |
size_bytes | string | Object size, when the event reported one. |
content_type | string | Content type, when the event reported one. |
source | string | One of: s3_sns, gcs_pubsub, supabase, generic. Detected from the payload. |
status | string | One of: received, matched, skipped, created, failed. |
reason | string | For skipped and failed: filter_prefix, filter_suffix, filter_content_type, filter_size, bucket_mismatch, rule_disabled, duplicate, reserved_object (the object Transcodely writes under the origin’s base path to validate it, .transcodely-validation or an older .transcodely-validation-<timestamp>, never ingested whatever the filters), or the API error code that refused the job, such as limit_exceeded. |
job_id | string | The job created from the event, if one was. |
received_at | string | When the event was accepted. |
processed_at | string | When it reached a final status. null until then. |
An object is identified by rule, bucket, key and etag, and produces one job however often it is delivered. Re-sending an event or re-uploading the same bytes is recorded as duplicate; use Replay an event to give an object another pass.
Create an ingest rule
POST /transcodely.v1.IngestRuleService/CreateParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
origin_id | string | Yes | The origin to watch (ori_ prefix). Must be active and have read permission. |
name | string | Yes | 1 to 255 characters. |
filters | object | No | See Filters. Omit to act on everything in the bucket. |
action | object | Yes | See Action. At least one output and exactly one of managed or output_origin_id. |
enabled | boolean | No | Default true. Send false to create it paused and turn it on once the sender is set up. |
app_id | string | No | API-key callers may omit it (their key’s app is used). Dashboard sessions pass it to choose the app; omitted, the organization’s first active app is used. |
Returns
The rule in rule and its inbound secret, returned only here.
curl -X POST https://api.transcodely.com/transcodely.v1.IngestRuleService/Create
-H "Authorization: Bearer ak_your_api_key"
-H "Content-Type: application/json"
-d '{
"origin_id": "ori_a1b2c3d4e5f6",
"name": "Watch uploads/",
"filters": { "prefix": "uploads/", "suffixes": [".mp4", ".mov"], "min_bytes": 1024 },
"action": { "outputs": [{ "preset": "pst_x9y8z7w6v5" }], "managed": true }
}'const { rule, secret } = await client.ingestRules.create({
originId: "ori_a1b2c3d4e5f6",
name: "Watch uploads/",
filters: { prefix: "uploads/", suffixes: [".mp4", ".mov"], minBytes: 1024n },
action: { outputs: [{ preset: "pst_x9y8z7w6v5" }], managed: true },
});
console.log(rule?.endpointUrl, secret); // store the secret nowcreated = client.ingest_rules.create(
origin_id="ori_a1b2c3d4e5f6",
name="Watch uploads/",
filters={"prefix": "uploads/", "suffixes": [".mp4", ".mov"], "min_bytes": 1024},
action={"outputs": [{"preset": "pst_x9y8z7w6v5"}], "managed": True},
)
print(created.rule.endpoint_url, created.secret) # store the secret nowcreated, err := client.IngestRules.Create(ctx, &transcodely.IngestRuleCreateParams{
OriginId: "ori_a1b2c3d4e5f6",
Name: "Watch uploads/",
Filters: &transcodely.IngestRuleFilters{
Prefix: "uploads/",
Suffixes: []string{".mp4", ".mov"},
MinBytes: 1024,
},
Action: &transcodely.IngestRuleAction{
Outputs: []*transcodely.OutputSpec{{Preset: proto.String("pst_x9y8z7w6v5")}},
Managed: true,
},
})
// created.Rule.GetEndpointUrl(), created.Secret: store the secret now{
"rule": {
"id": "ing_a1b2c3d4e5f6",
"app_id": "app_k1l2m3n4o5",
"origin_id": "ori_a1b2c3d4e5f6",
"name": "Watch uploads/",
"enabled": true,
"endpoint_url": "https://api.transcodely.com/ingest/ing_a1b2c3d4e5f6",
"secret_prefix": "ings_a1b",
"secret_hint": "z9y8",
"events_received": "0",
"jobs_created": "0",
"last_event_at": null,
"created_at": "2026-11-20T09:00:00Z",
"updated_at": "2026-11-20T09:00:00Z"
},
"secret": "ings_a1b2c3d4e5f6g7h8i9j0z9y8"
}An origin without read permission is refused with failed_precondition and error code origin_not_readable.
Retrieve an ingest rule
POST /transcodely.v1.IngestRuleService/GetParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The rule (ing_ prefix). |
Returns
The rule in rule, without its secret.
curl -X POST https://api.transcodely.com/transcodely.v1.IngestRuleService/Get
-H "Authorization: Bearer ak_your_api_key"
-H "Content-Type: application/json"
-d '{"id": "ing_a1b2c3d4e5f6"}'const rule = await client.ingestRules.get("ing_a1b2c3d4e5f6");rule = client.ingest_rules.get("ing_a1b2c3d4e5f6")rule, err := client.IngestRules.Get(ctx, "ing_a1b2c3d4e5f6")List ingest rules
Lists rules, newest first.
POST /transcodely.v1.IngestRuleService/ListParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
origin_id | string | No | Only rules on this origin. |
enabled | boolean | No | Only enabled, or only disabled, rules. |
pagination | object | No | limit (default 50, at most 100) and cursor, the previous response’s next_cursor, sent with the same filters. offset applies only when no cursor is sent. |
app_id | string | No | API-key callers may omit it. Dashboard sessions that omit it get every app in the organization. |
Returns
rules, pagination.next_cursor (empty on the last page) and pagination.total_count. Pass next_cursor back unchanged, with the same filters, for the next page; the SDKs’ auto-paging does this for you. A cursor issued for other filters or another app is refused with invalid_argument. See Pagination.
curl -X POST https://api.transcodely.com/transcodely.v1.IngestRuleService/List
-H "Authorization: Bearer ak_your_api_key"
-H "Content-Type: application/json"
-d '{"enabled": true, "pagination": {"limit": 50, "offset": 0}}'const page = await client.ingestRules.list({ enabled: true, pagination: { limit: 50, offset: 0 } });
for (const rule of page.items) console.log(rule.id, rule.name);for rule in client.ingest_rules.list(enabled=True, limit=50):
print(rule.id, rule.name)iter := client.IngestRules.List(ctx, &transcodely.IngestRuleListParams{Enabled: proto.Bool(true)})
for iter.Next() {
fmt.Println(iter.Current().GetId())
}{
"rules": [
{
"id": "ing_a1b2c3d4e5f6",
"app_id": "app_k1l2m3n4o5",
"origin_id": "ori_a1b2c3d4e5f6",
"name": "Watch uploads/",
"enabled": true,
"endpoint_url": "https://api.transcodely.com/ingest/ing_a1b2c3d4e5f6"
}
],
"pagination": { "next_cursor": "", "total_count": "1" }
}Update an ingest rule
Changes only what the request carries. A filter you send replaces that filter and the others keep their values; the same for each part of the action. List and map fields (outputs, suffixes, metadata, …) are replaced whole.
POST /transcodely.v1.IngestRuleService/UpdateParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The rule (ing_ prefix). |
name | string | No | New name. |
enabled | boolean | No | Pause or resume. Resuming reports how many events were skipped while paused. |
filters | object | No | Filters to change. |
action | object | No | Parts of the action to change. Send managed: true or output_origin_id to move the outputs, never both. managed: false changes nothing. |
rotate_secret | boolean | No | Issue a new secret. The previous one keeps working for 24 hours. |
clear_filters | boolean | No | Empty the filter set before applying filters. Alone, it widens the rule to the whole bucket. |
clear_action | boolean | No | Replace the action outright. action must then be complete: at least one output and exactly one destination. This is how thumbnails or metadata are removed. |
Returns
The rule in rule; the new secret when rotate_secret was set (returned only here); and events_skipped_while_disabled, the number of objects declined while the rule was paused, when the update turned it back on. Those can be replayed.
curl -X POST https://api.transcodely.com/transcodely.v1.IngestRuleService/Update
-H "Authorization: Bearer ak_your_api_key"
-H "Content-Type: application/json"
-d '{"id": "ing_a1b2c3d4e5f6", "filters": {"prefix": "raw/"}}'const { rule } = await client.ingestRules.update({ id: "ing_a1b2c3d4e5f6", filters: { prefix: "raw/" } });updated = client.ingest_rules.update(id="ing_a1b2c3d4e5f6", filters={"prefix": "raw/"})updated, err := client.IngestRules.Update(ctx, &transcodely.IngestRuleUpdateParams{
Id: "ing_a1b2c3d4e5f6",
Filters: &transcodely.IngestRuleFilters{Prefix: "raw/"},
})Delete an ingest rule
Deletes the rule. Its endpoint stops accepting events at once. The events it already received are kept.
POST /transcodely.v1.IngestRuleService/DeleteParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The rule (ing_ prefix). |
Returns
The rule as it was, in rule.
curl -X POST https://api.transcodely.com/transcodely.v1.IngestRuleService/Delete
-H "Authorization: Bearer ak_your_api_key"
-H "Content-Type: application/json"
-d '{"id": "ing_a1b2c3d4e5f6"}'const deleted = await client.ingestRules.delete("ing_a1b2c3d4e5f6");deleted = client.ingest_rules.delete("ing_a1b2c3d4e5f6")deleted, err := client.IngestRules.Delete(ctx, "ing_a1b2c3d4e5f6")List events
Lists the storage events a rule, or every rule in scope, received, newest first, with the outcome of each.
POST /transcodely.v1.IngestRuleService/ListEventsParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
rule_id | string | No | Only events of this rule. |
status | string | No | Only events with this status: received, matched, skipped, created or failed. |
pagination | object | No | limit (default 50, at most 100) and cursor, as with List ingest rules. offset applies only when no cursor is sent. |
app_id | string | No | API-key callers may omit it. Dashboard sessions that omit it get every app in the organization. |
Returns
events, and pagination.total_count.
curl -X POST https://api.transcodely.com/transcodely.v1.IngestRuleService/ListEvents
-H "Authorization: Bearer ak_your_api_key"
-H "Content-Type: application/json"
-d '{"rule_id": "ing_a1b2c3d4e5f6", "status": "skipped"}'import { StorageEventStatus } from "@transcodely/sdk";
const page = await client.ingestRules.listEvents({ ruleId: "ing_a1b2c3d4e5f6", status: StorageEventStatus.SKIPPED });
for (const event of page.items) console.log(event.id, event.objectKey, event.reason);for event in client.ingest_rules.list_events(rule_id="ing_a1b2c3d4e5f6", status="skipped"):
print(event.id, event.object_key, event.reason)iter := client.IngestRules.ListEvents(ctx, &transcodely.IngestEventListParams{RuleId: proto.String("ing_a1b2c3d4e5f6")})
for iter.Next() {
event := iter.Current()
fmt.Println(event.GetId(), event.GetObjectKey(), event.GetReason())
}{
"events": [
{
"id": "sev_a1b2c3d4e5f6g7",
"rule_id": "ing_a1b2c3d4e5f6",
"app_id": "app_k1l2m3n4o5",
"bucket": "my-uploads",
"object_key": "uploads/notes.txt",
"etag": "9b2cf535f27731c974343645a3985328",
"size_bytes": "2048",
"content_type": "text/plain",
"source": "s3_sns",
"status": "skipped",
"reason": "filter_suffix",
"job_id": "",
"received_at": "2026-12-03T17:42:10Z",
"processed_at": "2026-12-03T17:42:10Z"
}
],
"pagination": { "next_cursor": "", "total_count": "1" }
}Test a rule
Dry-runs an object key against a rule: whether its filters match and, when they do, the exact job request the rule would submit. Nothing is stored and no job is created.
POST /transcodely.v1.IngestRuleService/TestParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The rule (ing_ prefix). |
object_key | string | Yes | The key to test, for example uploads/clip.mp4. |
bucket | string | No | Omit to use the rule’s origin bucket. |
size_bytes | integer | No | For the size filters. 0 means unspecified, not an empty file. |
content_type | string | No | For the content-type filter. |
etag | string | No | Changes no filter decision. Supply it to see the idempotency key the real job will carry. |
Returns
matched; reason when it would not match (same values as an event’s reason); and job_request, the job that would be created, when it would.
curl -X POST https://api.transcodely.com/transcodely.v1.IngestRuleService/Test
-H "Authorization: Bearer ak_your_api_key"
-H "Content-Type: application/json"
-d '{"id": "ing_a1b2c3d4e5f6", "object_key": "uploads/clip.mp4", "size_bytes": 52428800}'const result = await client.ingestRules.test({ id: "ing_a1b2c3d4e5f6", objectKey: "uploads/clip.mp4", sizeBytes: 52428800n });
console.log(result.matched, result.reason, result.jobRequest?.inputPath);result = client.ingest_rules.test(id="ing_a1b2c3d4e5f6", object_key="uploads/clip.mp4", size_bytes=52428800)result, err := client.IngestRules.Test(ctx, &transcodely.IngestRuleTestParams{
Id: "ing_a1b2c3d4e5f6",
ObjectKey: "uploads/clip.mp4",
SizeBytes: 52428800,
}){
"matched": true,
"reason": "",
"job_request": {
"input_origin_id": "ori_a1b2c3d4e5f6",
"input_path": "uploads/clip.mp4",
"outputs": [{ "preset": "pst_x9y8z7w6v5" }],
"managed": true,
"priority": "standard",
"metadata": { "ingest_rule_id": "ing_a1b2c3d4e5f6", "ingest_object_key": "uploads/clip.mp4" },
"idempotency_key": "ingest_4f6c2a…",
"app_id": "app_k1l2m3n4o5"
}
}Replay an event
Re-queues a skipped or failed event so the object gets one more pass through the rule: for example one that arrived while the rule was paused, or was refused while the account was over its spend limit. The event is reset, not copied, so it keeps its id.
POST /transcodely.v1.IngestRuleService/ReplayEventParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id | string | Yes | The event (sev_ prefix). |
Returns
The event in event, back in received.
An event that is not skipped or failed is refused with failed_precondition and error code storage_event_not_replayable.
curl -X POST https://api.transcodely.com/transcodely.v1.IngestRuleService/ReplayEvent
-H "Authorization: Bearer ak_your_api_key"
-H "Content-Type: application/json"
-d '{"event_id": "sev_a1b2c3d4e5f6g7"}'const event = await client.ingestRules.replayEvent("sev_a1b2c3d4e5f6g7");event = client.ingest_rules.replay_event("sev_a1b2c3d4e5f6g7")event, err := client.IngestRules.ReplayEvent(ctx, "sev_a1b2c3d4e5f6g7")Errors
| Connect code | Error code | Cause |
|---|---|---|
not_found | ingest_rule_not_found | The ing_ does not exist or belongs to another app. |
not_found | storage_event_not_found | The sev_ does not exist or belongs to another app. |
failed_precondition | origin_not_readable | The origin does not have read permission. |
failed_precondition | storage_event_not_replayable | Only skipped and failed events can be replayed. |
invalid_argument | A field failed validation, for example max_bytes below min_bytes, both managed and output_origin_id, or a metadata key starting with transcodely_. | |
permission_denied | A dashboard session with the viewer role tried to change something, or an API key named another app. |