Create Target
POSThttps://$CUSTOM-DOMAIN/v2beta/actions/targets
Create a new target to your endpoint, which can be used in executions.
Required permission:
action.target.write
Required feature flag:
actions
Request​
- application/json
- application/grpc
- application/grpc-web+proto
Body
required
Possible values: non-empty
and <= 1000 characters
restWebhook
object
restCall
object
Call is executed in parallel to others, ZITADEL does not wait until the call is finished. The state is ignored, call is sent as post.
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.
Possible values: non-empty
and <= 1000 characters
Body
required
Possible values: non-empty
and <= 1000 characters
restWebhook
object
restCall
object
Call is executed in parallel to others, ZITADEL does not wait until the call is finished. The state is ignored, call is sent as post.
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.
Possible values: non-empty
and <= 1000 characters
Body
required
Possible values: non-empty
and <= 1000 characters
restWebhook
object
restCall
object
Call is executed in parallel to others, ZITADEL does not wait until the call is finished. The state is ignored, call is sent as post.
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.
Possible values: non-empty
and <= 1000 characters
Responses​
- 200
- 400
- 403
- 404
- 409
- default
Target created successfully
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
The unique identifier of the newly created target.
The timestamp of the target creation.
Key used to sign and check payload sent to the target.
{
"id": "69629012906488334",
"creationDate": "2024-12-18T07:50:47.492Z",
"signingKey": "98KmsU67"
}
- Schema
- Example (from schema)
Schema
The unique identifier of the newly created target.
The timestamp of the target creation.
Key used to sign and check payload sent to the target.
{
"id": "69629012906488334",
"creationDate": "2024-12-18T07:50:47.492Z",
"signingKey": "98KmsU67"
}
- Schema
- Example (from schema)
Schema
The unique identifier of the newly created target.
The timestamp of the target creation.
Key used to sign and check payload sent to the target.
{
"id": "69629012906488334",
"creationDate": "2024-12-18T07:50:47.492Z",
"signingKey": "98KmsU67"
}
The feature flag actions
is not enabled.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
Schema
any
- Schema
Schema
any
- Schema
Schema
any
Returned when the user does not have permission to access the resource.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the resource does not exist.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
The target to create already exists.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
Schema
any
- Schema
Schema
any
- Schema
Schema
any
An unexpected error response.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://$CUSTOM-DOMAIN/v2beta/actions/targets' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"name": "ip_allow_list",
"restWebhook": {
"interruptOnError": true
},
"timeout": "10s",
"endpoint": "https://example.com/hooks/ip_check"
}'