Wait For Delivery
wait_for_deliveryBlock until a delivery completes or fails. Call this immediately after deliver_audience or deliver_file_match when the response has status: "processing". Polls GET /v1/audiences/{audience_id}/deliveries/{delivery_id} every 15 seconds. On success returns the full delivery object including download_urls[] — share these directly with the user. Each signed link is valid for 24 hours; expires_at is the delivery artifact retention date, not the link expiry. Call get_delivery for a fresh link while the artifact remains available. Throws DELIVERY_FAILED if the export failed (check failure_reason), or DELIVERY_TIMEOUT if it did not finish within timeout_seconds (default 30 seconds). A wait timeout does not cancel or fail the job; use the corresponding get tool to check it again. Requires 'discovery' scope.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"audience_id": "<audience_id>",
"delivery_id": "<delivery_id>"
},
"name": "wait_for_delivery"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audience_id | Yes | Audience ID returned by the delivery or file-match job; do not assume it equals match_id or segment_id | |
| delivery_id | Yes | Delivery ID returned by deliver_audience or deliver_file_match | |
| timeout_seconds | No | Maximum seconds to wait (default 30). Prefer get_delivery for a single status check; a wait timeout is not an export failure. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | Current delivery state | |
| guidance | No | Interpretation or recovery guidance for this result | |
| count_unit | No | ||
| page_count | No | Number of objects on this page, not the organization total | |
| count_state | No | Unknown means no count; available does not guarantee freshness. Recount for a current value. | |
| next_actions | No | Suggested next calls using returned IDs and available scopes. Not executed and not user consent. | |
| download_urls | No | Fresh signed artifact URLs on an individual completed download delivery | |
| population_input | No | Population input used for the preview; IDs refer to their current saved definitions |