Difference between revisions of "API:Companies:Stats:HTML:Delete"
Greg Donald (talk | contribs) (Created page with " == API » Delete Company Stats HTML == '''URL:''' <nowiki>https://app.callproof.com/api/companies/stats/html/update/</nowiki> '''Method:''' POST '''Required Fields...") |
Ashley DeBon (talk | contribs) |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| + | == [[API]] » 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 === | ||
| + | {| class="wikitable" | ||
| + | ! Header !! Required !! Description | ||
| + | |- | ||
| + | | Content-Type || Yes || Must be <code>application/json</code>. | ||
| + | |} | ||
| + | |||
| + | === 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 ==== |
| + | {| class="wikitable" | ||
| + | ! 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 === | ||
| + | <pre> | ||
| + | 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" | ||
| + | } | ||
| + | }' | ||
| + | </pre> | ||
| − | + | === 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. | ||
| − | + | {| class="wikitable" | |
| + | ! Field !! Type !! Description | ||
| + | |- | ||
| + | | results || object || Company statistics HTML record after deletion. | ||
| + | |- | ||
| + | | results.user_id || null || Always <code>null</code> 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 <code>200</code> on success. | ||
| + | |} | ||
| − | + | Example response: | |
| + | <pre> | ||
| + | { | ||
| + | "results": { | ||
| + | "user_id": null, | ||
| + | "user": "", | ||
| + | "email": "", | ||
| + | "html": null | ||
| + | }, | ||
| + | "errors": [], | ||
| + | "code": 200 | ||
| + | } | ||
| + | </pre> | ||
| − | + | === Error Responses === | |
| − | |||
| − | + | {| class="wikitable" | |
| + | ! 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 <code>POST</code>. | ||
| + | |- | ||
| + | | 500 || Internal Server Error – An unexpected server error occurred. | ||
| + | |} | ||
| − | + | '''401 Response Example''' | |
| + | <pre> | ||
| + | { | ||
| + | "results": [], | ||
| + | "errors": [ | ||
| + | "Invalid API Key" | ||
| + | ], | ||
| + | "code": 401 | ||
| + | } | ||
| + | </pre> | ||
| − | ''' | + | '''405 Response Example''' |
| + | <pre> | ||
| + | { | ||
| + | "results": [], | ||
| + | "errors": [ | ||
| + | "Method not allowed" | ||
| + | ], | ||
| + | "code": 405 | ||
| + | } | ||
| + | </pre> | ||
| − | * | + | === 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 <code>400 Bad Request</code> response for invalid input. | ||
Latest revision as of 12:01, 17 July 2026
Contents
API » Delete Company Stats HTML
Base URL
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 Requestresponse for invalid input.