ZITADEL Docs
APIsCore ResourcesV2Action

UpdateTarget

Update Target

Update an existing target. To generate a new signing key set the optional expirationSigningKey.

Required permission:

  • action.target.write
POST
/v2/actions/targets/{id}

Path Parameters

id*string

The unique identifier of the target to update.

Request Body

application/json

name?string

Optionally, update the name of the target. If not set, the name will not be changed.

timeout?string

Timeout defines the duration until Zitadel cancels the execution. If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on interrupt_on_error following targets will not be called. In case of a rest_async target only this specific target will fail, without any influence on other targets of the same execution. The maximum timeout is 270 seconds or 4.5 minutes. If not set, the timeout will not be changed.

Formatduration
endpoint?string

The new URL of the endpoint to call. If not set, the endpoint will not be changed.

expirationSigningKey?string

Timeout defines the duration until Zitadel cancels the execution. If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on interrupt_on_error following targets will not be called. In case of a rest_async target only this specific target will fail, without any influence on other targets of the same execution. The maximum timeout is 270 seconds or 4.5 minutes. If not set, the timeout will not be changed.

Formatduration
payloadType?string

Payload type defines how the payload is formatted and secured. The default is PAYLOAD_TYPE_JSON, which sends the payload as JSON in the body of the request. For integrity and authenticity a signature is included in the header X-ZITADEL-Signature. You can also choose to send the payload as a JWT (PAYLOAD_TYPE_JWT), which sends the payload as a signed JWT in the body of the request. This allows the receiver to verify the authenticity and integrity of the payload using the signing key. If you need encryption as well, you can choose PAYLOAD_TYPE_JWE, which sends the payload as an encrypted JWT in the body of the request. You can provide your own public key for encryption. If unspecified, the payload type will not be changed.

Value in"PAYLOAD_TYPE_UNSPECIFIED" | "PAYLOAD_TYPE_JSON" | "PAYLOAD_TYPE_JWT" | "PAYLOAD_TYPE_JWE"
restAsync*

The HTTP call to this target will be a POST request. The call is sent asynchronously and Zitadel does not wait for the response. The response of the target is ignored, no status or body is checked. This is typically used for executions of type "events".

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://loading/v2/actions/targets/string" \  -H "Content-Type: application/json" \  -d '{    "restAsync": {}  }'
{
  "changeDate": "1s",
  "signingKey": "string"
}
{
  "code": "not_found",
  "message": "string",
  "detail": {
    "type": "string",
    "value": "string",
    "debug": {}
  }
}

Was this page helpful?