Update

  • PATCH
  • /workspaces
  • /:workspace
  • /distributions
  • /:distribution_id

Update distribution configuration

Request

REQUIRED SCOPES
DISTRIBUTION_MANAGE
URL PARAMETERS
workspacerequiredstring
The human-readable ID of the workspace

Example: "my-company"

distribution_idrequiredstring
The ID of the distribution

Example: "nZrnl40Y"

GET PARAMETERS
project_namestring
Project name to filter distributions

Example: "my-project"

environment_idstring
Environment ID to filter distributions

Example: "3a4KbBQl"

BODY PARAMETERS
namestring
The name of the distribution
identifierstring
A human-readable ID of the distribution. Alphanumeric characters, underscores, and hyphens (hyphens cannot appear at the start or end).
scopestring enum
The scope of the distribution
Allowed enum:
WORKSPACE,
PROJECT,
ENVIRONMENT
project_namestring
The name of the project for the distribution
disabledboolean
Indicates if the distribution is disabled
permissionsPermissionsView
Access permissions configuration

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
idinteger
The ID of the distribution
identifierstring
A human-readable ID of the distribution. Alphanumeric characters, underscores, and hyphens (hyphens cannot appear at the start or end).
namestring
The name of the distribution
disabledboolean
Indicates if the distribution is disabled
scopestring enum
The scope of the distribution
Allowed enum:
WORKSPACE,
PROJECT,
ENVIRONMENT
projectShortProjectView
Short representation of a project
environmentShortEnvironmentView
Short representation of an environment object
routesRouteView[]
The list of routes associated with the distribution
permissionsPermissionsView
Access permissions configuration

Last modified on Jun 29, 2026

Examples

Example: Update distribution

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/distributions/:distribution_id" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated Distribution", "identifier": "updated-distribution" }'

Example: Disable distribution

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/distributions/:distribution_id" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "disabled": true }'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/my-workspace/distributions/rm1P93jG", "html_url": "https://app.buddy.works/my-workspace/-/routing/rm1P93jG/routes", "id": "rm1P93jG", "identifier": "test", "name": "test", "disabled": false, "scope": "WORKSPACE", "routes": [ { "url": "https://api.buddy.works/workspaces/my-workspace/distributions/rm1P93jG/routes/1ObP9zw8", "html_url": "https://app.buddy.works/my-workspace/-/routing/rm1P93jG/route/1ObP9zw8", "id": "1ObP9zw8", "type": "PROXY", "subdomain": "testing3", "domain": "buddy.works", "path": "", "targets": { "Default": { "type": "EXTERNAL", "external_url": "kordos.com" } } }, { "url": "https://api.buddy.works/workspaces/my-workspace/distributions/rm1P93jG/routes/VXb2ZOb3", "html_url": "https://app.buddy.works/my-workspace/-/routing/rm1P93jG/route/VXb2ZOb3", "id": "VXb2ZOb3", "type": "PROXY", "subdomain": "tunnel", "domain": "buddy.works", "path": "", "targets": { "Default": { "type": "TUNNEL", "tunnel": { "id": "bartshoot", "tunnel_id": "test" } } } }, { "url": "https://api.buddy.works/workspaces/my-workspace/distributions/rm1P93jG/routes/JqbOmp06", "html_url": "https://app.buddy.works/my-workspace/-/routing/rm1P93jG/route/JqbOmp06", "id": "JqbOmp06", "type": "PROXY", "subdomain": "asdf", "domain": "buddy.works", "path": "asd", "targets": { "COUNTRY-PL": { "type": "EXTERNAL", "external_url": "testpl.com" }, "CONTINENT-Europe": { "type": "EXTERNAL", "external_url": "testeu.com" }, "Default": { "type": "EXTERNAL", "external_url": "test.com" } } } ], "permissions": { "others": "READ_ONLY", "users": [ { "id": 1, "access_level": "MANAGE" } ] } }
STATUS
200 OK