Skip to content
First requestVisit website ↗
Navigation

Ask LeadGPT for agent action recommendations

Returns non-mutating LeadGPT action cards for the authenticated workspace. The route derives workspace access from apiKeyAuth and only uses the client workspace id for auth scoping.

POST
https://api.channelautomation.com/api/customer-hub/leadgpt/ask

Authorization

  • BearerAuth
    optional
    HTTP Bearer (JWT)
  • ApiKeyAuth
    optional
    API key in header

Request body JSON required

  • workspace_id
    string
    required

    Workspace id used by apiKeyAuth to validate membership. Business logic uses req.user.workspace_id after authentication.

  • prompt
    optional
    string

    Natural language LeadGPT prompt. Empty prompts default to "What should I do next?"

  • selectedContactId
    optional
    string

    Optional contact id to summarize or draft against.

    format: uuid

Returns

200

LeadGPT answer and ranked non-mutating action cards

400

Missing workspace access or invalid request

401

Authentication required
JSON
  • error
    optional
    string
  • success
    optional
    boolean

404

Selected contact is not available in the authenticated workspace

500

Internal server error
JSON
  • error
    optional
    string
  • details
    optional
    string
  • success
    optional
    boolean

Type to search…

↑↓ navigate↵ selectEsc close