Skip to content

Create



POST /api/v1/notify_object/create

Overview

Create a workspace notification target and notification configuration.

Before Calling and Usage Steps

Select type and optSet according to the notification method. mailGroup/sms/vms use member or team UUIDs; for bots, obtain the webhook from the platform; HTTP callbacks use url. A successful save only means the notification configuration has been stored; it does not mean the bot or HTTP receiver has received the notification. Example addresses must be replaced with real, usable addresses. After creation, the uuid can be used for alert policies. Duplicate creation fails due to duplicate name; after a timeout, verify using the list first.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or fill: Obtain an OpenAPI Key with permission for this operation from API Key management in the target workspace.

Body Request Parameters

Parameter Type Required Description
permissionSet[*] string A single role, member, or team identifier string; * means object-level operation restrictions are lifted, but API authentication is still required.
Example: wsAdmin
How to obtain or fill: For members, use the account UUID from Workspace Member List; for teams, use the group_ UUID from Member Group List; for roles, use the role UUID from Role List or an existing role identifier (e.g., wsAdmin). Do not enter display names.
optSet.webhook string Callback URL used by bots, Slack, Teams, Google Chat, Jira, and ServiceNow. Jira/ServiceNow must use valid HTTPS and cannot contain URL username/password, fragments, or whitespace. The address is subject to site domain resolution and intranet policies.
Example: https://hooks.example.com/notify
How to obtain or fill: Obtain the callback URL from the bot, Workflow, Jira, or ServiceNow integration configuration on the target platform.
optSet.secret string Optional signing secret for dingTalkRobot/feishuRobot; required for Jira when auth_type=secret. For same-identity updates in Jira, it can be omitted to retain the value; for other bots, it must be included again when replacing optSet.
Example: <robot-or-jira-secret>
How to obtain or fill: Obtain it from the DingTalk/Lark bot signing configuration, or configure it according to the Jira receiver's convention.
optSet.url string Required non-empty callback URL for HTTPRequest/simpleHTTPRequest, subject to domain resolution and intranet policies.
Example: https://receiver.example.com/alerts
How to obtain or fill: Prepare the actual service address that can receive alert HTTP requests.
optSet.to array<string> Array of recipient member/team UUIDs for mailGroup, sms, and vms. The member profile must have the corresponding email address or mobile number configured; this is not an arbitrary array of email/mobile number strings.
Example: ["acnt_example"]
How to obtain or fill: Obtain UUIDs from the member list or member group list.
optSet.to[*] string A single member or team UUID.
Example: acnt_example
How to obtain or fill: Copy the member/team UUID from Workspace Member List or Member Group List.
optSet.refMembers array<string> HTTPRequest/simpleHTTPRequest both accept and validate string arrays, but currently only HTTPRequest actually expands them into refMembersInfo for content parsing; simpleHTTPRequest does not perform this expansion.
Example: ["acnt_example"]
How to obtain or fill: Select the member/team UUIDs to associate from Workspace Member List or Member Group List.
optSet.refMembers[*] string Associated member or team UUID string.
Example: acnt_example
How to obtain or fill: Copy the account/team UUID from Workspace Member List or Member Group List.
optSet.headersConfig object Custom request header configuration. Different from Jira/ServiceNow headers. The read API restores its sensitive values; handle the returned data properly before saving.
Example: {"isOpen": true, "items": [{"key": "X-Notify-Source", "value": "guance", "isSensitive": false}]}
How to obtain or fill: Fill according to the HTTP receiving service's convention; only applies to HTTPRequest/simpleHTTPRequest.
optSet.headersConfig.isOpen boolean When the configuration exists, a boolean value must be provided; custom headers are sent only when true.
Example: true
How to obtain or fill: Use true to enable custom request headers and false to disable them.
optSet.headersConfig.items array<object> When the configuration exists, the array is required, with a maximum of 50 items; entries are also validated when isOpen=false.
Example: [{"key": "X-Notify-Source", "value": "guance", "isSensitive": false}]
How to obtain or fill: Fill in the request header list as required by the receiver; pass [] when not needed.
optSet.headersConfig.items[*] object A single custom request header object.
Example: {"key": "X-Notify-Source", "value": "guance", "isSensitive": false}
How to obtain or fill: Each header uses the three fields key/value/isSensitive.
optSet.headersConfig.items[*].key string Non-empty string, maximum 256 characters after trimming leading and trailing spaces, deduplicated case-insensitively.
Example: X-Notify-Source
How to obtain or fill: Use the HTTP header name specified by the receiver.
optSet.headersConfig.items[*].value string Non-empty string, maximum 4096 characters.
Example: guance
How to obtain or fill: Enter the value required by the receiver; obtain credentials only from controlled configuration.
optSet.headersConfig.items[*].isSensitive boolean Required boolean; values with true are encrypted when saved, and the original value is restored in details and the list.
Example: false
How to obtain or fill: Use true for credentials or other sensitive values.
optSet.bodyTemplate string Only HTTPRequest supports custom request body templates, with a maximum string length of 5120 characters; an empty string or null means not configured, and whitespace-only is not enabled. Saving only validates type and length, not template syntax or variables; actual sending depends on site template capability and must be verified with actual alerts. simpleHTTPRequest does not support non-empty templates.
Example: {"title":"Alert Notification"}
How to obtain or fill: Provide a text template according to the HTTP receiver's convention, and verify placeholders and content format with actual alerts first.
optSet.token string Required non-empty for telegramBot; authentication credential for Jira/ServiceNow when auth_type=bearer.
Example: <telegram-or-bearer-token>
How to obtain or fill: telegramBot uses the Token created in Bot Management; Jira/ServiceNow bearer uses the Token assigned by the receiver.
optSet.chat_id string Required target chat ID string for telegramBot.
Example: -1000000000000
How to obtain or fill: Confirm the chat_id from the target Telegram chat and submit it as a string.
optSet.message_thread_id string Optional topic ID for telegramBot; a string when present.
Example: 123
How to obtain or fill: For Telegram forum topics, obtain it from the target topic when needed.
optSet.auth_type string or null Only Jira/ServiceNow: null generates no separate authentication header; basic, bearer, and api_key are all supported; secret is supported only by Jira. If omitted, Jira defaults to secret and ServiceNow defaults to basic.
Example: bearer
How to obtain or fill: Choose according to the authentication method supported by the Jira or ServiceNow receiver.
optSet.username string Jira/ServiceNow basic authentication username, non-empty, and cannot contain a colon or newline.
Example: notify-integration
How to obtain or fill: Obtain it from the receiver's integration account.
optSet.password string Jira/ServiceNow basic authentication password, non-empty and without newlines; same-identity updates can omit it to retain the value.
Example: <integration-password>
How to obtain or fill: Obtain it from the receiver's integration account.
optSet.api_key_header string Jira/ServiceNow api_key authentication header name; cannot be Content-Type.
Example: X-API-Key
How to obtain or fill: Choose a valid HTTP header name according to the receiver's convention.
optSet.api_key string Jira/ServiceNow api_key authentication credential, non-empty and without newlines.
Example: <integration-api-key>
How to obtain or fill: Generate or obtain an API Key from the receiver.
optSet.headers object Only Jira/ServiceNow. Header names are valid and unique case-insensitively, and values contain no newlines; Content-Type can only be application/json. Same-identity updates omit to retain original headers; {} clears them; values are masked as empty strings on read.
Example: {"X-Source": "guance"}
How to obtain or fill: Provide custom headers as required by the Jira/ServiceNow receiver, with the key as the header name and the value as a string.
optSet.headers. string String value of the custom header. On update, an empty value with the same name can retain the old value for the same identity; new headers cannot have empty values.
Example: guance
How to obtain or fill: Use the actual header name required by the target platform, such as X-Source.
type string Y Required supported notification type that should be non-null; no trigger default value.
Allow null: True
Allowed values: ['dingTalkRobot', 'HTTPRequest', 'wechatRobot', 'mailGroup', 'feishuRobot', 'sms', 'vms', 'simpleHTTPRequest', 'jiraWebhook', 'serviceNowWebhook', 'slackIncomingWebhook', 'teamsWorkflowWebhook', 'googleChatWebhook', 'telegramBot']
Example: HTTPRequest
How to obtain or fill: Choose an enum value according to the target notification platform; HTTPRequest is an HTTP callback and simpleHTTPRequest is a simplified HTTP callback.
name string Y Notification target name. Jira/ServiceNow requires it to be non-empty after trimming and no more than 200 characters; other types are recommended to use a non-empty, recognizable name.
Allow null: False
Example: Production Callback
How to obtain or fill: Search the Notification Target List to rule out duplicate names before filling it in.
optSet json Provide a complete JSON object according to the notification type. It should be explicitly provided on creation; for regular types, modifications replace it entirely, while Jira/ServiceNow retain credentials according to same-identity rules.
Allow null: False
Example: {"url": "https://receiver.example.com/alerts"}
How to obtain or fill: Select the corresponding configuration in the table below by type, and obtain real values from the receiving platform or member list.
openPermissionSet boolean Whether to enable custom operation permissions; defaults to false on creation and is retained when omitted on modification. The creator, Owner, and principals matching advanced configuration may be separately allowed.
Allow null: False
Example: false
How to obtain or fill: By default, API permissions are inherited; when object-level restrictions are needed, set to true and configure permissionSet.
permissionSet array Complete array of custom operable principals; modifications replace it entirely, and [] clears it. The special value * allows all identities that pass API authentication to pass this object-level check; it does not mean anonymous access is allowed.
Allow null: False
Example: ["wsAdmin"]
How to obtain or fill: For members, use the account UUID from Workspace Member List; for teams, use the group_ UUID from Member Group List; for roles, use the role UUID from Role List or an existing role identifier (e.g., wsAdmin). Do not enter display names.

Additional Parameter Notes

Jira/ServiceNow original passwords, API Keys, Tokens, and custom header values are not returned; use has* and credentialsRequired to determine whether they have been configured. Other legacy bots and HTTP configurations may return original sensitive values. Do not forward the complete response content to third parties.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/notify_object/create' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"type":"HTTPRequest","name":"Production Callback","optSet":{"url":"https://receiver.example.com/alerts"}}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content object Saved notification target record; does not include the account summary and permission determination from list/details.
content.id integer or null Database ID; may not yet be assigned in the creation response; use uuid for subsequent operations.
content.uuid string Notification target UUID.
content.workspaceUUID string UUID of the workspace it belongs to.
content.name string Notification target name.
content.type string Notification type. Legacy Jira/ServiceNow storage aliases are normalized to jiraWebhook/serviceNowWebhook.
content.optSet object Notification configuration corresponding to type; see below for specific fields; unconfigured fields may be omitted.
content.openPermissionSet boolean Whether custom operation permissions are enabled for this object.
content.permissionSet array<string> Array of role, member, or team identifiers allowed to operate the object.
content.permissionSet[] string A single permission principal identifier.
content.autoDisableAt integer Automatic disable time, Unix seconds; -1 if not automatically disabled.
content.status integer Record status, 0 enabled, 2 disabled; 3 deleted will not be returned in this query.
content.creator string Creator identity.
content.updator string Most recent updater identity; empty if not updated.
content.createAt integer Creation Unix seconds.
content.updateAt integer Update Unix seconds; -1 if not updated.
content.deleteAt integer Deletion Unix seconds; -1 if not deleted.
content.optSet.webhook string Callback URL used by bots, Slack, Teams, Google Chat, Jira, and ServiceNow. Jira/ServiceNow must use valid HTTPS and cannot contain URL username/password, fragments, or whitespace. The address is subject to site domain resolution and intranet policies.
content.optSet.secret string DingTalk/Lark and other bots may return the original signing secret; Jira does not return the original secret and uses the hasSecret flag instead.
content.optSet.url string Required non-empty callback URL for HTTPRequest/simpleHTTPRequest, subject to domain resolution and intranet policies.
content.optSet.to array<string> Array of recipient member/team UUIDs for mailGroup, sms, and vms. The member profile must have the corresponding email address or mobile number configured; this is not an arbitrary array of email/mobile number strings.
content.optSet.to[] string A single member or team UUID.
content.optSet.refMembers array<string> HTTPRequest/simpleHTTPRequest both accept and validate string arrays, but currently only HTTPRequest actually expands them into refMembersInfo for content parsing; simpleHTTPRequest does not perform this expansion.
content.optSet.refMembers[] string Associated member or team UUID string.
content.optSet.headersConfig object Custom request header configuration. Different from Jira/ServiceNow headers. The read API restores its sensitive values; handle the returned data properly before saving.
content.optSet.headersConfig.isOpen boolean When the configuration exists, a boolean value must be provided; custom headers are sent only when true.
content.optSet.headersConfig.items array<object> When the configuration exists, the array is required, with a maximum of 50 items; entries are also validated when isOpen=false.
content.optSet.headersConfig.items[] object A single custom request header object.
content.optSet.headersConfig.items[].key string Non-empty string, maximum 256 characters after trimming leading and trailing spaces, deduplicated case-insensitively.
content.optSet.headersConfig.items[].value string Non-empty string, maximum 4096 characters.
content.optSet.headersConfig.items[].isSensitive boolean Required boolean; values with true are encrypted when saved, and the original value is restored in details and the list.
content.optSet.bodyTemplate string Only HTTPRequest supports custom request body templates, with a maximum string length of 5120 characters; an empty string or null means not configured, and whitespace-only is not enabled. Saving only validates type and length, not template syntax or variables; actual sending depends on site template capability and must be verified with actual alerts. simpleHTTPRequest does not support non-empty templates.
content.optSet.token string telegramBot returns the configured Bot Token; Jira/ServiceNow does not return bearer credentials and uses the hasToken flag.
content.optSet.chat_id string Required target chat ID string for telegramBot.
content.optSet.message_thread_id string Optional topic ID for telegramBot; a string when present.
content.optSet.auth_type string or null Only Jira/ServiceNow: null generates no separate authentication header; basic, bearer, and api_key are all supported; secret is supported only by Jira. If omitted, Jira defaults to secret and ServiceNow defaults to basic.
content.optSet.username string Jira/ServiceNow basic authentication username, non-empty, and cannot contain a colon or newline.
content.optSet.api_key_header string Jira/ServiceNow api_key authentication header name; cannot be Content-Type.
content.optSet.headers object Only Jira/ServiceNow. Header names are valid and unique case-insensitively, and values contain no newlines; Content-Type can only be application/json. Same-identity updates omit to retain original headers; {} clears them; values are masked as empty strings on read.
content.optSet.headers. string String value of the custom header. On update, an empty value with the same name can retain the old value for the same identity; new headers cannot have empty values.
content.optSet.hasSecret boolean Only Jira secret mode; whether a signing secret has been configured.
content.optSet.hasPassword boolean Only Jira/ServiceNow basic mode; whether a password has been configured.
content.optSet.hasToken boolean Only Jira/ServiceNow bearer mode; whether a Token has been configured.
content.optSet.hasApiKey boolean Only Jira/ServiceNow api_key mode; whether a Key has been configured.
content.optSet.hasHeaderValues object Only Jira/ServiceNow; marks whether a non-empty value has been saved for each returned header.
content.optSet.hasHeaderValues. boolean Configuration status corresponding to the header name.
content.optSet.deliveryStatus string Configuration display indicator for Jira/ServiceNow; currently configured, and does not indicate actual delivery success.
content.optSet.credentialsRequired boolean Whether Jira/ServiceNow still lacks credentials or header values required by the current authentication method.
content.declaration object or null Workspace common declaration.
{
  "code": 200,
  "content": {
    "id": null,
    "uuid": "notify_example",
    "workspaceUUID": "wksp_example",
    "name": "Production Callback",
    "type": "HTTPRequest",
    "optSet": {
      "url": "https://receiver.example.com/alerts"
    },
    "openPermissionSet": false,
    "permissionSet": [],
    "autoDisableAt": -1,
    "status": 0,
    "creator": "wsak_example",
    "updator": "",
    "createAt": 1785427200,
    "updateAt": -1,
    "deleteAt": -1,
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Handling Method
406 ft.ParameterValidationFailed Request field missing, or field value violates declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Request JSON syntax is invalid Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError JSON top level is not an object Some json file format error Submit a single JSON object.
400 ft.NofityObjectNameRepeat An active or disabled notification target with the same name already exists in the same workspace A notification target with the same name already exists Search existing names first and use an unused name.
406 ft.InvalidParameter Jira/ServiceNow name, address, authentication mode, credentials, or request headers do not comply with the rules Parameter {} is invalid Correct the fields indicated by the error according to the parameter table; do not send read-only has* flags back in place of secret values.
406 ft.InvalidType Notification type is unsupported or null Invalid type Use a non-empty type from the creation parameter enum; do not create with trigger or legacy aliases.
406 ft.InvalidAddress Callback domain cannot be resolved Domain {} cannot be resolved Use a resolvable target callback domain and confirm site DNS.
406 ft.IntranetError Callback address matches site intranet restriction Intranet addresses are not allowed Use a callback target allowed by the site, or have the administrator confirm the address policy.
500 ft.InternalServerError Configuration field missing or invalid type, database or cache processing failed Internal error Check the configuration for the corresponding notification type on this page, and record the traceId. After a write failure, query whether the target has been saved before retrying.
403 ft.ForbiddenFreeEditionWorkspace Workspace plan does not allow creation of the selected notification type Free Plan workspaces do not support this feature. Subscribe to Commercial Plan to unlock this restriction Confirm the notification method capabilities for the workspace plan, and choose a supported type or upgrade the plan.
406 ft.UnsupportShortMessage Free or trial workspace creates an SMS notification target Free Plan workspace does not support SMS notification targets Choose a method supported by the current plan.
406 ft.UnsupportOnCall Free or trial workspace creates a phone notification target The workspace does not support Phone notification targets Choose a method supported by the current plan.

Feedback

Is this page helpful?