Update a warehouse source

Updates an existing Warehouse source. Only provided parameters will be changed.

PATCH https://warehouse.betterstack.com/api/v1/sources/{id}

URL parameters

id
required string

Headers

Authorization
required string
Content-Type
required string

Body parameters

name
string
events_retention
integer
time_series_retention
integer
live_tail_pattern
string
vrl_transformation
string
ingesting_paused
boolean
200

Response body

{
  "data": {
    "id": "5678",
    "type": "warehouse_source",
    "attributes": {
      "warehouse_source_group_id": 1234,
      "team_id": 123456,
      "team_name": "example-team",
      "name": "User Events Updated",
      "table_name": "warehouse_test",
      "token": "abc123def456ghi789jkl012",
      "ingesting_paused": true,
      "ingesting_host": "s5678.us-east-9.betterstackdata.com",
      "created_at": "2025-10-06T09:24:10Z",
      "updated_at": "2025-10-21T16:38:50Z",
      "events_retention": 90,
      "time_series_retention": 180,
      "live_tail_pattern": "{status} {message}",
      "data_region": "eu-nbg-2",
      "custom_bucket": null,
      "vrl_transformation": ""
    }
  }
}
401

Response body

{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/logs/api/getting-started/#obtaining-a-logtail-api-token"
}
404

Response body

{
  "errors": "Resource with the provided ID was not found"
}
422

Response body

{
  "errors": "Sorry, you are missing some required attributes",
  "required_attributes": [
    "name"
  ]
}

Example cURL

Example
curl --request PATCH \
  --url https://warehouse.betterstack.com/api/v1/sources/5678 \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "User Events Updated",
    "ingesting_paused": true
  }'