Scenario Steps
Add, update, and delete individual steps (send email, wait, etc.) within a scenario.
|
Endpoints
| POST | /api/v1/mail/scenarios/{id}/steps | Create a step |
| PATCH | /api/v1/mail/scenarios/{id}/steps/{stepId} | Update a step |
| DELETE | /api/v1/mail/scenarios/{id}/steps/{stepId} | Delete a step |
POST
/api/v1/mail/scenarios/{id}/stepsCreate a step
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Optional | Scenario ID |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
type | string | Required | Step type (send_email / wait) |
subject | string | Optional | Email subject (for send_email type) |
html_body | string | Optional | HTML body (for send_email type) |
text_body | string | Optional | Text body (for send_email type) |
wait_days | integer | Optional | Wait days (for wait type) |
position | integer | Optional | Step position |
Code Examples
curl -X POST "https://api.blueai.jp/api/v1/mail/scenarios/scn_123e4567e89b12d3a456426614174000/steps" \
-H "Cookie: better-auth.session_token=<token>"PATCH
/api/v1/mail/scenarios/{id}/steps/{stepId}Update a step
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Optional | Scenario ID |
stepId | string | Optional | Step ID |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
subject | string | Optional | Email subject |
html_body | string | Optional | HTML body |
text_body | string | Optional | Text body |
wait_days | integer | Optional | Wait days |
position | integer | Optional | Step position |
Code Examples
curl -X PATCH "https://api.blueai.jp/api/v1/mail/scenarios/scn_123e4567e89b12d3a456426614174000/steps/step_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>"DELETE
/api/v1/mail/scenarios/{id}/steps/{stepId}Delete a step
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Optional | Scenario ID |
stepId | string | Optional | Step ID |
Code Examples
curl -X DELETE "https://api.blueai.jp/api/v1/mail/scenarios/scn_123e4567e89b12d3a456426614174000/steps/step_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>"