Ir al contenido principal

Update a Stream – Streams REST API

Actualizado el
Jul 31, 2026

Resumen

Updates the configuration of an existing stream. Use this endpoint to modify a stream's name, filter function, destination, destination attributes, extra destinations, batch size, metadata settings, reorg handling, distance-from-tip, notification email, and other configuration options without needing to delete and recreate the stream.

Key capabilities:

  • Change webhook URL or destination credentials
  • Update filter functions on-the-fly
  • Switch compression settings
  • Adjust retry parameters
  • Add or modify extra destinations
  • Update batch size and elastic batching settings

nota

El red, dataset, y region fields cannot be changed after stream creation. To change these, create a new stream instead.

Endpoint

Send a PATCH request to update an existing stream.

PATCH https://api.quicknode.com/streams/rest/v1/streams/{id}

Parámetros de ruta

ParameterTipoObligatorioDescripción
idcadenaThe unique identifier (UUID) of the stream to update

Parámetros de la solicitud

All body parameters are optional. Only include the fields you want to update.

ParameterTipoObligatorioDescripción
nombrecadenaNoA new name for your stream
filter_functioncadenaNoBase64-encoded JavaScript filter function
start_rangeenteroNoStarting block number
fin_rangoenteroNoEnding block number
tamaño_del_lote_del_conjunto_de_datosenteroNoNumber of blocks to batch per delivery
estadocadenaNoactive or paused
elastic_batch_enabledbooleanoNoAuto-adjust batch size to 1 near chain tip
fix_block_reorgsenteroNo1 to enable reorg detection
mantener_distancia_respecto_a_la_puntaenteroNoBlocks to stay behind chain tip
notification_emailcadenaNoEmail for stream termination alerts
destinationcadenaNowebhook, s3, azure, or postgres
destination_attributesobjetoNoConfiguration for selected destination
extra_destinationsmatrizNoAdditional destinations

Destination Attributes

When updating destination attributes, the configuration options vary based on the selected destination type. Select a tab below to view the attributes for each destination.

ParameterTipoObligatorioDescripción
urlcadenaWebhook endpoint URL
compressioncadenanone or gzip
max_retryenteroMax retry attempts
retry_interval_secenteroSeconds between retries
post_timeout_secenteroRequest timeout in seconds
headersobjetoNoCustom headers as key-value pairs
mtlsbooleanoNoEnable mutual TLS: Quicknode authenticates to your endpoint with its client certificate. Requires an HTTPS URL. Send false explicitly to disable. See the Webhook destination page for server setup.
ssl_ca_pemcadenaNoCA certificate (PEM) used to verify your endpoint's server certificate when it is signed by a private CA. Send an empty string to clear.

For mTLS server configuration and how to download the Quicknode CA certificate, see Mutual TLS on the Webhook destination page.

Example Request

curl -X PATCH "https://api.quicknode.com/streams/rest/v1/streams/f6ad6459-b5ad-4183-b370-1c1388e47e83" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"name": "Updated Stream Name",
"destination_attributes": {
"url": "https://new-webhook.site",
"compression": "gzip",
"max_retry": 5,
"retry_interval_sec": 2,
"post_timeout_sec": 15,
"mtls": true
}
}'

Respuesta

On success, the API returns the updated stream object with all configuration and status information.

{
"id": "f6ad6459-b5ad-4183-b370-1c1388e47e83",
"name": "Updated Stream Name",
"network": "ethereum-mainnet",
"dataset": "block",
"region": "usa_east",
"filter_function": "ZnVuY3Rpb24gbWFpbihkYXRhKSB7Li4ufQ==",
"start_range": 100,
"end_range": 200,
"dataset_batch_size": 1,
"elastic_batch_enabled": true,
"fix_block_reorgs": 0,
"keep_distance_from_tip": 0,
"destination": "webhook",
"destination_attributes": {
"url": "https://new-webhook.site",
"compression": "gzip",
"max_retry": 5,
"retry_interval_sec": 2,
"post_timeout_sec": 15,
"mtls": true,
"security_token": "qn_xxxxxxxxxxxxxx"
},
"status": "active",
"sequence": 150,
"current_hash": "0x1234567890abcdef...",
"notification_email": null,
"extra_destinations": [],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T14:00:00Z"
}

Campos de respuesta

CampoTipoDescripción
idcadenaUnique stream identifier (UUID)
nombrecadenaStream name
redcadenaBlockchain network
datasetcadenaDataset type
regioncadenaDeployment region
filter_functioncadenaBase64-encoded filter function (if configured)
start_rangeenteroStarting block number
fin_rangoenteroEnding block number (null for continuous)
tamaño_del_lote_del_conjunto_de_datosenteroNumber of blocks per batch
elastic_batch_enabledbooleanoWhether elastic batching is enabled
fix_block_reorgsenteroReorg detection setting (1 = enabled)
mantener_distancia_respecto_a_la_puntaenteroBlocks to stay behind chain tip
destinationcadenaDestination type (webhook, s3, azure, postgres)
destination_attributesobjetoDestination configuration (varies by type)
estadocadenaStream status (active or paused)
secuenciaenteroLast delivered block from the data range
current_hashcadenaHash of the current block being processed
notification_emailcadenaEmail for stream termination alerts
extra_destinationsmatrizAdditional destinations (if configured)
created_atcadenaStream creation timestamp (ISO 8601)
actualizado_elcadenaLast update timestamp (ISO 8601)
nota

Sensitive fields like secret_key (S3), sas_token (Azure), and password (PostgreSQL) are not returned in the response for security reasons.