Route a completed video
The example matches a signed video.completed event to its job and checks the result URL before delivery.
Let ngram notify your service when a video completes or fails. Verify the signature, match the video ID to the original record, and send completed files and failures to different destinations.
The example matches a signed video.completed event to its job and checks the result URL before delivery.
The receiver gets video.failed with error_code and error, records the failure and acknowledges receipt.
A receiver returns HTTP 503 on its first attempt and HTTP 204 on the retry. Match the same video and version before notifying the customer again.
Keep creation, webhook receipt and customer delivery as separate states in your application.
For one job, include webhook_url and webhook_secret when creating it. For persistent events, POST to /api/v1/webhooks/subscriptions with event_type and a publicly reachable HTTPS target_url. Subscribe separately to video.completed and video.failed; save each returned secret before closing the response.
Use the secret for that endpoint, X-Ngram-Timestamp and the exact raw request body to verify X-Ngram-Signature. Reject an invalid signature or a timestamp more than five minutes from your server clock.
Match video_id to the source record. Persist the event or enqueue work durably, then return a 2xx response within ten seconds. A valid duplicate that is already recorded can be acknowledged without repeating the work.
For video.completed, inspect version_id and result.url before delivery. For video.failed, keep error_code and error with the job and notify the owner. A preview-only completion has no MP4 URL; read the job or export the version.
Keep event verification and durable receipt separate from downstream work.
video.completed carries the delivered result and can include version_id. video.failed carries the job ID and an error code and message. Register a standing subscription for each event type needed.
Subscriptions return their signing secret only when created. For a job-specific callback, supply webhook_secret to receive signed events. Signatures cover the timestamp, a period and the raw body.
A timeout or non-2xx response triggers retry attempts. Acknowledge durable receipt promptly and make notifications or file placement idempotent in your own service.
An edit that produces a new version can announce video.completed again under the same video_id. Use video_id plus version_id to distinguish the new result from an earlier delivery.
Use a webhook for asynchronous jobs whose outcomes must reach another system. A one-off operator can read the status directly instead.
Store the source record and video ID at creation. When a signed completion arrives, match the job, check the file, and update that customer’s record once.
Explore the workflowOn video.failed, keep the job ID and reason in the review queue. Resolve the cause before starting another job. There is no finished file to send.
Explore the workflowWhen a new version completes, replace or version the existing delivery according to the customer’s workflow. A retry of the same version should not create another notification.
Explore the workflowA webhook carries a result or error. Use the project in ngram for creative changes before delivering its next version.
When the notification arrives, inspect the visuals in the actual project if review is required.
Explore featureCheck that the delivered version includes the intended narration before sending a customer notice.
See featureUse the stored source brief to review claims in the completed video.
See featureAn edited output may generate another completion event with the same video ID.
See featureReview animated diagrams in the actual file, separate from the receipt.
See featureConfirm that subtitles appear in the file selected for downstream delivery.
See featureCheck the customer-facing version before the portal marks it delivered.
See featureTrack a translated project as a distinct deliverable in the customer record.
See featurePrepare the approved source before submitting the job. The webhook handles the resulting event after creation.
Use these Studio tools to prepare or revise the video when the job needs a creative change.
Assign the job to the team that can validate the source, check the correct customer destination and respond when the job needs attention.
Keep a sample request beside its expected response for developer onboarding.
Match the right customer record with its onboarding video.
Pick the starting surface and the result-handling mechanism independently. A request to create a video and a notification about its result do different jobs.
Create the job in your own application and keep its ID with the source record.
Explore the public APIUse a compatible assistant for creative decisions and revisions in conversation.
Explore MCPStart and route a job through a managed workflow with supported trigger and action fields.
Explore ZapierUse the ngram node when a team already owns conditional routing and workflow operations in n8n.
Explore n8nWebhooks Signed event | Status polling Caller reads | MCP Assistant | Zapier Workflow | |
|---|---|---|---|---|
| Who initiates | ngram on completion or failure | Your server | A person in chat | A trigger in a Zap |
| Result reference | Job and version IDs | Job and version IDs | Project or preview link | Mapped action result |
| Where it fits | Asynchronous delivery | Occasional status reads | A changing creative brief | Managed workflow routing |
| Next step | Authenticate and route the event | Read after the suggested delay | Review in conversation | Continue the configured Zap |
FAQ
Still curious? Read the setup guide
Register a receiver, verify a signature and route completed and failed events before connecting a customer destination.