User details API specification
How to set up your AI agent to use user data ingested via API to improve its responses.
Overview
This API, provided by your company, allows us to retrieve user information based on a provided identifier. The endpoint will accept a POST request and will return relevant user data.
Endpoint
Example URL:
https://api.client.com/user-data
Method:
POST
Headers
Authorization (required): The request must include an
Authorization
header with an API key provided to My AskAI.Content-Type (required): The request should accept only:
application/json
No other headers are required.
Request Body
The request will come from My AskAI with every new support ticket or support conversation.
The request body will be in JSON format and will include only the following field:
identifier
: (String) The unique email of the user whose data is being requested. This must be available to My AskAI from an authenticated or valid source e.g. extracted from a Zendesk ticket or authenticated Intercom conversation
Response
The API must respond with a JSON object containing the requested user information:
user_info
: (String) Information related to the user.Tip: Provide all relevant info that might be needed to support a request or question about their account. Try to avoid providing unnecessary information. Provide information in a concise format.
identifier
: (String) The same identifier provided in the request.
Performance Requirements
The API must respond within 10 seconds.
The API must be capable of responding for each new support conversation or ticket.
Error Handling
401 Unauthorized: If the
Authorization
header is missing or invalid.400 Bad Request: If the request body does not contain the required
identifier
field or is improperly formatted.404 Not Found: If the user data is not found from the identifier
500 Internal Server Error: For any other unexpected errors.
If the API fails, the AI agent will continue support the user, but without any additional user data
Standards & Conventions
All requests must be in JSON format
All responses are in JSON format
Last updated