Event Actions Store

From docs
Jump to: navigation, search

Record User Event Action

Base URL

https://apimobile.callproof.com

Endpoint

/api/v1/event-action

Purpose

Records an authenticated user's interaction within the CallProof application.

The API captures the action performed, the application screen where it occurred, and basic device information. This information supports business activity reporting, product usage analysis, and external service usage tracking.

An action may optionally identify an associated external service by using the format action_name+external_service_name.

HTTP Method

POST

Headers

Header Required Description
Authorization Yes Bearer access token.
Content-Type Yes application/x-www-form-urlencoded or application/json.

Security

  • Yes – Requires Bearer Token authentication.
  • The access token must be active and unexpired.
  • The authenticated user and associated company account must be active.
  • Completed two-factor verification is not required for this endpoint.

Parameters

Request Body Fields

Parameter Type Required Description
event_action string Yes The recognized business action performed by the user. An external service may be included using action_name+external_service_name.
screen_name string Yes The name of the application screen where the action occurred.
os_type string Yes The device operating-system type, such as android or ios.
app_version string Yes The installed CallProof application version.
device_name string Yes The name or model of the device used to perform the action.

The complete lists of accepted event-action names and external service names are Not specified in Swagger.

Successful Response (200)

Confirms that the user's event action was accepted and recorded.

Response Field Type Description
clientStatusCode integer Business-level response status. A successful request returns 200.
user_id integer The authenticated user's unique identifier.
company_id integer The company associated with the authenticated user.
message string Confirmation message. The successful value is Event Action Added successfully..
uri string The URL of the event-action request.

Error Responses

HTTP Status Code Client Status Code Meaning
200 401 The required event_action field was not supplied.
200 401 The required screen_name field was not supplied.
200 401 The required os_type field was not supplied.
200 401 The required app_version field was not supplied.
200 401 The required device_name field was not supplied.
200 400 The supplied event-action name is not recognized.
200 400 The supplied external service name is not recognized.
200 400 The event action could not be processed.
401 401 The Bearer token is missing or invalid.
401 401 The access token has expired.
401 401 The authenticated user or company account is disabled.
401 401 A required client application update must be installed.

Common Error Messages

Message Meaning
Event Action is Invalid The supplied event-action name is not recognized.
External API is Invalid The external service name appended to the event action is not recognized.

Error Response Fields

Response Field Type Description
clientStatusCode integer The business-level error status, commonly 400 or 401.
error.code integer The business error code.
error.message string A plain-language explanation of the event-action failure.
uri string The URL of the request.

Common Error Codes

Error Code Meaning
1500 Authentication, validation, event-action, or external-service validation failed.
1800 The user or company account is disabled.
8000 The access token has expired.
9000 A required client application update is available.