{
  "service": "teltel",
  "displayName": "TelTel",
  "categories": [
    "Communication"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "TELTEL_API_KEY",
      "description": "TelTel API key sent with the X-API-KEY header. Find it under Settings in your TelTel account: https://teltel.io/v2/login."
    }
  ],
  "homepageUrl": "https://www.teltel.io",
  "actions": [
    {
      "id": "teltel.get_account_balance",
      "service": "teltel",
      "name": "get_account_balance",
      "description": "Get the current TelTel account balance, credit, and credit limit.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "Action input."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "credit": {
            "type": "number",
            "description": "The current credit value of the TelTel account."
          },
          "creditLimit": {
            "type": "number",
            "description": "The maximum credit limit configured for the TelTel account."
          },
          "balance": {
            "type": "number",
            "description": "The currently available TelTel balance."
          }
        },
        "additionalProperties": false,
        "required": [
          "credit",
          "creditLimit",
          "balance"
        ],
        "description": "Action output."
      }
    },
    {
      "id": "teltel.get_sms_report",
      "service": "teltel",
      "name": "get_sms_report",
      "description": "Get the delivery report for one outbound TelTel SMS message.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "minLength": 1,
            "description": "The TelTel outbound SMS message ID."
          },
          "fields": {
            "type": "string",
            "description": "Comma-separated list of TelTel report fields to include in the response."
          }
        },
        "additionalProperties": false,
        "required": [
          "messageId"
        ],
        "description": "Action input."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "description": "The TelTel message ID."
          },
          "from": {
            "anyOf": [
              {
                "type": "string",
                "description": "The sender ID or DID used for the outbound SMS."
              },
              {
                "type": "null"
              }
            ]
          },
          "to": {
            "anyOf": [
              {
                "type": "string",
                "description": "The destination phone number in international format."
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "anyOf": [
              {
                "type": "string",
                "description": "The current delivery state reported by TelTel."
              },
              {
                "type": "null"
              }
            ]
          },
          "detailedState": {
            "anyOf": [
              {
                "type": "string",
                "description": "The more detailed delivery state returned by TelTel."
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string",
                "description": "The timestamp when TelTel created the message."
              },
              {
                "type": "null"
              }
            ]
          },
          "deliveredAt": {
            "anyOf": [
              {
                "type": "string",
                "description": "The timestamp when the message was delivered, if available."
              },
              {
                "type": "null"
              }
            ]
          },
          "multipart": {
            "anyOf": [
              {
                "type": "boolean",
                "description": "Whether TelTel split the message into multiple parts."
              },
              {
                "type": "null"
              }
            ]
          },
          "parts": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The number of SMS parts used for the message."
              },
              {
                "type": "null"
              }
            ]
          },
          "price": {
            "anyOf": [
              {
                "type": "number",
                "description": "The TelTel price per message part."
              },
              {
                "type": "null"
              }
            ]
          },
          "totalPrice": {
            "anyOf": [
              {
                "type": "number",
                "description": "The total TelTel price for the whole message."
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "anyOf": [
              {
                "type": "string",
                "description": "The outbound SMS message body."
              },
              {
                "type": "null"
              }
            ]
          },
          "campaignId": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The TelTel campaign ID when the SMS belongs to a campaign."
              },
              {
                "type": "null"
              }
            ]
          },
          "errorMessage": {
            "anyOf": [
              {
                "type": "string",
                "description": "The TelTel error description when delivery failed."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "messageId",
          "from",
          "to",
          "state",
          "detailedState",
          "createdAt",
          "deliveredAt",
          "multipart",
          "parts",
          "price",
          "totalPrice",
          "message",
          "campaignId",
          "errorMessage"
        ],
        "description": "The normalized TelTel outbound SMS delivery report."
      }
    },
    {
      "id": "teltel.list_sms_reports",
      "service": "teltel",
      "name": "list_sms_reports",
      "description": "List outbound TelTel SMS delivery reports with optional paging and filter parameters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5000,
            "description": "Maximum number of reports to return, up to 5000."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of reports to skip before returning results."
          },
          "fields": {
            "type": "string",
            "description": "Comma-separated list of TelTel report fields to include in the response."
          },
          "sort": {
            "type": "string",
            "description": "Comma-separated TelTel sort expression, for example -created_at."
          },
          "filter": {
            "type": "string",
            "description": "Comma-separated TelTel filter expression, for example from=37126118199."
          }
        },
        "additionalProperties": false,
        "description": "Action input."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "reports": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "messageId": {
                  "type": "string",
                  "description": "The TelTel message ID."
                },
                "from": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The sender ID or DID used for the outbound SMS."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The destination phone number in international format."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "state": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The current delivery state reported by TelTel."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "detailedState": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The more detailed delivery state returned by TelTel."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The timestamp when TelTel created the message."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "deliveredAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The timestamp when the message was delivered, if available."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "multipart": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "description": "Whether TelTel split the message into multiple parts."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "parts": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The number of SMS parts used for the message."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "price": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "The TelTel price per message part."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "totalPrice": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "The total TelTel price for the whole message."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "message": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The outbound SMS message body."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "campaignId": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The TelTel campaign ID when the SMS belongs to a campaign."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorMessage": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The TelTel error description when delivery failed."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "required": [
                "messageId",
                "from",
                "to",
                "state",
                "detailedState",
                "createdAt",
                "deliveredAt",
                "multipart",
                "parts",
                "price",
                "totalPrice",
                "message",
                "campaignId",
                "errorMessage"
              ],
              "description": "The normalized TelTel outbound SMS delivery report."
            },
            "description": "The normalized TelTel outbound SMS reports."
          }
        },
        "additionalProperties": false,
        "required": [
          "reports"
        ],
        "description": "Action output."
      }
    },
    {
      "id": "teltel.send_sms",
      "service": "teltel",
      "name": "send_sms",
      "description": "Send a single outbound SMS message through the TelTel SMS outbox API.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "minLength": 1,
            "description": "Sender ID or DID number used for the outbound SMS message."
          },
          "to": {
            "type": "string",
            "minLength": 1,
            "description": "Destination phone number in international format."
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "description": "Plain-text SMS body to send through TelTel."
          },
          "callback": {
            "anyOf": [
              {
                "type": "string",
                "description": "Callback URL for delivery notifications.",
                "format": "uri"
              },
              {
                "type": "boolean",
                "description": "Boolean toggle for delivery notifications."
              },
              {
                "type": "null",
                "description": "No callback value."
              }
            ],
            "description": "Callback URL or boolean toggle for delivery notifications."
          }
        },
        "additionalProperties": false,
        "required": [
          "from",
          "to",
          "message"
        ],
        "description": "Action input."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "description": "The TelTel message ID created for the new outbound SMS."
          }
        },
        "additionalProperties": false,
        "required": [
          "messageId"
        ],
        "description": "Action output."
      }
    }
  ]
}
