API xóa Webhook

API này hỗ trợ Partner, Shop xóa các Webhook đã được thêm vào trước đó

Lưu ý:

  • Đối với các API sử dụng cho Shop thì API_KEY: <api_key>. Thông tin base_url của Shop

  • Đối với các API sử dụng cho Partner thì API_KEY: <api_key> - Đây là api_key của chính Partner. Thông tin base_url của Partner

DeleteWebhook

post
Body
idstring · int64Required
Responses
200

A successful response

application/json
post
POST $BASE_URL.Webhook/DeleteWebhook HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 13

{
  "id": "text"
}
200

A successful response

{
  "webhooks": [
    {
      "created_at": "2025-10-15T03:43:42.486Z",
      "entities": [
        "call_log"
      ],
      "fields": [
        "text"
      ],
      "id": "text",
      "metadata": "text",
      "states": {
        "last_error": {
          "error": "text",
          "resp_body": "text",
          "resp_status": 1,
          "retried": 1,
          "sent_at": "2025-10-15T03:43:42.486Z"
        },
        "last_sent_at": "2025-10-15T03:43:42.486Z",
        "state": "text"
      },
      "url": "text"
    }
  ]
}

Request:

curl --location '$BASE_URL.Webhook/DeleteWebhook' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{
  "id": "1415096549774721835"
}'

Response:

{
    "webhooks": [
        {
            "id": "1414892734919211862",
            "entities": [
                "call_log"
            ],
            "fields": [],
            "url": "https://example.com/webhook",
            "metadata": "",
            "created_at": "2025-09-23T18:05:42Z",
            "states": {
                "state": "ok",
                "last_sent_at": null,
                "last_error": null
            }
        }
    ]
}

Mô tả Request Body

Tham số
Kiểu dữ liệu
Mô tả

id*

string

ID của webhook cần xóa.

Mô tả Response

Trường
Kiểu dữ liệu
Mô tả

webhooks

array of object

Danh sách webhook tồn tại trên hệ thống.

id

string

ID định danh webhook.

entities

array of string

Danh sách loại sự kiện đăng ký.

fields

string

Danh sách các trường chi tiết (nếu có).

url

string

Địa chỉ endpoint webhook.

metadata

string

Thông tin metadata tùy chọn.

created_at

string

Thời gian tạo webhook.

state

string

Trạng thái: "ok" : Gửi thành công, webhook hoạt động bình thường "retry": Gửi thất bại và đang trong tiến trình retry theo backoff "stop": Đã vượt quá cấp retry cuối cùng, webhook bị vô hiệu hóa

last_sent_at

string

Thời điểm gửi gần nhất.

last_error

object

Lỗi gần nhất.

Last updated