Follow-Up Request Creation

This page will help you to understand the process of creating follow-up conversations

To create a follow-up conversation within an existing case, you need to make an API request and integrate the dynamic form in your front end using an iframe.

1. Create a Follow-Up Conversation

Perform a POST API call to:

POST https://intrepidfox.app/api/v1/cases/{case_id}/conversations

Replace {case_id} with the UUID of the case you're creating a follow-up for.

Request Parameters:

ParameterValue FormatDescription
case_kindStringType of follow-up case. Accepted values are: monitoring_follow_up, onboarding_follow_up
modulesList of modulesList of modules to execute during follow-up. Example:

For Onboarding Follow-Up, available modules include:

[
  {"module": "business_description"},
  {"module": "invoice_with_client"},
  {"module": "invoice_from_supplier"},
  {"module": "contract_with_client"},
  {"module": "contract_from_supplier"},
  {"module": "license"},
  {"module": "proof_of_identity"},
  {"module": "website"},
  {"module": "follow_up", "question": "Your custom question", "subject": "Optional short subject"}
]

For Monitoring Follow-Up, available modules include:

[
  {"module": "invoice"},
  {"module": "contract"},
  {"module": "transaction_rationale"},
  {"module": "charter_agreement"},
  {"module": "cargo_bill"},
  {"module": "company_proof_of_address"},
  {"module": "other_document", "document_name": "Document Name", "question": "Your instructions to the user"},
  {"module": "follow_up", "question": "Your custom question", "subject": "Short subject"}
]

Example Response:

On successful creation:

{
  "result": "conversation_created",
  "conversation_id": "...",
  "case_id": "..."
}
  • conversation_id is used to access the individual follow-up dialog.
  • case_id remains consistent across all conversations within the same case.

On failure, you will receive:

{
  "result": "conversation_not_created",
  "message": "Explanation of why conversation wasn't created"
}

Receive New Follow Up Notification

When the new follow-up is created (via the API or manually via the web interface), a webhook call (HTTP POST with Basic Authentication) will be made to your specified endpoint with the following payload:

{
  "link": "...",
  "case_id": "...",
  "conversation_id": "...",
  "communication_id": "..."
}

Payload Parameters:

ParameterValue FormatDescription
linkURL of theLink to newly created follow-up conversation (should be sent to user) or used in the iframe
case_idUUID stringID of the case
conversation_idUUID stringID of the newly created conversation (dialog session with the user)
communication_idString (optional)Original reference ID you provided

This webhook allows your backend to react on the newly created follow-up conversation (for example, to send e-mail to your client).

Receive Follow-up Results via Webhook

Upon completion of the follow-up dialog, a webhook call (HTTP POST with Basic Authentication) will be made to your specified endpoint with the following payload:

{
  "event": "chat_finished",
  "case_id": "...",
  "conversation_id": "...",
  "communication_id": "...",
  "pdf_report_link": "...",
  "web_report_link": "...",
  "client_documents": [
    {
      "document_id": "...",
      "document_type": "...",
      "document_name": "...",
      "rejected": "...",
      "download_link": "..."
    },
    ...
  ]
}

Payload Parameters:

ParameterValue FormatDescription
eventString (chat_finished)Always present
case_idUUID stringMatches the ID used in the case
conversation_idUUID stringConversation ID returned earlier
communication_idString (optional)Original reference ID you provided
pdf_report_linkStringURL to download PDF report (protected)
web_report_linkStringURL to access web report (protected)
client_documentsArrayList of uploaded documents

This webhook allows you to handle conversation results and client documents automatically.