Base URL
All API endpoints are prefixed with the following base URL:Create a Conversation
Create a new conversation instance.- Endpoint:
POST /conversations
- Authentication: API Key Required
Headers
Conversation Usecases
Theusecase
field determines the conversation’s purpose and behavior:
-
DEFAULT (
"usecase": "DEFAULT"
)- Standard conversation, chat with the GAIFE system
- Used for general messaging purposes
-
WORKFLOW_EXECUTION (
"usecase": "WORKFLOW_EXECUTION"
)- Used when executing an existing workflow
- Automatically sets metadata with
workflow_id
from config - Enables workflow-specific message processing
callback_url
in config
to receive a webhook/callback on every message of conversation.
Request Body
Response
Example Usecases Request Body
=== “Workflow Execution”Notes
- For
WORKFLOW_EXECUTION
, the metadata will automatically include the workflow_id from config - The
DEFAULT
usecase provides the most flexibility for custom implementations - All usecases support custom metadata for additional context
- The
channel
field is used to specify the communication channel, currently onlyAPI
is supported - To receive a webhook on every message of conversation, configure a
callback_url
inconfig
Example Request
Example Response
Status Codes
201
: Conversation created successfully400
: Invalid request data401
: Invalid or missing API key500
: Server error
Get Conversation Messages
Retrieve all messages in a conversation.- Endpoint:
GET /conversations/{conversation_id}/messages
- Authentication: Required
Path Parameters
conversation_id
: The ID of the conversation
Example Request
Response
- Messages are returned in chronological order, from newest to oldest.
Status Codes
200
: Success404
: Conversation not found500
: Server error
Notes
-
Content Types:
TEXT
: Regular text messagesIMAGE
: Image filesVIDEO
: Video filesAUDIO
: Audio files
-
Message Types:
USER_INPUT
: Messages from users- Other types as per your MessageType choices
-
Message Status:
RECEIVED
: Message has been received- Other statuses as per your MessageStatus choices
-
Response Fields:
id
: Unique message identifiercontent
: Message content/textfilename
: Present only for media messagesmetadata
: Optional JSON object for additional data