Create Target
Create a new target to your endpoint, which can be used in executions.
Required permission:
action.target.write
application/json- body
name*nametimeout?timeoutTimeout 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.
durationendpoint*endpointThe URL of the endpoint to call.
payloadType?payload_typePayload 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.
"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".
Success
application/json- response
id?idThe unique identifier of the newly created target.
creationDate?creation_dateThe timestamp of the target creation.
date-timesigningKey?signing_keyKey used to sign and check payload sent to the target.
The key can be used to verify the integrity and authenticity of the request
on the receiver side. The key should be treated as a secret and only known to Zitadel and the receiver.
The signature is included in the request header X-ZITADEL-Signature
and calculated over the raw body of the request using HMAC with SHA256.
curl -X POST 'https://example.com/v2/actions/targets' \ -H 'Content-Type: application/json' \ -d '{ "restAsync": {}}'{ "id": "string", "creationDate": "2023-01-15T01:30:15.01Z", "signingKey": "string"}Was this page helpful?
Add Public Key
Add Public Key: Adds a public key to the target for payload encryption. The public key is used to encrypt the payload sent to the target when the payload type is set to `PAYLOAD_TYPE_JWE`. The public key must be i...
Deactivate Public Key
Deactivate Public Key: Deactivates the public key for payload encryption. The public key will no longer be used to encrypt payloads sent to the target. Be aware that deactivating the active key will leave the target with...
