Skip to main content

POST /api/v1/growth/quote

Generate a credit estimate for a growth run based on a goal_plan returned by /growth/resolve. If the plan is valid and all input requirements are met, the response includes a quote_token to pass to POST /api/v1/growth/run.

Request body

goal_plan
object
required
Structured plan object from POST /api/v1/growth/resolve. Pass the goal_plan field unchanged.
max_external_spend_credits
integer
Optional credit cap on external provider spend. The quote fails with error_code: max_external_spend_too_low if the estimated provider cost exceeds this value.
chat_id
string
Optional UUID of a chat to associate the resulting run with.

Response

ok
boolean
true when the quote was successfully generated.
quotable
boolean
true when the plan is ready to run. false when the request cannot proceed — inspect error_code and detail.
quote_token
string
Single-use token. Pass to POST /api/v1/growth/run. Present only when quotable is true.
expiry
string
ISO 8601 timestamp when the quote token expires.
credits_total
integer
Total credits that will be deducted when the run is confirmed.
cost_breakdown
object
Per-capability credit breakdown.
provider_estimate
object
Estimated delivered counts from the external provider.
expected_artifacts
object
Preview of output artifacts (e.g. { "verified_emails": 80, "enriched_contacts": 100 }).
goal_plan
object
Normalised goal plan used to compute the quote. Pass this — not the original — to /run.
missing_requirements
array
Present when quotable is false. Lists the missing inputs.
error_code
string
Machine-readable failure reason when ok is false. Values: invalid_goal_plan, missing_input_assets, max_external_spend_too_low, quote_validation_failed.
detail
string
Human-readable explanation when ok is false.
suggested_next_action
string
Instruction for what to do next.

Example

cURL
curl -X POST https://api.deepcurrent.app/api/v1/growth/quote \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "goal_plan": {
      "pipeline_id": "email_discovery_v1",
      "preset": "full_pipeline",
      "output": { "required_fields": ["email"], "preview_rows": 10 }
    }
  }'
Response (quotable)
{
  "ok": true,
  "quotable": true,
  "quote_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expiry": "2026-04-08T14:35:00Z",
  "credits_total": 850,
  "cost_breakdown": {
    "email_lookup": 500,
    "email_verify": 350
  },
  "provider_estimate": { "expected_contacts": 100 },
  "expected_artifacts": { "verified_emails": 80 },
  "goal_plan": { "pipeline_id": "email_discovery_v1", "preset": "full_pipeline" },
  "normalized_input_assets": { "companies": [], "contacts": [] },
  "missing_requirements": [],
  "suggested_next_action": "Confirm this quote to start the growth run.",
  "error_code": null,
  "detail": null
}
Response (not quotable)
{
  "ok": false,
  "quotable": false,
  "error_code": "missing_input_assets",
  "detail": "Growth plan is not quotable until the missing input requirements are supplied.",
  "missing_requirements": ["companies"],
  "suggested_next_action": "Supply a list of companies or contacts, then request a new quote.",
  "goal_plan": {}
}