API:Companies:Stats:HTML:Delete

From docs
Revision as of 08:13, 17 July 2026 by Ashley DeBon (talk | contribs)
Jump to: navigation, search

Delete Company Stats HTML

Base URL

https://app.callproof.com

Endpoint

/api/companies/stats/html/delete/

Purpose

Removes the custom HTML statistics content stored at the company level for your CallProof account. Use this endpoint to clear the company-wide statistics display when it is no longer needed. Only the company-level HTML content is removed; individual sales representative statistics remain unchanged.

HTTP Method

POST

Headers

Header Required Description
Content-Type Yes Must be application/json.

Security

  • Yes – Requires a valid API key and secret with permission to delete company statistics HTML. Authentication credentials are supplied in the request body.

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

Parameter Type Required Description
api_key object Yes Authentication credentials.
api_key.key string Yes Public API key assigned to your CallProof account.
api_key.secret string Yes Private API secret associated with the API key.

cURL Example

curl -X POST "https://app.callproof.com/api/companies/stats/html/delete/" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": {
      "key": "YOUR_API_KEY",
      "secret": "YOUR_API_SECRET"
    }
  }'

Successful Response (200)

Indicates that the company-level statistics HTML was successfully removed. The response returns the company statistics record with its HTML content cleared.

Field Type Description
results object Company statistics HTML record after deletion.
results.user_id null Always null because company statistics are not associated with a specific sales representative.
results.user string Empty string for company-level statistics.
results.email string Empty string for company-level statistics.
results.html null Company statistics HTML content after deletion.
errors array Empty when the request succeeds.
code integer HTTP-style status code. Returns 200 on success.

Example response:

{
  "results": {
    "user_id": null,
    "user": "",
    "email": "",
    "html": null
  },
  "errors": [],
  "code": 200
}

Error Responses

Status Code Meaning
401 Unauthorized – The API key or secret is missing, invalid, inactive, associated with a disabled account, or does not have permission to delete company statistics HTML.
405 Method Not Allowed – The request used an HTTP method other than POST.
500 Internal Server Error – An unexpected server error occurred.

401 Response Example

{
  "results": [],
  "errors": [
    "Invalid API Key"
  ],
  "code": 401
}

405 Response Example

{
  "results": [],
  "errors": [
    "Method not allowed"
  ],
  "code": 405
}

Notes

  • This endpoint requires only API authentication credentials.
  • No company object or HTML content is supplied in the request.
  • Since there are no user-supplied fields to validate beyond authentication, this endpoint does not return a 400 Bad Request response for invalid input.