Create a contact point
POST /api/contact_points
POST /api/contact_pointsInteractive request editor loads with JavaScript.
X-API-KEY<token>
In: header
Request Body
application/json
Response Body
application/json
application/json
curl -X POST "$API_BASE_URL/api/contact_points" \ -H "Content-Type: application/json" \ -d '{ "email_config": {} }'Contact point created successfully.
{
"value": {
"name": "cp-docs-test",
"desc": "Object description.",
"labels": {
"version": "v2",
"env": "prod"
},
"type": "email",
"email_config": {
"email": [
"user@example.com"
]
},
"id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
"created_at": 1742288232,
"updated_at": 1742288235
}
}Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
{
"value": {},
"error_msg": "error message"
}Complete operation details and schema variants
POST /api/contact_points
Create a contact point
Create a new contact point to deliver alert notifications through channels such as email, webhook, Slack, or DingTalk. The created contact point can then be referenced by alert policies.
Required IAM Permission: Action iam:CreateContactPoint, Resource arn:api7:iam:contactpoint/*
Parameters
Request body
Content type: application/json
- allOf variant 1
name(string, optional): Name of the contact point.desc(string, optional): The object description.labels(object, optional): Key-value pairs of labels.- allOf variant 2
- oneOf variant 1: Email
type(string, optional): Type of contact point.email_config(object, required): Contact point email configurations.email_config.email(array, optional):- oneOf variant 2: Webhook
type(string, optional): Type of contact point.webhook_config(object, required): Contact point webhook configurations.webhook_config.ssl_verify(boolean, optional): If true, perform SSL verification.webhook_config.url(string, optional): Webhook URL.webhook_config.method(string, optional): HTTP method of the webhook request.webhook_config.headers(array, optional): Extra HTTP headers to take when sending requests.webhook_config.headers[].name(string, required):webhook_config.headers[].value(string, required):
Responses
200: Contact point created successfully.- allOf variant 1
value(object, optional): The specific resource.- allOf variant 2
value(object, optional):- allOf variant 1
- allOf variant 1
value.name(string, optional): Name of the contact point.value.desc(string, optional): The object description.value.labels(object, optional): Key-value pairs of labels.- allOf variant 2
- oneOf variant 1: Email
value.type(string, optional): Type of contact point.value.email_config(object, required): Contact point email configurations.value.email_config.email(array, optional):- oneOf variant 2: Webhook
value.type(string, optional): Type of contact point.value.webhook_config(object, required): Contact point webhook configurations.value.webhook_config.ssl_verify(boolean, optional): If true, perform SSL verification.value.webhook_config.url(string, optional): Webhook URL.value.webhook_config.method(string, optional): HTTP method of the webhook request.value.webhook_config.headers(array, optional): Extra HTTP headers to take when sending requests.value.webhook_config.headers[].name(string, required):value.webhook_config.headers[].value(string, required):- allOf variant 2
value.id(string, optional): The object ID.value.created_at(integer, optional): The object created timestamp.value.updated_at(integer, optional): The object updated timestamp.400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.value(object, optional): The specific resource.error_msg(string, optional): The error message.
cURL
curl -X POST '$API_BASE_URL/api/contact_points'