Difference between revisions of "API:Ping"

From docs
Jump to: navigation, search
Line 2: Line 2:
 
== [[API]] » API Ping ==
 
== [[API]] » API Ping ==
  
'''URL:''' <nowiki>https://app.callproof.com/api/ping/</nowiki>
+
No Swagger file is in this repo; the Ping docs below are from the live API routes and behavior.
  
'''Method:''' GET
+
== API Health Check (Ping) ==
  
'''Required Fields:'''
+
=== Base URL ===
 +
https://app.callproof.com
  
* '''''key''''' - API Key
+
=== Endpoint ===
* '''''secret''''' - API Key Secret
+
/api/ping/
  
'''Data Returned:'''
+
=== Purpose ===
 +
Confirms that the CallProof API is reachable and that the supplied API credentials are valid. Use this to verify connectivity and authentication before calling other API operations.
  
* '''''result''''' - '1' if successful
+
=== HTTP Method ===
* '''''errors''''' - Array of errors produced by the request
+
GET
* '''''code''''' - HTTP request status
+
 
 +
=== Headers ===
 +
No required headers.
 +
 
 +
{| class="wikitable"
 +
! Header !! Required !! Description
 +
|-
 +
| — || — || No headers are required for this endpoint. Authentication is provided via query parameters.
 +
|}
 +
 
 +
=== Security ===
 +
* '''Yes''' – Requires a valid API key and secret (passed as query parameters).
 +
 
 +
=== Parameters ===
 +
 
 +
==== Query Parameters ====
 +
{| class="wikitable"
 +
! Parameter !! Type !! Required !! Description
 +
|-
 +
| key || string || Yes || Public API key assigned to your CallProof account.
 +
|-
 +
| secret || string || Yes || Private API secret paired with the API key.
 +
|}
 +
 
 +
==== Path Parameters ====
 +
None.
 +
 
 +
==== Request Body ====
 +
None.
 +
 
 +
=== cURL Example ===
 +
<pre>
 +
curl -X GET "https://app.callproof.com/api/ping/?key=YOUR_API_KEY&secret=YOUR_API_SECRET"
 +
</pre>
 +
 
 +
=== Successful Response (200) ===
 +
Indicates the API is available and the provided credentials were accepted.
 +
 
 +
{| class="wikitable"
 +
! Field !! Type !! Description
 +
|-
 +
| result || object || Outcome of the health check.
 +
|-
 +
| result.result || integer || Value of <code>1</code> indicates a successful ping.
 +
|-
 +
| errors || array || Empty list when the request succeeds.
 +
|-
 +
| code || integer || HTTP-style status value; <code>200</code> on success.
 +
|}
 +
 
 +
Example response:
 +
<pre>
 +
{
 +
  "result": {
 +
    "result": 1
 +
  },
 +
  "errors": [],
 +
  "code": 200
 +
}
 +
</pre>
 +
 
 +
=== Error Responses ===
 +
{| class="wikitable"
 +
! Status Code !! Meaning
 +
|-
 +
| 401 || Unauthorized – The API key and/or secret is missing, invalid, inactive, or associated with a disabled account.
 +
|-
 +
| 405 || Method Not Allowed – A method other than GET was used.
 +
|-
 +
| 500 || Internal Server Error – An unexpected server problem occurred. Not specified in Swagger.
 +
|}
 +
 
 +
'''401 response body example:'''
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Invalid API Key"],
 +
  "code": 401
 +
}
 +
</pre>
 +
 
 +
'''405 response body example:'''
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Method not allowed"],
 +
  "code": 405
 +
}
 +
</pre>
 +
 
 +
---
 +
 
 +
**Note:** This API uses query-parameter credentials (`key` / `secret`), not Bearer token headers. Say when you want the next endpoint documented.

Revision as of 07:24, 17 July 2026

API » API Ping

No Swagger file is in this repo; the Ping docs below are from the live API routes and behavior.

API Health Check (Ping)

Base URL

https://app.callproof.com

Endpoint

/api/ping/

Purpose

Confirms that the CallProof API is reachable and that the supplied API credentials are valid. Use this to verify connectivity and authentication before calling other API operations.

HTTP Method

GET

Headers

No required headers.

Header Required Description
No headers are required for this endpoint. Authentication is provided via query parameters.

Security

  • Yes – Requires a valid API key and secret (passed as query parameters).

Parameters

Query Parameters

Parameter Type Required Description
key string Yes Public API key assigned to your CallProof account.
secret string Yes Private API secret paired with the API key.

Path Parameters

None.

Request Body

None.

cURL Example

curl -X GET "https://app.callproof.com/api/ping/?key=YOUR_API_KEY&secret=YOUR_API_SECRET"

Successful Response (200)

Indicates the API is available and the provided credentials were accepted.

Field Type Description
result object Outcome of the health check.
result.result integer Value of 1 indicates a successful ping.
errors array Empty list when the request succeeds.
code integer HTTP-style status value; 200 on success.

Example response:

{
  "result": {
    "result": 1
  },
  "errors": [],
  "code": 200
}

Error Responses

Status Code Meaning
401 Unauthorized – The API key and/or secret is missing, invalid, inactive, or associated with a disabled account.
405 Method Not Allowed – A method other than GET was used.
500 Internal Server Error – An unexpected server problem occurred. Not specified in Swagger.

401 response body example:

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

405 response body example:

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

---

    • Note:** This API uses query-parameter credentials (`key` / `secret`), not Bearer token headers. Say when you want the next endpoint documented.