Add Plusapp User Filterss

From docs
Jump to: navigation, search

Add User Filter

Base URL

https://apimobile.callproof.com

Endpoint

/api/user-filter

Purpose

Saves a user filter for the authenticated user and company. If a filter of the same type already exists for that user, it is updated; otherwise a new filter is created.

HTTP Method

POST

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

Parameter Type Required Description
filter_type_id integer Yes Filter type identifier (for example, contacts = 1, custom fields = 8)
filter string Yes Filter criteria payload to store (typically a JSON string of filter settings)

cURL Example for Android

 curl --location --request POST 'https://apimobile.callproof.com/api/user-filter' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'filter_type_id=1' \ --form 'filter={}' 

cURL Example for iOS

 curl --location --request POST 'https://apimobile.callproof.com/api/user-filter' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'filter_type_id=1' \ --form 'filter={}' 

Successful Response (200)

Indicates that the user filter was created or updated successfully.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
message string Confirmation message (for example, "User filter added successfully." or "User filter updated successfully.")
uri string Requested resource URI

Error Responses

Status Code Meaning
200 Validation failed – response body uses clientStatusCode 401 with the first validation error message
400 Bad Request – the user filter could not be saved
401 Unauthorized – missing, invalid, or expired Bearer token
  • Validation (HTTP 200, clientStatusCode 401) – Missing filter_type_id or filter.
  • 400 – An error occurred while adding/updating the filter (for example, "Error while adding user filter details").
  • 401 – Authentication failed or the access token is missing/expired.