{
  "openapi": "3.0.3",
  "info": {
    "title": "센딧 고객사 연동 API",
    "version": "1.0.0",
    "description": "센딧 API 연동 가이드에서 안내하는 고객사 호출용 규격입니다. 성공 여부는 HTTP 상태와 header.isSuccess를 함께 확인합니다."
  },
  "servers": [
    {
      "url": "https://admin.sendit.kr/api"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/member/login/accesskey": {
      "post": {
        "summary": "Access Key로 토큰 발급",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accesskey": {
                    "type": "string"
                  }
                },
                "required": [
                  "accesskey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "201": {
            "description": "요청 접수",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "header": {
                      "$ref": "#/components/schemas/SuccessHeader"
                    },
                    "body": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "token": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "token"
                          ]
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  },
                  "required": [
                    "header",
                    "body"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/message/sender/sms": {
      "post": {
        "summary": "SMS 발송",
        "parameters": [
          {
            "name": "X-Send-Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "발송 추가인증 사용 계정의 일회용 인증값"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sendNo": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "recipientList": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Recipient"
                    },
                    "minItems": 1
                  },
                  "isAd": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "requestDate": {
                    "type": "string",
                    "description": "예약 시 한국 시간 YYYY-MM-DD HH:mm. 즉시 발송은 생략합니다."
                  }
                },
                "required": [
                  "sendNo",
                  "body",
                  "recipientList"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "201": {
            "description": "요청 접수",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "header": {
                      "$ref": "#/components/schemas/SuccessHeader"
                    },
                    "body": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "requestId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "requestId"
                          ]
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  },
                  "required": [
                    "header",
                    "body"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/message/sender/mms": {
      "post": {
        "summary": "LMS·MMS 발송",
        "parameters": [
          {
            "name": "X-Send-Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "발송 추가인증 사용 계정의 일회용 인증값"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sendNo": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "recipientList": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Recipient"
                    },
                    "minItems": 1
                  },
                  "isAd": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "requestDate": {
                    "type": "string",
                    "description": "예약 시 한국 시간 YYYY-MM-DD HH:mm. 즉시 발송은 생략합니다."
                  },
                  "title": {
                    "type": "string"
                  },
                  "attachFileId": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "required": [
                  "sendNo",
                  "body",
                  "recipientList"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "201": {
            "description": "요청 접수",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "header": {
                      "$ref": "#/components/schemas/SuccessHeader"
                    },
                    "body": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "requestId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "requestId"
                          ]
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  },
                  "required": [
                    "header",
                    "body"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/message/sender/upload": {
      "post": {
        "summary": "MMS 이미지 업로드",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "minItems": 1,
                    "maxItems": 2
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "201": {
            "description": "요청 접수",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "header": {
                      "$ref": "#/components/schemas/SuccessHeader"
                    },
                    "body": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "fileId"
                            ]
                          }
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  },
                  "required": [
                    "header",
                    "body"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/message/sender/alimtalk": {
      "post": {
        "summary": "알림톡 발송",
        "parameters": [
          {
            "name": "X-Send-Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "발송 추가인증 사용 계정의 일회용 인증값"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plusFriendId": {
                    "type": "string"
                  },
                  "templateCode": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "recipientList": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Recipient"
                    },
                    "minItems": 1
                  },
                  "requestDate": {
                    "type": "string",
                    "description": "예약 시 한국 시간 YYYY-MM-DD HH:mm. 즉시 발송은 생략합니다."
                  },
                  "templateParameter": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "plusFriendId",
                  "templateCode",
                  "body",
                  "recipientList"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "201": {
            "description": "요청 접수",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "header": {
                      "$ref": "#/components/schemas/SuccessHeader"
                    },
                    "body": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "requestId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "requestId"
                          ]
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  },
                  "required": [
                    "header",
                    "body"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/message/sending/{requestId}": {
      "get": {
        "summary": "발송 묶음 집계",
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "발송 접수 응답의 requestId"
          }
        ],
        "responses": {
          "200": {
            "description": "처리 결과",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "header": {
                          "$ref": "#/components/schemas/SuccessHeader"
                        },
                        "body": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "oneOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[0-9]+$"
                                }
                              ]
                            },
                            "data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "requestId": {
                                    "type": "string"
                                  },
                                  "messageType": {
                                    "type": "string"
                                  },
                                  "requested": {
                                    "oneOf": [
                                      {
                                        "type": "integer"
                                      },
                                      {
                                        "type": "string",
                                        "pattern": "^[0-9]+$"
                                      }
                                    ]
                                  },
                                  "sentSuccess": {
                                    "oneOf": [
                                      {
                                        "type": "integer"
                                      },
                                      {
                                        "type": "string",
                                        "pattern": "^[0-9]+$"
                                      }
                                    ]
                                  },
                                  "sentFailed": {
                                    "oneOf": [
                                      {
                                        "type": "integer"
                                      },
                                      {
                                        "type": "string",
                                        "pattern": "^[0-9]+$"
                                      }
                                    ]
                                  },
                                  "pending": {
                                    "oneOf": [
                                      {
                                        "type": "integer"
                                      },
                                      {
                                        "type": "string",
                                        "pattern": "^[0-9]+$"
                                      }
                                    ]
                                  },
                                  "canceled": {
                                    "oneOf": [
                                      {
                                        "type": "integer"
                                      },
                                      {
                                        "type": "string",
                                        "pattern": "^[0-9]+$"
                                      }
                                    ]
                                  },
                                  "reservationState": {
                                    "type": "string",
                                    "nullable": true
                                  }
                                }
                              }
                            }
                          },
                          "required": [
                            "data"
                          ]
                        }
                      },
                      "required": [
                        "header",
                        "body"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/message/{requestId}": {
      "get": {
        "summary": "수신자별 결과 조회",
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "발송 접수 응답의 requestId"
          }
        ],
        "responses": {
          "200": {
            "description": "처리 결과",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "header": {
                          "$ref": "#/components/schemas/SuccessHeader"
                        },
                        "body": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "oneOf": [
                                {
                                  "type": "integer"
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[0-9]+$"
                                }
                              ]
                            },
                            "data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "recipientNo": {
                                    "type": "string"
                                  },
                                  "body": {
                                    "type": "string"
                                  },
                                  "resultMessage": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          },
                          "required": [
                            "data"
                          ]
                        }
                      },
                      "required": [
                        "header",
                        "body"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "예약 취소 요청",
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "발송 접수 응답의 requestId"
          }
        ],
        "responses": {
          "200": {
            "description": "처리 결과",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "header": {
                          "$ref": "#/components/schemas/SuccessHeader"
                        },
                        "body": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "properties": {
                                "requestId": {
                                  "type": "string"
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "RESERVED",
                                    "PROCESSING",
                                    "VERIFYING",
                                    "CANCELED",
                                    "PARTIAL",
                                    "FAILED"
                                  ]
                                },
                                "requestedCount": {
                                  "oneOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^[0-9]+$"
                                    }
                                  ]
                                },
                                "canceledCount": {
                                  "oneOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^[0-9]+$"
                                    }
                                  ]
                                },
                                "unknownCount": {
                                  "oneOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^[0-9]+$"
                                    }
                                  ]
                                },
                                "refundTotal": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "requestId",
                                "state"
                              ]
                            }
                          },
                          "required": [
                            "data"
                          ]
                        }
                      },
                      "required": [
                        "header",
                        "body"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/message/{requestId}/cancellation": {
      "get": {
        "summary": "예약 취소 상태 조회",
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "발송 접수 응답의 requestId"
          }
        ],
        "responses": {
          "200": {
            "description": "처리 결과",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "header": {
                          "$ref": "#/components/schemas/SuccessHeader"
                        },
                        "body": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "properties": {
                                "requestId": {
                                  "type": "string"
                                },
                                "state": {
                                  "type": "string",
                                  "enum": [
                                    "RESERVED",
                                    "PROCESSING",
                                    "VERIFYING",
                                    "CANCELED",
                                    "PARTIAL",
                                    "FAILED"
                                  ]
                                },
                                "requestedCount": {
                                  "oneOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^[0-9]+$"
                                    }
                                  ]
                                },
                                "canceledCount": {
                                  "oneOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^[0-9]+$"
                                    }
                                  ]
                                },
                                "unknownCount": {
                                  "oneOf": [
                                    {
                                      "type": "integer"
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^[0-9]+$"
                                    }
                                  ]
                                },
                                "refundTotal": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "requestId",
                                "state"
                              ]
                            }
                          },
                          "required": [
                            "data"
                          ]
                        }
                      },
                      "required": [
                        "header",
                        "body"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/account-security/send": {
      "post": {
        "summary": "발송 추가인증",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "enum": [
                      "/message/sender/sms",
                      "/message/sender/mms",
                      "/message/sender/alimtalk"
                    ]
                  },
                  "payload": {
                    "type": "object"
                  }
                },
                "required": [
                  "code",
                  "path",
                  "payload"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "201": {
            "description": "요청 접수",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "header": {
                      "$ref": "#/components/schemas/SuccessHeader"
                    },
                    "body": {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "grant": {
                              "type": "string"
                            },
                            "expiresIn": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "grant",
                            "expiresIn"
                          ]
                        }
                      },
                      "required": [
                        "data"
                      ]
                    }
                  },
                  "required": [
                    "header",
                    "body"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "요청 실패. HTTP 200에서도 header.isSuccess가 false일 수 있습니다.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "Recipient": {
        "type": "object",
        "properties": {
          "recipientNo": {
            "type": "string"
          },
          "custormerIdx": {
            "type": "string",
            "nullable": true
          },
          "custormerName": {
            "type": "string"
          }
        },
        "required": [
          "recipientNo"
        ]
      },
      "SuccessHeader": {
        "type": "object",
        "properties": {
          "isSuccess": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "resultCode": {
            "type": "string",
            "enum": [
              "0"
            ]
          },
          "resultMessage": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "isSuccess",
          "resultCode"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "header": {
            "type": "object",
            "properties": {
              "isSuccess": {
                "type": "boolean",
                "enum": [
                  false
                ]
              },
              "resultCode": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "integer"
                  }
                ]
              },
              "resultMessage": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                ]
              },
              "timestamp": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "isSuccess",
              "resultCode",
              "resultMessage"
            ]
          },
          "body": {
            "type": "object",
            "properties": {
              "data": {
                "type": "object"
              }
            }
          }
        },
        "required": [
          "header"
        ]
      }
    }
  }
}
