curl --request DELETE \
--url https://yoursite.com/wp-json/getmcp/v1/analytics/calls \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '{
"ids": [1042, 1041, 1037]
}'
import requests
response = requests.delete(
"https://yoursite.com/wp-json/getmcp/v1/analytics/calls",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
json={"ids": [1042, 1041, 1037]},
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/analytics/calls",
{
method: "DELETE",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({ ids: [1042, 1041, 1037] }),
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/analytics/calls",
[
"method" => "DELETE",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json",
],
"body" => wp_json_encode([ "ids" => [1042, 1041, 1037] ]),
]
);
$data = json_decode( wp_remote_retrieve_body( $response ), true );
{
"deleted": 3
}
{
"code": "rest_invalid_param",
"message": "No valid IDs provided.",
"data": { "status": 400 }
}
{
"code": "rest_forbidden",
"message": "Permission denied.",
"data": { "status": 403 }
}
Analytics
Delete Call Logs by ID
Delete specific call-log entries by ID.
DELETE
/
wp-json
/
getmcp
/
v1
/
analytics
/
calls
curl --request DELETE \
--url https://yoursite.com/wp-json/getmcp/v1/analytics/calls \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '{
"ids": [1042, 1041, 1037]
}'
import requests
response = requests.delete(
"https://yoursite.com/wp-json/getmcp/v1/analytics/calls",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
json={"ids": [1042, 1041, 1037]},
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/analytics/calls",
{
method: "DELETE",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({ ids: [1042, 1041, 1037] }),
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/analytics/calls",
[
"method" => "DELETE",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json",
],
"body" => wp_json_encode([ "ids" => [1042, 1041, 1037] ]),
]
);
$data = json_decode( wp_remote_retrieve_body( $response ), true );
{
"deleted": 3
}
{
"code": "rest_invalid_param",
"message": "No valid IDs provided.",
"data": { "status": 400 }
}
{
"code": "rest_forbidden",
"message": "Permission denied.",
"data": { "status": 403 }
}
Permanently removes the call-log rows whose IDs are listed in the request body. Use this to clean up specific entries the operator picked from the call-log table.
IDs are accepted in the request body even though the method is
DELETE. The getmcp/v1 REST controller registers the same route for GET (list) and DELETE (this endpoint), keying off the HTTP method.Permission is gated on the WordPress core capability
manage_options — site admins only. Users with the lighter getmcp_view_analytics capability can read call logs but cannot delete them.Body Parameters
array
required
Array of call-log row IDs (integers) to delete. Non-integer values are filtered out before the SQL runs; an empty result yields a
400.curl --request DELETE \
--url https://yoursite.com/wp-json/getmcp/v1/analytics/calls \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '{
"ids": [1042, 1041, 1037]
}'
import requests
response = requests.delete(
"https://yoursite.com/wp-json/getmcp/v1/analytics/calls",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
json={"ids": [1042, 1041, 1037]},
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/analytics/calls",
{
method: "DELETE",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({ ids: [1042, 1041, 1037] }),
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/analytics/calls",
[
"method" => "DELETE",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json",
],
"body" => wp_json_encode([ "ids" => [1042, 1041, 1037] ]),
]
);
$data = json_decode( wp_remote_retrieve_body( $response ), true );
{
"deleted": 3
}
{
"code": "rest_invalid_param",
"message": "No valid IDs provided.",
"data": { "status": 400 }
}
{
"code": "rest_forbidden",
"message": "Permission denied.",
"data": { "status": 403 }
}
Response Fields
integer
Number of rows actually removed by the
DELETE query. IDs that didn’t exist are simply ignored — they do not raise an error.
