PowerPlatformConnectors/certified-connectors/D7Messaging/apiDefinition.swagger.json

751 строка
23 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "D7Messaging",
"contact": {
"name": "D7Networks Support",
"url": "https://d7networks.com/contact/",
"email": "support@d7networks.com"
},
"description": "D7 offers a dependable and affordable cloud-based messaging platform that enables enterprises to engage with their customers through SMS, chat, and various social media platforms.",
"version": "1.0"
},
"host": "api.d7networks.com",
"basePath": "/",
"schemes": [
"https"
],
"consumes": [],
"produces": [],
"paths": {
"/messages/v1/send": {
"post": {
"summary": "Sends SMS",
"description": "Send SMS through D7 SMS Gateway",
"operationId": "SMS-SendMessage",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"originator": {
"type": "string",
"description": "Originator (Sender ID)",
"title": "originator",
"x-ms-visibility": "important"
},
"recipients": {
"type": "string",
"description": "Recipients (Destination numbers seperated by comma)",
"title": "recipients",
"x-ms-visibility": "important"
},
"content": {
"type": "string",
"description": "The message content is being sent",
"title": "content",
"x-ms-visibility": "important"
},
"report_url": {
"type": "string",
"description": "ReportURL (Call back URL to recieve delivery status report - DLR)",
"title": "report_url"
},
"data_coding": {
"type": "string",
"description": "Data encoding value (Available options are text,unicode and auto)",
"title": "data_coding",
"default": "auto",
"enum": [
"text",
"unicode",
"auto"
]
},
"num_lookup": {
"type": "boolean",
"description": "Activate the number lookup feature to ensure that messages are sent only to valid numbers",
"title": "num_lookup",
"enum": [
true,
false
],
"default": false
},
"schedule_time": {
"type": "string",
"description": "Schedule time with timezone (eg: 2023-04-17T16:18+04:00)",
"title": "schedule_time",
"format": ""
},
"client_ref": {
"type": "string",
"description": "client_ref",
"title": "client_ref",
"x-ms-visibility": "internal",
"default": "msflow"
},
"channel": {
"type": "string",
"description": "channel",
"title": "channel",
"x-ms-visibility": "internal",
"default": "sms"
}
},
"required": [
"originator",
"content",
"recipients",
"client_ref",
"channel"
]
},
"description": "messages"
}
},
"default": {
"messages": [
{
"originator": "Sender_ID",
"recipients": "recipient_numbers_seperated_by_comma",
"content": "The message content"
}
]
},
"required": [
"messages"
]
},
"required": true
}
],
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"request_id": {
"type": "string",
"description": "request_id"
},
"status": {
"type": "string",
"description": "status"
},
"created_at": {
"type": "string",
"description": "created_at"
}
}
}
},
"401": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "code"
},
"message": {
"type": "string",
"description": "message"
}
},
"description": "detail"
}
}
}
},
"422": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "array",
"items": {
"type": "object",
"properties": {
"loc": {
"type": "array",
"items": {
"type": "string"
},
"description": "loc"
},
"msg": {
"type": "string",
"description": "msg"
},
"type": {
"type": "string",
"description": "type"
}
}
},
"description": "detail"
}
}
}
}
}
}
},
"/messages/v1/balance": {
"get": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"balance": {
"type": "number",
"format": "float",
"description": "balance"
}
}
}
}
},
"summary": "Check Balance",
"description": "Check D7API account balance",
"operationId": "D7-Balance",
"parameters": []
}
},
"/hlr/v1/lookup": {
"post": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"country_code": {
"type": "string",
"description": "country_code"
},
"country_code_iso3": {
"type": "string",
"description": "country_code_iso3"
},
"recipient": {
"type": "string",
"description": "recipient"
},
"reachable": {
"type": "string",
"description": "reachable"
},
"network": {
"type": "string",
"description": "network"
},
"mcc": {
"type": "integer",
"format": "int32",
"description": "mcc"
},
"mnc": {
"type": "integer",
"format": "int32",
"description": "mnc"
},
"ported": {
"type": "boolean",
"description": "ported"
},
"cic": {
"type": "string",
"description": "cic"
},
"imsi": {
"type": "string",
"description": "imsi"
},
"ocn": {
"type": "string",
"description": "ocn"
},
"type": {
"type": "string",
"description": "type"
},
"request_id": {
"type": "string",
"description": "request_id"
},
"status_code": {
"type": "integer",
"format": "int32",
"description": "status_code"
},
"status": {
"type": "string",
"description": "status"
}
}
}
}
},
"summary": "Number Lookup",
"description": "D7's Number Lookup service to determine the current status of the number.",
"operationId": "NumberLookup",
"parameters": [
{
"name": "body",
"in": "body",
"required": false,
"schema": {
"type": "object",
"properties": {
"recipient": {
"type": "string",
"description": "Recipient",
"title": "recipient"
}
},
"required": [
"recipient"
]
}
}
]
}
},
"/verify/v1/otp/send-otp": {
"post": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"otp_id": {
"type": "string",
"description": "otp_id"
},
"status": {
"type": "string",
"description": "status"
},
"expiry": {
"type": "integer",
"format": "int32",
"description": "expiry"
}
}
}
}
},
"summary": "Send OTP",
"description": "Generate and dispatch an OTP (One-Time Password) to a mobile number.",
"operationId": "OTP-SendOTP",
"parameters": [
{
"name": "body",
"in": "body",
"required": false,
"schema": {
"type": "object",
"properties": {
"originator": {
"type": "string",
"description": "The Sender/Header of a message. We can use your brand name with a maximum character limit of 11 or your mobile number with your country code.",
"title": "originator",
"x-ms-visibility": "important"
},
"recipient": {
"type": "string",
"description": "Mobile Numbers to send OTP Code. The recipient's phone number should have a country code prefix.",
"title": "recipient",
"x-ms-visibility": "important"
},
"content": {
"type": "string",
"description": "OTP Message Content with {} placeholder",
"title": "content",
"default": "Greetings from D7 API, your mobile verification code is: {}",
"x-ms-visibility": "important"
},
"data_coding": {
"type": "string",
"description": "data_coding",
"title": "data_coding",
"enum": [
"auto",
"text",
"unicode"
],
"default": "auto"
},
"expiry": {
"type": "string",
"description": "OTP Expiry time in seconds",
"title": "expiry"
},
"retry_delay": {
"type": "string",
"description": "Regeneate OTP delay",
"title": "retry_delay"
},
"retry_count": {
"type": "string",
"description": "Regeneate OTP limit",
"title": "retry_count"
},
"otp_code_length": {
"type": "string",
"description": "Length of OTP code. Minimum 2 to maximum 10",
"title": "otp_code_length"
},
"otp_type": {
"type": "string",
"description": "Should be an enum with values: numeric, alpha, or alphanumeric",
"title": "otp_type",
"enum": [
"numeric",
"alpha",
"alphanumeric"
]
},
"success_url": {
"type": "string",
"description": "Verification Success callback URL",
"title": "success_url"
},
"failure_url": {
"type": "string",
"description": "Verification Failure callback URL",
"title": "failure_url"
}
},
"required": [
"content",
"data_coding",
"originator",
"recipient"
]
}
}
]
}
},
"/verify/v1/otp/resend-otp": {
"post": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"otp_id": {
"type": "string",
"description": "otp_id"
},
"status": {
"type": "string",
"description": "status"
},
"expiry": {
"type": "integer",
"format": "int32",
"description": "expiry"
},
"resend_count": {
"type": "integer",
"format": "int32",
"description": "resend_count"
}
}
}
}
},
"summary": "Resend OTP",
"description": "Request a new OTP (One-Time Password) to be sent to a mobile number.",
"operationId": "OTP-ResendOTP",
"parameters": [
{
"name": "body",
"in": "body",
"required": false,
"schema": {
"type": "object",
"properties": {
"otp_id": {
"type": "string",
"description": "The OTP ID returned by Send OTP endpoint",
"title": "otp_request_id"
}
},
"required": [
"otp_id"
]
}
}
]
}
},
"/verify/v1/otp/verify-otp": {
"post": {
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "status"
}
}
}
}
},
"description": "Verify the OTP (One-Time Password) sent to your mobile number.",
"operationId": "OTP-VerifyOTP",
"summary": "Verify OTP",
"parameters": [
{
"name": "body",
"in": "body",
"required": false,
"schema": {
"type": "object",
"properties": {
"otp_id": {
"type": "string",
"description": "The OTP ID returned by Send OTP endpoint",
"title": "otp_id"
},
"otp_code": {
"type": "string",
"description": "OTP Code received on customers mobile",
"title": "otp_code"
}
},
"required": [
"otp_code"
]
}
}
]
}
},
"/viber/v1/send": {
"post": {
"summary": "Viber - Send Message",
"operationId": "Viber-SendMessage",
"description": "Send message to a Viber number.",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"originator": {
"type": "string",
"description": "Sender ID",
"title": "originator",
"x-ms-visibility": "important"
},
"recipients": {
"type": "string",
"description": "Destination Number",
"title": "recipients",
"x-ms-visibility": "important"
},
"content": {
"type": "string",
"description": "The message content",
"title": "content",
"x-ms-visibility": "important"
},
"image": {
"type": "string",
"description": "Image URL",
"title": "image"
},
"button_action": {
"type": "string",
"description": "Button action URL",
"title": "button_action"
},
"button_caption": {
"type": "string",
"description": "Text of Button",
"title": "button_caption"
},
"call_back_url": {
"type": "string",
"description": "Call back URL to recieve delivery status report",
"title": "call_back_url"
},
"label": {
"type": "string",
"description": "Type of message",
"title": "label",
"default": "PROMOTION",
"x-ms-visibility": "important",
"enum": [
"TRANSACTION",
"PROMOTION"
]
},
"client_ref": {
"type": "string",
"description": "client_ref",
"title": "client_ref",
"x-ms-visibility": "internal",
"default": "msflow"
}
},
"required": [
"client_ref",
"content",
"originator",
"recipients",
"label"
]
},
"description": "messages"
}
},
"required": [
"messages"
]
}
}
],
"responses": {
"200": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"request_id": {
"type": "string",
"description": "request_id"
},
"status": {
"type": "string",
"description": "status"
},
"created_at": {
"type": "string",
"description": "created_at"
}
}
}
},
"401": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "code"
},
"message": {
"type": "string",
"description": "message"
}
},
"description": "detail"
}
}
}
},
"422": {
"description": "default",
"schema": {
"type": "object",
"properties": {
"detail": {
"type": "array",
"items": {
"type": "object",
"properties": {
"loc": {
"type": "array",
"items": {
"type": "string"
},
"description": "loc"
},
"msg": {
"type": "string",
"description": "msg"
},
"type": {
"type": "string",
"description": "type"
}
}
},
"description": "detail"
}
}
}
}
}
}
}
},
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://d7networks.com"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://d7networks.com/privacy/"
},
{
"propertyName": "Categories",
"propertyValue": "Communication;IT Operations"
}
],
"definitions": {},
"parameters": {},
"responses": {},
"securityDefinitions": {
"API Key": {
"type": "apiKey",
"in": "header",
"name": "Authorization"
}
},
"security": [
{
"API Key": []
}
],
"tags": []
}