{
  "service": "twilio",
  "displayName": "Twilio",
  "categories": [
    "Communication"
  ],
  "authTypes": [
    "custom_credential"
  ],
  "auth": [
    {
      "type": "custom_credential",
      "fields": [
        {
          "key": "accountSid",
          "label": "Account SID",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "AC...",
          "description": "Twilio Account SID used as the account identifier in API paths. Find it in the Account Info section of https://www.twilio.com/console."
        },
        {
          "key": "authToken",
          "label": "Auth Token",
          "inputType": "password",
          "required": true,
          "secret": true,
          "placeholder": "your_auth_token",
          "description": "Twilio Auth Token used with the Authorization Basic header. Find or rotate it in the Account Info section of https://www.twilio.com/console."
        }
      ]
    }
  ],
  "homepageUrl": "https://www.twilio.com",
  "actions": [
    {
      "id": "twilio.get_account",
      "service": "twilio",
      "name": "get_account",
      "description": "Fetch the current Twilio account profile for the connected credential.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "No input is required for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "accountSid": {
            "type": "string",
            "description": "The Twilio account SID."
          },
          "friendlyName": {
            "anyOf": [
              {
                "type": "string",
                "description": "The friendly name of the Twilio account."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "description": "The current status of the Twilio account."
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Twilio account type."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "accountSid",
          "friendlyName",
          "status",
          "type"
        ],
        "description": "The normalized Twilio account payload."
      }
    },
    {
      "id": "twilio.get_message",
      "service": "twilio",
      "name": "get_message",
      "description": "Fetch one Twilio message by message SID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "messageSid": {
            "type": "string",
            "minLength": 1,
            "description": "The Twilio message SID to fetch."
          }
        },
        "additionalProperties": false,
        "required": [
          "messageSid"
        ],
        "description": "The input payload for fetching one Twilio message."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "messageSid": {
            "type": "string",
            "description": "The Twilio message SID."
          },
          "accountSid": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Twilio account SID that owns the message."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "description": "The delivery status of the message."
              },
              {
                "type": "null"
              }
            ]
          },
          "to": {
            "anyOf": [
              {
                "type": "string",
                "description": "The destination phone number."
              },
              {
                "type": "null"
              }
            ]
          },
          "from": {
            "anyOf": [
              {
                "type": "string",
                "description": "The sender phone number."
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "anyOf": [
              {
                "type": "string",
                "description": "The text body of the message."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "The normalized Twilio message payload."
      }
    },
    {
      "id": "twilio.list_messages",
      "service": "twilio",
      "name": "list_messages",
      "description": "List SMS or MMS messages for the connected Twilio account.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "description": "Only include messages sent to this phone number."
          },
          "from": {
            "type": "string",
            "description": "Only include messages sent from this phone number."
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of records to return in one page."
          },
          "pageToken": {
            "type": "string",
            "description": "The Twilio page token used to continue a previous listing."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Twilio messages."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "messageSid": {
                  "type": "string",
                  "description": "The Twilio message SID."
                },
                "accountSid": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Twilio account SID that owns the message."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The delivery status of the message."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The destination phone number."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "from": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The sender phone number."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "body": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The text body of the message."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "description": "The normalized Twilio message payload."
            },
            "description": "The normalized Twilio messages."
          },
          "nextPageUri": {
            "anyOf": [
              {
                "type": "string",
                "description": "The next page URI returned by Twilio, if any."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "messages",
          "nextPageUri"
        ],
        "description": "The output payload for listing Twilio messages."
      }
    },
    {
      "id": "twilio.list_usage_records",
      "service": "twilio",
      "name": "list_usage_records",
      "description": "List Twilio usage records for the connected account.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "description": "The Twilio usage category to filter by."
          },
          "startDate": {
            "type": "string",
            "description": "The inclusive start date in YYYY-MM-DD format.",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "The inclusive end date in YYYY-MM-DD format.",
            "format": "date"
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of records to return in one page."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Twilio usage records."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "usageRecords": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "accountSid": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Twilio account SID that owns the usage."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Twilio usage category."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "count": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The number of units consumed in the record."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "countUnit": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The unit for the usage count."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "usage": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The aggregated usage amount."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "usageUnit": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The unit for the aggregated usage amount."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "price": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The billed price for the usage record."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "priceUnit": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The currency unit for the billed price."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "startDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The inclusive start date of the usage record."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "endDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The inclusive end date of the usage record."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "description": "One normalized Twilio usage record."
            },
            "description": "The normalized usage records returned by Twilio."
          },
          "page": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The current Twilio result page."
              },
              {
                "type": "null"
              }
            ]
          },
          "pageSize": {
            "anyOf": [
              {
                "type": "integer",
                "description": "The Twilio page size for this result."
              },
              {
                "type": "null"
              }
            ]
          },
          "nextPageUri": {
            "anyOf": [
              {
                "type": "string",
                "description": "The next page URI returned by Twilio, if any."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "usageRecords",
          "page",
          "pageSize",
          "nextPageUri"
        ],
        "description": "The output payload for listing Twilio usage records."
      }
    },
    {
      "id": "twilio.send_message",
      "service": "twilio",
      "name": "send_message",
      "description": "Send an outbound SMS or MMS message with Twilio.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "description": "The destination phone number in E.164 format."
          },
          "from": {
            "type": "string",
            "minLength": 1,
            "description": "The Twilio phone number sending the message."
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "description": "The text body of the outbound message."
          }
        },
        "additionalProperties": false,
        "required": [
          "to",
          "from",
          "body"
        ],
        "description": "The input payload for sending a Twilio message."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "messageSid": {
            "type": "string",
            "description": "The Twilio message SID."
          },
          "accountSid": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Twilio account SID that owns the message."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "description": "The delivery status of the message."
              },
              {
                "type": "null"
              }
            ]
          },
          "to": {
            "anyOf": [
              {
                "type": "string",
                "description": "The destination phone number."
              },
              {
                "type": "null"
              }
            ]
          },
          "from": {
            "anyOf": [
              {
                "type": "string",
                "description": "The sender phone number."
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "anyOf": [
              {
                "type": "string",
                "description": "The text body of the message."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "The normalized Twilio message payload."
      }
    }
  ]
}
