Free setup on annual plans

Sign up today!

Customers

API Reference: Customers endpoints

The Customers endpoints read and update the account of the signed-in customer: outbound connector credentials, mail defaults, default AI models and retention. Every call works on the customer in the token; there is no customer ID in the path.

Overview

A customer is the account that owns all other AnswerPal data. Representatives, costs and storage, and custom field definitions have their own pages:

Endpoints

  • GET /api/Customers/me
    Access: Bearer JWT
    Return the customer account. Secrets are never returned; has... flags tell whether one is stored.
  • PUT /api/Customers/me
    Access: Bearer JWT (Configurator or Administrator)
    Update the customer account. Answers 204 No Content.
  • GET /api/Customers/models
    Access: Bearer JWT
    List the AI models the customer can use: the global models and the customer’s own, active ones plus any inactive model that is still selected somewhere.
  • GET /api/Customers/my-secrets
    Access: Bearer JWT (phone token)
    For the phone runtime only: return the provider credentials (OpenAI, Twilio, Google) that a phone channel needs during a call. A representative token is refused.

Read the customer

Customer fields

GET /api/Customers/me returns these fields. PUT /api/Customers/me accepts the same fields except customerID, the has... flags and models, plus the secret fields below.

Account and retention

  • customerID (integer, read only)
  • defaultCustomerRepID (integer or null)
    The representative used as default owner.
  • ticketCleanupRetentionDays (integer, at least 1, default 30)
    Days before closed tickets are cleaned up.
  • maxPromptDocumentImagesPerPrompt (integer or null, 0 or more)
    Limit on document images added to one prompt.
  • maxPageImagesPerReply (integer or null, 0 to 50)
    Limit on knowledge base page images in one reply.

Outbound API connector

Used when AnswerPal calls your systems through actions and documents. These are not credentials for the AnswerPal API.

  • apiBaseUrl, apiUsername (string or null)
  • apiAuthenticationType (string or null)
    For example Basic, Bearer or RawAuthorization (the token is sent as the full Authorization header value).
  • hasApiPassword, hasApiToken (boolean, read only)

Mail defaults

Defaults for e-mail channels that do not override them.

  • emailProviderType (string or null)
  • graphTenantID, graphClientID, graphAuthorityURL, graphScope (string or null)
    Microsoft 365 (Graph) app registration.
  • imapServer, imapPort, imapUseSsl, smtpServer, smtpPort, smtpUseSsl
    IMAP and SMTP server settings (ports default to 993 and 587).
  • hasGraphClientSecret (boolean, read only)

Default models

Model IDs from GET /api/Customers/models. Each must be active, visible to the customer and suited to its use; otherwise the update is refused.

  • defaultTopicModelId, defaultWebchatModelId, defaultEmailModelId, defaultCallModelId, defaultSpamModelId, defaultConditionalRulesModelId, defaultSummaryModelId, defaultRealtimeModelId, defaultRealtimeTranslationModelId, defaultTranscribeModelId, defaultLiveModelId, defaultTextTranslationModelId (integer or null)
  • defaultEmailModelInternetAccessEnabled, defaultWebchatModelInternetAccessEnabled, defaultCallModelInternetAccessEnabled, defaultRealtimeModelInternetAccessEnabled (boolean or null)
    Web search for the default model of that use.
  • phoneEngine (string or null, max 20)
    Realtime (default) or Live. Live needs an active live model, and the default call model must support function calling.

Providers

  • twilioAccountSID (string or null, max 100), twilioRegion (string or null)
  • openAIProjectId, googleCloudProjectIds, azureCostResourceGroupScopes (string or null)
    Used for cost reports.
  • hasTwilioAuthToken, hasOpenAIApiKey, hasGoogleMapsApiKey, hasAzureMapsApiKey (boolean, read only)

Models list

  • models (array, read only)
    Not filled by this endpoint; use GET /api/Customers/models.

Update the customer

PUT /api/Customers/me replaces the settings. Start from the object returned by GET, change what you need and send it back: an ordinary field you leave out or send as null is cleared. These fields are the exception and keep their stored value when blank or left out:

  • Secrets (write only): apiPassword, apiToken, graphClientSecret, twilioAuthToken, openAIApiKey, googleMapsApiKey, azureMapsApiKey. To remove one, send its flag: clearApiPassword, clearApiToken, clearGraphClientSecret, clearTwilioAuthToken, clearOpenAIApiKey, clearGoogleMapsApiKey, clearAzureMapsApiKey.
  • twilioAccountSID (clear it with clearTwilioAccountSID) and phoneEngine.
  • The four ...InternetAccessEnabled flags (null keeps them).
  • ticketCleanupRetentionDays becomes 30 when left out.

When you change apiBaseUrl or a mail server while a password or token is stored for it, send that secret again (or clear it); otherwise the update is refused, so a stored secret is never sent to a new address.

PUT /api/Customers/me
Authorization: Bearer <token>
Content-Type: application/json

{
  "apiBaseUrl": "https://erp.example.com/api",
  "apiUsername": "answerpal",
  "apiAuthenticationType": "Basic",
  "apiPassword": "new-secret",
  "emailProviderType": "Office365",
  "defaultEmailModelId": 12,
  "defaultEmailModelInternetAccessEnabled": false,
  "phoneEngine": "Realtime",
  "ticketCleanupRetentionDays": 30
}
GET /api/Customers/models

200 OK
[
  {
    "modelID": 12,
    "purpose": "general",
    "modelName": "gpt-5-mini",
    "apiModelName": "gpt-5-mini",
    "isActive": true,
    "hasFunctionCalling": true,
    "supportsWebSearch": true,
    "isGlobal": true,
    "isDefault": true,
    "compatibleUsages": ["topics", "webchat", "email", "summary"]
  }
]

Status codes

  • 204 No Content
    The customer was updated.
  • 400 Bad Request
    A validation error: retention below 1, an unknown, inactive or unsuitable default model, an unknown phone engine, an incomplete authentication setting, or a changed address without its secret.
  • 403 Forbidden
    The role may not change settings (only Configurator and Administrator may).
  • 409 Conflict
    Changing or clearing the Twilio account is blocked while WhatsApp connectors, unsettled WhatsApp deliveries or ongoing calls still use it, or while another WhatsApp operation is running. The body has a code and a message.
  • 503 Service Unavailable
    The Twilio change could not be coordinated with running calls in time; try again.

Models

Each item of GET /api/Customers/models describes one model:

  • modelID, modelName, apiModelName
    The ID to use in the default model fields, the display name (with the reasoning level appended for reasoning models, for example o4-mini-high) and the provider’s model name.
  • purpose and compatibleUsages
    What the model is meant for and the uses it may be selected for.
  • isActive, isFineTuned, isGlobal, isDefault
    isGlobal is true for models available to every customer; isDefault is true when the customer uses the model as a default.
  • Capabilities
    hasTextInput, hasImageInput, hasAudioInput, hasVideoInput, hasTextOutput, hasImageOutput, hasAudioOutput, hasVideoOutput, hasFunctionCalling, hasStreaming, hasSystemMessages, hasReasoning, reasoningLevel, supportsFineTuning, supportsWebSearch.
  • showInPrimaryList, requiredSubscriptionLevel
    Display hint and the plan level the model needs.

Phone runtime secrets

GET /api/Customers/my-secrets only accepts a phone token from POST /api/Auth/phone-login. It returns openAIApiKey, openAIProjectId, openAIAdminApiKey, googleMapsApiKey, googleCloudProjectIds, azureCostResourceGroupScopes, twilioAccountSID, twilioAuthToken, twilioRegion and twiMLAppSID. Representative tokens get 403 Forbidden; integrations do not need this endpoint.

FAQ

No. Reads only show has... flags. Send a new value to replace a secret or a clear... flag to remove it.

The update replaces the settings. Send the full object from GET /api/Customers/me with your changes; only secrets and a few listed fields are kept when left out.

Configurator and Administrator. Every signed-in user may read the customer and the models.

Need more help?

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

AnswerPal
Bisschoppenhoflaan 380
2100 Antwerp
Belgium

+32.36416685

BE 0862.692.858