# Read Automation SMS Statistics

Reads what one automation SMS achieved: how many contacts it was sent to, how many clicked and how many did not, bounces, and every tracked link with its clicks, most-clicked first. An SMS has no opens -- nothing in a text message can report being read -- so there is no open rate and no clickRate over the opens; clickRateOfRecipients is the share of recipients who clicked, the same field get-campaign-statistics reports. Counters are lifetime totals across every use of the SMS and are not restricted to a period. An SMS nothing has been sent yet answers with zeroes rather than an error, and reports no bounces while it has no sends, exactly as the statistics screen does. The ID is the SMS ID from get-automation-sms, not an automation action ID.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "smsId": {
      "type": "integer",
      "description": "ID of the automation SMS whose statistics are read; this is not an automation action ID",
      "minimum": 1
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "smsId"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "smsId",
    "name",
    "sent",
    "clicked",
    "notClicked",
    "clickRateOfRecipients",
    "bounces",
    "links",
    "statisticsUrl"
  ],
  "properties": {
    "smsId": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "sent": {
      "type": "integer"
    },
    "clicked": {
      "type": "integer"
    },
    "notClicked": {
      "type": "integer"
    },
    "clickRateOfRecipients": {
      "type": "number"
    },
    "bounces": {
      "type": "integer"
    },
    "links": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "url",
          "clicksTotal",
          "clicksUnique"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "clicksTotal": {
            "type": "integer"
          },
          "clicksUnique": {
            "type": "integer"
          }
        }
      }
    },
    "statisticsUrl": {
      "type": "string"
    }
  }
}
```

