POST
/
crm
/
step

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

The name for the new CRM step.

scenarioId
string
required

The ID of the CRM scenario this step belongs to.

agentId
string | null

Optional Agent ID to associate with this step.

trigger
string | null

A trigger condition or keyword for this step. Either this or 'prompt' is required.

prompt
string | null

The main prompt or instruction for this step. Either this or 'trigger' is required.

initialMessage
string | null

An initial message to be sent when this step is activated.

autoNextStepId
string | null

ID of the step to automatically transition to.

autoNextTime
integer | null

Time in seconds to wait before auto-transitioning.

defaultStatus
enum<string> | null

Default status for conversations at this step.

Available options:
RESOLVED,
UNRESOLVED,
HUMAN_REQUESTED
defaultPriority
enum<string> | null

Default priority for conversations at this step.

Available options:
LOW,
MEDIUM,
HIGH
assigneeLogicType
enum<string> | null

Logic for assigning conversations at this step.

Available options:
none,
clear,
single_user,
random_selected,
fair_distribution_selected
selectedMembershipIdsForAssignee
string[] | null

List of membership IDs for assignee logic. Required for single_user, random_selected, and fair_distribution_selected.

isRequired
boolean | null

Indicates if this step is mandatory.

autoNextTimeUnit
enum<string> | null

The time unit for auto-transition.

Available options:
m,
h,
d
defaultTags
string[] | null

Default tags to add to the conversation.

defaultTagsToRemove
string[] | null

Default tags to remove from the conversation.

requestContact
object | null

Configuration for requesting contact information.

isConversationRemovalStep
boolean | null

If true, this step removes the conversation from the scenario.

zapiAgentId
string | null

Z-API Agent ID for sending messages.

zapiPhoneNumber
string | null

Z-API phone number for sending messages.

zapiMessage
string | null

Z-API message to send.

whatsappTemplateAgentId
string | null

Agent ID for WhatsApp template message.

whatsappTemplateName
string | null

Name of the WhatsApp template.

whatsappTemplateLanguageCode
string | null

Language code for the WhatsApp template.

whatsappTemplateText
string | null

Text content of the WhatsApp template.

defaultAiControl
boolean | null

Default AI control setting for the conversation.

webhookUrl
string | null

URL for the webhook to be called.

webhookHeader
object | null

Headers for the webhook request.

Response

201 - application/json
id
string

The unique identifier for the CRM step.

name
string

The name of the CRM step.

index
integer

The order/index of the step within its scenario.

prompt
string | null

The main prompt or instruction for this step.

trigger
string | null

A trigger condition or keyword for this step.

initialMessage
string | null

An initial message to be sent when this step is activated.

autoNextStepId
string | null

ID of the step to automatically transition to after this one.

autoNextTime
integer | null

Time in seconds to wait before automatically transitioning to autoNextStepId.

autoNextTimeUnit
enum<string> | null

The time unit for auto-transition.

Available options:
m,
h,
d
defaultStatus
enum<string> | null

Default status to set for conversations reaching this step.

Available options:
RESOLVED,
UNRESOLVED,
HUMAN_REQUESTED
defaultPriority
enum<string> | null

Default priority to set for conversations reaching this step.

Available options:
LOW,
MEDIUM,
HIGH
defaultAiControl
boolean | null

Default AI control setting for the conversation.

assigneeLogicType
enum<string> | null

Logic for assigning conversations at this step.

Available options:
none,
clear,
single_user,
random_selected,
fair_distribution_selected
selectedMembershipIdsForAssignee
string[] | null

List of membership IDs for assignee logic.

isRequired
boolean | null

Indicates if this step is mandatory.

isConversationRemovalStep
boolean | null

If true, this step removes the conversation from the scenario.

defaultTags
string[] | null

Default tags to add to the conversation.

defaultTagsToRemove
string[] | null

Default tags to remove from the conversation.

requestContact
object | null

Configuration for requesting contact information.

organizationId
string
agentId
string | null
scenarioId
string
zapiAgentId
string | null

Z-API Agent ID for sending messages.

zapiPhoneNumber
string | null

Z-API phone number for sending messages.

zapiMessage
string | null

Z-API message to send.

whatsappTemplateAgentId
string | null

Agent ID for WhatsApp template message.

whatsappTemplateName
string | null

Name of the WhatsApp template.

whatsappTemplateLanguageCode
string | null

Language code for the WhatsApp template.

whatsappTemplateText
string | null

Text content of the WhatsApp template.

webhookUrl
string | null

URL for the webhook to be called.

webhookHeader
object | null

Headers for the webhook request.

createdAt
string

Timestamp of when the step was created.

updatedAt
string

Timestamp of when the step was last updated.

agent
object | null
scenario
object