Skip to Content
CallMitraDocs
Errors

lead_has_no_campaign

Lead is not on a campaign.

HTTP statusTypeCode
422invalid_request_errorlead_has_no_campaign

What it means

Calling a lead uses the settings of its campaign. Add the lead to an outbound campaign first.

How to handle it

Fix the request before sending it again; retrying the same request returns the same error. error.param names the offending field when there is one.

Example response

{
  "detail": [
    {
      "type": "missing",
      "loc": [
        "body",
        "phone"
      ],
      "msg": "Field required"
    }
  ],
  "error": {
    "type": "invalid_request_error",
    "code": "lead_has_no_campaign",
    "message": "Lead is not on a campaign.",
    "param": "phone",
    "docUrl": "https://docs.callmitra.ai/errors/lead_has_no_campaign",
    "requestId": "req_3f9c2a7d1b8e4c6a9f0e2d4b6a8c0e1f"
  }
}

Branch on error.code; it never changes once published. The message text can change. See Errors for the envelope.

Returned by

  • POST /api/v1/leads/{lead_id}/call-now — Call a lead now

On this page