Skip to main content

Create Target

POST 

https://$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​

Body

required

    name string

    Possible values: non-empty and <= 1000 characters

    restWebhook

    object

    Wait for response but response body is ignored, status is checked, call is sent as post.

    interruptOnError boolean

    Define if any error stops the whole execution. By default the process continues as normal.

    restCall

    object

    Wait for response and response body is used, status is checked, call is sent as post.

    interruptOnError boolean

    Define if any error stops the whole execution. By default the process continues as normal.

    restAsync 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 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.

    endpoint string

    Possible values: non-empty and <= 1000 characters

Responses​

Target created successfully

Schema

    id string

    The unique identifier of the newly created target.

    creationDate date-time

    The timestamp of the target creation.

    signingKey string

    Key used to sign and check payload sent to the target.

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"
}'
Request Collapse all
Base URL
https://$CUSTOM-DOMAIN
Auth
Body required
{
  "name": "ip_allow_list",
  "restWebhook": {
    "interruptOnError": true
  },
  "timeout": "10s",
  "endpoint": "https://example.com/hooks/ip_check"
}
ResponseClear

Click the Send API Request button above and see the response here!