All plans have 30% OFF For this week

Claim Discount

Customers

Customers API Reference

The Customers API in AnswerPal allows you to retrieve and update information about your organization’s account, manage API credentials, and fetch AI models available to your organization. Use these endpoints to view or update your customer profile, retrieve integration secrets, and list available AI models.

Overview

A “Customer” in AnswerPal represents your organization or business entity. All resources—channels, end users, tickets, and representatives—are linked to a customer. The Customers API provides endpoints for managing your organization’s account, updating your profile, retrieving integration secrets, and listing available AI models for automation and support.

Endpoints

Get Current Customer

GET /api/Customers/me Retrieves the details of the authenticated customer (your organization).

Example Response:

{
"apiBaseUrl": "https://api.example.com",
"apiUsername": "apiuser",
"apiPassword": "********",
"apiToken": "********",
"apiAuthenticationType": "Basic",
"emailProviderType": "Microsoft365",
"graphTenantID": "your-tenant-id",
"graphClientID": "your-client-id",
"graphClientSecret": "********",
"graphAuthorityURL": "https://login.microsoftonline.com/",
"graphScope": "User.Read",
"defaultTopicModelId": 1,
"defaultWebchatModelId": 2,
"defaultEmailTextModelId": 3,
"defaultEmailVisionModelId": 4,
"defaultCallModelId": 5,
"defaultSpamModelId": 6,
"defaultCustomerRepID": 123,
"twilioAccountSID": "ACxxxxxxxxxxxxxxxx",
"twilioAuthToken": "********",
"openAIApiKey": "sk-********"
}

Update Current Customer

PUT /api/Customers/me Updates the details of the authenticated customer. Body: Same as response above; provide only the fields you want to update. Example Request:
{
  "apiBaseUrl": "https://api.example.com",
  "apiAuthenticationType": "Bearer",
  "openAIApiKey": "sk-new-key"
}
Response:
  • 204 No Content on success

Get Customer Secrets

GET /api/Customers/my-secrets Retrieves secret API credentials for integrations (e.g., OpenAI, Twilio).

Example Response:

{
"openAIApiKey": "sk-********",
"twilioAccountSID": "ACxxxxxxxxxxxxxxxx",
"twilioAuthToken": "********"
}

Get Customer Models

GET /api/Customers/models Returns a list of available AI models for your organization.

Example Response:

[{
"modelID": 1,
"name": "General Topic Model",
"modelType": "topics",
"isDefault": true
}]

 

Customer Representatives

Customer Representatives (CSRs) are the human agents in AnswerPal who interact with end users, handle tickets, review and correct AI-generated replies, and ensure compliance and quality in customer communications. The Customer Representatives API allows you to manage these users—create, update, delete, and retrieve their profiles, as well as manage their signatures and passwords.

Endpoints for Customer Representatives

  • GET /customerReps — List all customer representatives (with pagination)
  • GET /customerReps/{id} — Get details of a specific representative
  • POST /customerReps — Create a new customer representative
  • PUT /customerReps/{id} — Update a representative’s profile
  • DELETE /customerReps/{id} — Delete a representative
  • PUT /customerReps/{id}/change-password — Change a representative’s password
  • GET /customerReps/{id}/signatures — List all signatures for a representative
  • GET /customerReps/{id}/signatures/{lang} — Get a signature for a specific language
  • POST /customerReps/{id}/signatures — Create or update a signature for a language
  • DELETE /customerReps/{id}/signatures/{lang} — Remove a signature for a language

List Customer Representatives

GET /customerReps Returns a paginated list of all customer representatives for your organization.

Example Response:

{
  "items": [
    {
      "customerRepID": 1,
      "name": "Jane Doe",
      "email": "jane.doe@example.com",
      "phoneNumber": "+1234567890",
      "otherDetails": "Team Lead"
    }
  ],
  "totalCount": 1,
  "pageNumber": 1,
  "pageSize": 50
}

Create a Customer Representative

POST /customerReps Create a new representative.

Example Request:

{
  "username": "john.smith",
  "password": "secret123",
  "name": "John Smith",
  "email": "john.smith@example.com",
  "phoneNumber": "+1234567890",
  "otherDetails": "Onboarding Specialist"
}
Example Response:
{
  "customerRepID": 2,
  "name": "John Smith",
  "email": "john.smith@example.com",
  "phoneNumber": "+1234567890",
  "otherDetails": "Onboarding Specialist"
}

Example: Change Password

PUT /customerReps/{id}/change-password Change the password for a representative.

Example Request:

{
  "customerRepID": 2,
  "newPassword": "newsecurepassword"
}

Response: 204 No Content on success

Example: Manage Signatures

POST /customerReps/{id}/signatures Create or update a signature for a specific language.

Example Request:

{
"lang": "en",
"emailSignatureHTML": "<p>Best regards,<br>John Smith</p>",
"emailSignatureText": "Best regards,\nJohn Smith"
}
Example Response:
{
"customerRepID": 2,
"lang": "en",
"emailSignatureHTML": "<p>Best regards,<br>John Smith</p>",
"emailSignatureText": "Best regards,\nJohn Smith"
}

Data Models

Customer Object

Property Type Description
apiBaseUrl string Base URL for external API integrations.
apiUsername string Username for external API authentication.
apiPassword string Password for external API authentication.
apiToken string Token for external API authentication.
apiAuthenticationType string Authentication type (“Basic”, “Bearer”, etc.).
emailProviderType string Email provider type (e.g., “Microsoft365”).
graphTenantID string Microsoft Graph Tenant ID.
graphClientID string Microsoft Graph Client ID.
graphClientSecret string Microsoft Graph Client Secret.
graphAuthorityURL string Microsoft Graph Authority URL.
graphScope string Microsoft Graph Scope.
defaultTopicModelId int Default model ID for topic detection.
defaultWebchatModelId int Default model ID for webchat.
defaultEmailTextModelId int Default model ID for email text.
defaultEmailVisionModelId int Default model ID for email vision.
defaultCallModelId int Default model ID for call processing.
defaultSpamModelId int Default model ID for spam detection.
defaultCustomerRepID int Default customer representative ID.
twilioAccountSID string Twilio Account SID for phone/SMS integration.
twilioAuthToken string Twilio Auth Token for phone/SMS integration.
openAIApiKey string OpenAI API key for AI features.

Customer Representative Object

Below are the properties for the Customer Representative object:
Property Type Description
customerRepID int Unique identifier for the customer representative.
customerID int Reference to the customer organization.
username string Login username for the customer representative.
name string Full name of the customer representative.
email string Email address of the customer representative.
phoneNumber string Phone number of the customer representative.
otherDetails string Additional details about the customer representative.
emailSignatureHTML string HTML version of the representative’s email signature.
emailSignatureText string Plain text version of the representative’s email signature.
timeZone string Windows time zone (e.g., “W. Europe Standard Time”).

Customer Representative Signature Object

Properties for the CustomerRepSignature object (used in signature endpoints):
Property Type Description
customerRepID int ID of the representative.
lang string Language code (e.g., “en”, “nl”).
emailSignatureHTML string HTML signature for emails.
emailSignatureText string Plain text signature for emails.

Note: When updating customer or representative data, only provide the fields you wish to change. Secret fields (such as passwords or tokens) are masked in responses and should be managed with care.

Table of Contents

AnswerPal: AI-powered customer service solutions to elevate your support and communication effortlessly.

Contact

For all support, sales, and partnership inquiries, email us at info@answerpal.eu