Outcomes

Change an outcome form, or switch it live or off

Requires the agent:write scope.

Send only what changes; questions replaces the list, so send each kept question with its id. meeting as the id sets Book a meeting's questions (asked before the calendar), phone step and not-a-fit message; it is live while it has questions.

patch/outcomes/{id}

Request

  • Base URL: https://api.meetdarwin.ai/v1
  • URL: https://api.meetdarwin.ai/v1/outcomes/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

Headers

Idempotency-Keystring

Retry safely: the first response is replayed for 24 hours (not for streamed answers).

Request body

namestring

The form's name, e.g. "Request a quote".

button_labelstring

The button the agent shows above the message box when it offers the form; the name when left out.

offer_whenstring

When the agent opens it, finishing "Offer it when the visitor…", e.g. "asks what a job would cost or wants an estimate".

phone'off' | 'optional' | 'required'

Whether the last step also asks for a phone number.

then'message' | 'meeting'

After the form: show done_message, or go on to book a meeting.

done_messagestring

The thank-you the visitor sees once it is sent.

meeting_optionalboolean

With then: meeting, the visitor may send the request without booking.

not_fit_messagestring

Shown instead of the calendar to a visitor whose answers are not a fit.

notifystring[]

Up to 5 extra addresses that get each request by email, such as sales@.

top_of_chatboolean

Put its button under the agent's name at the top of the chat, in place of Book a meeting (one at a time; a form's shows while it is live).

status'live' | 'draft'

live: the agent offers it to visitors. draft: saved but never offered. Default draft.

Response

OK

idstring required

out_…, or meeting for Book a meeting before it has been saved with questions.

object'outcome' required
kind'form' | 'meeting' required

meeting: the built-in Book a meeting, whose questions come before the calendar. form: a form you built.

namestring required
status'live' | 'draft' required

live: the agent offers it. Book a meeting is live while it has questions.

button_labelstring required

The button the agent shows above the message box when it offers the form.

offer_whenstring required

When the agent opens it: "Offer it when the visitor…".

then'message' | 'meeting' required
meeting_optionalboolean required
required_before_bookingboolean required
phone'off' | 'optional' | 'required' required
done_messagestring required
not_fit_messagestring required
notifystring[] required
top_of_chatboolean required
versioninteger required
updated_atstring date-time nullable required

Example response

{
  "id": "out_hnuk3nnp4kwt7hlb"
}

Changes

No recorded changes to this operation across all 1 revision of this API.