Notification > Notification Hub > API v1.0 User Guide > Flow
Request
POST /flow/v1.0/flows
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| appKey | Header | String | Y | Appkey |
| accessToken | Header | String | Y | Authentication Token |
Request Body
{
"flowName": "Flow_Name",
"description": "Flow_Description",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "Email_Template_Id",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "AlimTalk_Template_Id",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_Template_Id",
"nextSteps": []
}
]
}
]
}
}
| Name | Type | Required | Description |
|---|---|---|---|
| flowName | String | Y | Flow name |
| description | String | N | Flow description |
| messagePurpose | String | Y | Message purpose NORMAL, AD, AUTH, Authentication |
| steps | Object | Y | Flow step |
| steps.messageChannel | String | Y | Message channel SMS, RCS, ALIMTALK, EMAIL, PUSH |
| steps.templateId | String | Y | Template ID |
| steps.nextSteps | Object Array | N | Next step |
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"flowId": "Flow_Id"
}
Request Example
### Create a flow
POST {{endpoint}}/flow/v1.0/flows
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
{
"flowName": "Flow_Name",
"description": "Flow_Description",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "Email_Template_Id",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "AlimTalk_Template_Id",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_Template_Id",
"nextSteps": []
}
]
}
]
}
}
curl -X POST "${ENDPOINT}/flow/v1.0/flows" \
-H "Content-Type: application/json" \
-h "x-nc-app-key: ${app_key}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}" \
-d '{
"flowName": "Flow_Name",
"description": "Flow_Description",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "Email_Template_Id",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "AlimTalk_Template_Id",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_Template_Id",
"nextSteps": []
}
]
}
]
}'
Request
GET /flow/v1.0/flows
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| appKey | Header | String | Y | Appkey |
| accessToken | Header | String | Y | Authentication Token |
| flowId | Query | String | N | Flow ID |
| flowName | Query | String | N | Searchable by the flow name, prefix, and single character wildcard |
| limit | Query | Integer | N | Views per page |
| offset | Query | Integer | N | Page offset |
Request Body
This API does not require a request body.
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"flows": [
{
"flowId": "Flow_Id",
"flowName": "Flow_Name",
"description": "Flow description",
"messagePurpose": "NORMAL",
"steps": [
{
"messageChannel": "EMAIL",
"templateId": "Email_Template_Id",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "AlimTalk_Template_Id",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_Template_Id",
"nextSteps": []
}
]
}
]
}
]
}
]
}
Request Example
### View flows
GET {{endpoint}}/flow/v1.0/flows
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
curl -X GET "${ENDPOINT}/flow/v1.0/flows" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
Request
GET /flow/v1.0/flows/{flowId}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| appKey | Header | String | Y | Appkey |
| accessToken | Header | String | Y | Authentication Token |
| flowId | Path | String | Y | Flow ID |
Request Body
This API does not require a request body.
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
},
"flow": {
"flowId": "Flow_Id",
"flowName": "Flow_Name",
"description": "Flow description",
"messagePurpose": "NORMAL",
"steps": [
{
"messageChannel": "EMAIL",
"templateId": "Email_Template_Id",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "AlimTalk_Template_Id",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_Template_Id",
"nextSteps": []
}
]
}
]
}
]
}
}
Request Example
### Get Flow
GET {{endpoint}}/flow/v1.0/flows/{{flowId}}
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
curl -X GET "${ENDPOINT}/flow/v1.0/flows/${FLOW_ID}" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"
Request
PUT /flow/v1.0/flows/{flowId}
Content-Type: application/json
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| appKey | Header | String | Y | Appkey |
| accessToken | Header | String | Y | Authentication Token |
| flowId | Path | String | Y | Flow ID |
Request Body
{
"flowName": "Flow_Name",
"description": "Flow_Description",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "Email_Template_Id",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "AlimTalk_Template_Id",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_Template_Id",
"nextSteps": []
}
]
}
]
}
}
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
Request Example
### Modify a flow
PUT {{endpoint}}/flow/v1.0/flows/{{flowId}}
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
{
"flowName": "Flow_Name",
"description": "Flow_Description",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "Email_Template_Id",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "AlimTalk_Template_Id",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_Template_Id",
"nextSteps": []
}
]
}
]
}
}
curl -X PUT "${ENDPOINT}/flow/v1.0/flows/${FLOW_ID}" \
-H "Content-Type: application/json" \
-h "x-nc-app-key: ${app_key}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}" \
-d '{
"flowName": "Flow_Name",
"description": "Flow_Description",
"messagePurpose": "NORMAL",
"steps": {
"messageChannel": "EMAIL",
"templateId": "Email_Template_Id",
"nextSteps": [
{
"messageChannel": "ALIMTALK",
"templateId": "AlimTalk_Template_Id",
"nextSteps": [
{
"messageChannel": "SMS",
"templateId": "SMS_Template_Id",
"nextSteps": []
}
]
}
]
}'
}
Request
DELETE /flow/v1.0/flows/{flowId}
X-NC-APP-KEY: {appKey}
X-NHN-Authorization: Bearer {accessToken}
Request Parameter
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| appKey | Header | String | Y | Appkey |
| accessToken | Header | String | Y | Authentication Token |
| flowId | Path | String | Y | Flow ID |
Request Body
This API does not require a request body.
Response Body
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
Request Example
### Delete a flow
DELETE {{endpoint}}/flow/v1.0/flows/{{flowId}}
Content-Type: application/json
X-NC-APP-KEY: {{appKey}}
X-NHN-Authorization: {{authorizationToken}}
curl -X DELETE "${ENDPOINT}/flow/v1.0/flows/${FLOW_ID}" \
-H "Content-Type: application/json" \
-H "X-NC-APP-KEY: ${APP_KEY}" \
-H "X-NHN-Authorization: ${ACCESS_TOKEN}"