API

Introduction

The Requesty API allows you to send and retrieve conversational data for analysis and insights. This documentation provides detailed information on how to use the API effectively.

Base URL

The base URL for the Requesty API is https://api.requesty.ai/chat

Authentication

Authentication is required to access the API. You can obtain an API token through two methods: manually requesting it or using the Requesty Settings website.

Manual API Token Request

To obtain an API token manually, please contact [email protected] or [email protected]. They will provide you with the necessary API token for authentication.

API Token via Settings

Alternatively, you can obtain an API token via the Requesty Settings website by following these steps:

  1. Log in to your Requesty account.

  2. Navigate to the API Token section.

  3. Click on "Generate API Token" or a similar option.

  4. Your API token will be displayed. Keep it secure as it will be used for authentication in API requests.

Data Structure

Data sent to and received from the Requesty API should be structured in JSON format. The data should contain the following fields:

Required Fields

  • author: The author of the message (e.g., user, operator, bot).

  • message: The content of the message.

  • timestamp: The timestamp of the message.

  • conversation_id: The ID of the conversation.

  • organization_id: The ID of your organization.

Optional Fields

  • tokens: Tokens associated with the message.

  • ip_address: The IP address of the sender.

  • user_url: URL related to the user.

  • engine: The engine used in the conversation.

  • responder_name: Name of the responder (if applicable).

  • responder_email: Email of the responder (if applicable).

  • type: The type of message (e.g., text, SMS, etc.).

Example JSON Format

Here is an example of how your data should be structured in JSON format:

{
  "author": "operator",
  "message": "Hello, how can I assist you?",
  "timestamp": "2023-01-31T14:45:00Z",
  "conversation_id": "12345",
  "organization_id": "demo",
  "user_url": "https://example.com",
  "engine": "GPT-4",
  "responder_name": "Operator1",
  "responder_email": "[email protected]",
  "type": "text"
}

API Endpoints

The Requesty API provides endpoints for sending and retrieving data. Please refer to our API documentation for specific endpoint details and usage instructions.

Last updated