---
title: "Modify service configuration"
method: PATCH
path: "/services/{service}"
tags: ["service"]
---

# Modify service configuration

`PATCH /services/{service}`

Updates the configuration of a registered service, such as public visibility, retention policies, and timeout settings.
Note: Service re-discovery will update these settings based on the service endpoint configuration.

## Path parameters

- `service` string, required

## Request body

- ModifyServiceRequest
  - `abort_timeout` string, nullable — # Abort timeout This timer guards against stalled service/handler invocations that are supposed to terminate. The abort timeout is started after the 'inactivity timeout' has expired and the service/handler invocation has been asked to gracefully terminate. Once the timer expires, it will abort the service/handler invocation. This timer potentially **interrupts** user code. If the user code needs longer to gracefully terminate, then this value needs to be set accordingly. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`. This overrides the default abort timeout set in invoker options.
  - `idempotency_retention` string, nullable — # Idempotency retention Modify the retention of idempotent requests for this service. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`.
  - `inactivity_timeout` string, nullable — # Inactivity timeout This timer guards against stalled service/handler invocations. Once it expires, Restate triggers a graceful termination by asking the service invocation to suspend (which preserves intermediate progress). The 'abort timeout' is used to abort the invocation, in case it doesn't react to the request to suspend. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`. This overrides the default inactivity timeout set in invoker options.
  - `journal_retention` string, nullable — # Journal retention Modify the journal retention for this service. When set, this applies to all requests to all handlers of this service. In case the invocation has an idempotency key, the `idempotency_retention` caps the maximum `journal_retention` time. In case the invocation targets a workflow handler, the `workflow_completion_retention` caps the maximum `journal_retention` time. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`.
  - `public` boolean, nullable — # Public If true, the service can be invoked through the ingress. If false, the service can be invoked only from another Restate service.
  - `workflow_completion_retention` string, nullable — # Workflow completion retention Modify the retention of the workflow completion. This can be modified only for workflow services! Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`.

## Response `200`

Service configuration updated successfully

- ServiceMetadata — Metadata of a registered service.
  - `abort_timeout` string — # Abort timeout This timer guards against stalled service/handler invocations that are supposed to terminate. The abort timeout is started after the 'inactivity timeout' has expired and the service/handler invocation has been asked to gracefully terminate. Once the timer expires, it will abort the service/handler invocation. This timer potentially **interrupts** user code. If the user code needs longer to gracefully terminate, then this value needs to be set accordingly. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`. If unset, this returns the default abort timeout configured in invoker options.
  - `deployment_id` string, required
  - `documentation` string, nullable — # Documentation Documentation of the service, as propagated by the SDKs.
  - `enable_lazy_state` boolean — # Enable lazy state If true, lazy state will be enabled for all invocations to this service. This is relevant only for Workflows and Virtual Objects.
  - `handlers` HandlerMetadata[], required — # Handlers Handlers for this service.
    - `abort_timeout` string, nullable — # Abort timeout This timer guards against stalled service/handler invocations that are supposed to terminate. The abort timeout is started after the 'inactivity timeout' has expired and the service/handler invocation has been asked to gracefully terminate. Once the timer expires, it will abort the service/handler invocation. This timer potentially **interrupts** user code. If the user code needs longer to gracefully terminate, then this value needs to be set accordingly. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`. If set, it overrides the value set in the service.
    - `documentation` string, nullable — # Documentation Documentation of the handler, as propagated by the SDKs.
    - `enable_lazy_state` boolean, nullable — # Enable lazy state If true, lazy state will be enabled for all invocations to this service. This is relevant only for Workflows and Virtual Objects. If set, it overrides the value set in the service.
    - `idempotency_retention` string, nullable — # Idempotency retention The retention duration of idempotent requests for this handler. If set, it overrides the value set in the service. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`.
    - `inactivity_timeout` string, nullable — # Inactivity timeout This timer guards against stalled service/handler invocations. Once it expires, Restate triggers a graceful termination by asking the service invocation to suspend (which preserves intermediate progress). The 'abort timeout' is used to abort the invocation, in case it doesn't react to the request to suspend. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`. If set, it overrides the value set in the service.
    - `info` SchemaInfo[] — # Info List of configuration/deprecation information related to this handler.
      - `code` string, nullable
      - `message` string, required
    - `input_description` string, required — # Human readable input description If empty, no schema was provided by the user at discovery time.
    - `input_json_schema` unknown
    - `journal_retention` string, nullable — # Journal retention The journal retention. When set, this applies to all requests to this handler. In case the invocation has an idempotency key, the `idempotency_retention` caps the maximum `journal_retention` time. In case this handler is a workflow handler, the `workflow_completion_retention` caps the maximum `journal_retention` time. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`. If set, it overrides the value set in the service.
    - `metadata` object — # Metadata Additional handler metadata, as propagated by the SDKs.
    - `name` string, required — # Name The handler name.
    - `output_description` string, required — # Human readable output description If empty, no schema was provided by the user at discovery time.
    - `output_json_schema` unknown
    - `public` boolean — # Public If true, this handler can be invoked through the ingress. If false, this handler can be invoked only from another Restate service.
    - `retry_policy` HandlerRetryPolicyMetadata — # Handler retry policy overrides
      - `exponentiation_factor` number, float, nullable — # Factor The factor to use to compute the next retry attempt.
      - `initial_interval` string, nullable — # Initial Interval Initial interval for the first retry attempt. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`.
      - `max_attempts` integer, nullable — # Max attempts Number of maximum attempts (including the initial) before giving up. Infinite retries if unset. No retries if set to 1.
      - `max_interval` string, nullable — # Max interval Maximum interval between retries. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`.
      - `on_max_attempts` 'Pause' | 'Kill'
    - `ty` 'Exclusive' | 'Shared' | 'Workflow'
  - `idempotency_retention` string — # Idempotency retention The retention duration of idempotent requests for this service. If not configured, this returns the default idempotency retention. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`.
  - `inactivity_timeout` string — # Inactivity timeout This timer guards against stalled service/handler invocations. Once it expires, Restate triggers a graceful termination by asking the service invocation to suspend (which preserves intermediate progress). The 'abort timeout' is used to abort the invocation, in case it doesn't react to the request to suspend. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`. If unset, this returns the default inactivity timeout configured in invoker options.
  - `info` SchemaInfo[] — # Info List of configuration/deprecation information related to this service.
    - `code` string, nullable
    - `message` string, required
  - `journal_retention` string, nullable — # Journal retention The journal retention. When set, this applies to all requests to all handlers of this service. In case the invocation has an idempotency key, the `idempotency_retention` caps the maximum `journal_retention` time. In case the invocation targets a workflow handler, the `workflow_completion_retention` caps the maximum `journal_retention` time. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`.
  - `metadata` object — # Metadata Additional service metadata, as propagated by the SDKs.
  - `name` string, required — # Name Fully qualified name of the service
  - `public` boolean — # Public If true, the service can be invoked through the ingress. If false, the service can be invoked only from another Restate service.
  - `retry_policy` ServiceRetryPolicyMetadata — # Service retry policy
    - `exponentiation_factor` number, float — # Factor The factor to use to compute the next retry attempt. Default: `2.0`.
    - `initial_interval` string — # Initial Interval Initial interval for the first retry attempt. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`.
    - `max_attempts` integer, nullable — # Max attempts Number of maximum attempts (including the initial) before giving up. Infinite retries if unset. No retries if set to 1.
    - `max_interval` string, nullable — # Max interval Maximum interval between retries. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`.
    - `on_max_attempts` 'Pause' | 'Kill'
  - `revision` integer, required
  - `ty` 'Service' | 'VirtualObject' | 'Workflow', required
  - `workflow_completion_retention` string, nullable — # Workflow completion retention The retention duration of workflows. Only available on workflow services. Can be configured using the [`jiff::fmt::friendly`](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) format or ISO8601, for example `5 hours`.

## Other responses

- `400` — Bad request
- `404` — Not found
- `405` — Method not allowed
- `409` — Conflict
- `500` — Internal server error

## Changes

> 8 revisions in range; 1 could not be searched.

- **2026-01-30** `059a44500a5c` — 12 breaking, 3 warning, 30 info
  - the request property `abort_timeout` became not nullable
  - the request property `idempotency_retention` became not nullable
  - the request property `inactivity_timeout` became not nullable
  - the request property `journal_retention` became not nullable
  - …41 more

[Change history](https://skmtc.dev/restatedev/apis/admin-api/changes/services/:service/patch.md)

---

[API](https://skmtc.dev/restatedev/apis/admin-api.md) · [All operations](https://skmtc.dev/restatedev/apis/admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/restatedev/admin-api/revisions/5361f4818c71/schema)
