SendGrid · Capability

Twilio SendGrid Marketing Campaigns Statistics API — Stats

Twilio SendGrid Marketing Campaigns Statistics API — Stats. 8 operations. Lead operation: Get All Automation Stats. Self-contained Naftiko capability covering one Sendgrid business surface.

Run with Naftiko SendgridStats

What You Can Do

GET
Listautomationstat — Get All Automation Stats
/v1/v3/marketing/stats/automations
GET
Exportautomationstat — Export Single Send Stats
/v1/v3/marketing/stats/automations/export
GET
Getautomationstat — Get Automation Stats by ID
/v1/v3/marketing/stats/automations/{id}
GET
Listclicktrackingstat — Get Automation Click Tracking Stats by ID
/v1/v3/marketing/stats/automations/{id}/links
GET
Listsinglesendstat — Get All Single Sends Stats
/v1/v3/marketing/stats/singlesends
GET
Exportsinglesendstat — Export Single Send Stats
/v1/v3/marketing/stats/singlesends/export
GET
Getsinglesendstat — Get Single Send Stats by ID
/v1/v3/marketing/stats/singlesends/{id}
GET
Listsinglesendtrackingstat — Get Single Send Click Tracking Stats by ID
/v1/v3/marketing/stats/singlesends/{id}/links

MCP Tools

get-all-automation-stats

Get All Automation Stats

read-only idempotent
export-single-send-stats

Export Single Send Stats

read-only idempotent
get-automation-stats-id

Get Automation Stats by ID

read-only idempotent
get-automation-click-tracking-stats

Get Automation Click Tracking Stats by ID

read-only idempotent
get-all-single-sends-stats

Get All Single Sends Stats

read-only idempotent
export-single-send-stats-2

Export Single Send Stats

read-only idempotent
get-single-send-stats-id

Get Single Send Stats by ID

read-only idempotent
get-single-send-click-tracking

Get Single Send Click Tracking Stats by ID

read-only idempotent

Capability Spec

tsg_mc_stats_v3-stats.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Twilio SendGrid Marketing Campaigns Statistics API — Stats
  description: 'Twilio SendGrid Marketing Campaigns Statistics API — Stats. 8 operations. Lead operation: Get All Automation
    Stats. Self-contained Naftiko capability covering one Sendgrid business surface.'
  tags:
  - Sendgrid
  - Stats
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SENDGRID_API_KEY: SENDGRID_API_KEY
capability:
  consumes:
  - type: http
    namespace: tsg_mc_stats_v3-stats
    baseUri: https://api.sendgrid.com
    description: Twilio SendGrid Marketing Campaigns Statistics API — Stats business capability. Self-contained, no shared
      references.
    resources:
    - name: v3-marketing-stats-automations
      path: /v3/marketing/stats/automations
      operations:
      - name: listautomationstat
        method: GET
        description: Get All Automation Stats
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: automation_ids
          in: query
          type: array
          description: This endpoint returns all automation IDs if no `automation_ids` are specified.
    - name: v3-marketing-stats-automations-export
      path: /v3/marketing/stats/automations/export
      operations:
      - name: exportautomationstat
        method: GET
        description: Export Single Send Stats
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ids
          in: query
          type: array
          description: The IDs of Single Sends for which to export stats.
        - name: timezone
          in: query
          type: string
          description: The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing
            the timezone in which the stats are to be presented; i.
    - name: v3-marketing-stats-automations-id
      path: /v3/marketing/stats/automations/{id}
      operations:
      - name: getautomationstat
        method: GET
        description: Get Automation Stats by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v3-marketing-stats-automations-id-links
      path: /v3/marketing/stats/automations/{id}/links
      operations:
      - name: listclicktrackingstat
        method: GET
        description: Get Automation Click Tracking Stats by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v3-marketing-stats-singlesends
      path: /v3/marketing/stats/singlesends
      operations:
      - name: listsinglesendstat
        method: GET
        description: Get All Single Sends Stats
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: singlesend_ids
          in: query
          type: array
          description: This endpoint returns all Single Send IDs if no IDs are included in `singlesend_ids`.
    - name: v3-marketing-stats-singlesends-export
      path: /v3/marketing/stats/singlesends/export
      operations:
      - name: exportsinglesendstat
        method: GET
        description: Export Single Send Stats
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ids
          in: query
          type: array
          description: The IDs of Single Sends for which to export stats.
        - name: timezone
          in: query
          type: string
          description: The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing
            the timezone in which the stats are to be presented; i.
    - name: v3-marketing-stats-singlesends-id
      path: /v3/marketing/stats/singlesends/{id}
      operations:
      - name: getsinglesendstat
        method: GET
        description: Get Single Send Stats by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v3-marketing-stats-singlesends-id-links
      path: /v3/marketing/stats/singlesends/{id}/links
      operations:
      - name: listsinglesendtrackingstat
        method: GET
        description: Get Single Send Click Tracking Stats by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.SENDGRID_API_KEY}}'
  exposes:
  - type: rest
    namespace: tsg_mc_stats_v3-stats-rest
    port: 8080
    description: REST adapter for Twilio SendGrid Marketing Campaigns Statistics API — Stats. One Spectral-compliant resource
      per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/v3/marketing/stats/automations
      name: v3-marketing-stats-automations
      description: REST surface for v3-marketing-stats-automations.
      operations:
      - method: GET
        name: listautomationstat
        description: Get All Automation Stats
        call: tsg_mc_stats_v3-stats.listautomationstat
        with:
          automation_ids: rest.automation_ids
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/stats/automations/export
      name: v3-marketing-stats-automations-export
      description: REST surface for v3-marketing-stats-automations-export.
      operations:
      - method: GET
        name: exportautomationstat
        description: Export Single Send Stats
        call: tsg_mc_stats_v3-stats.exportautomationstat
        with:
          ids: rest.ids
          timezone: rest.timezone
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/stats/automations/{id}
      name: v3-marketing-stats-automations-id
      description: REST surface for v3-marketing-stats-automations-id.
      operations:
      - method: GET
        name: getautomationstat
        description: Get Automation Stats by ID
        call: tsg_mc_stats_v3-stats.getautomationstat
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/stats/automations/{id}/links
      name: v3-marketing-stats-automations-id-links
      description: REST surface for v3-marketing-stats-automations-id-links.
      operations:
      - method: GET
        name: listclicktrackingstat
        description: Get Automation Click Tracking Stats by ID
        call: tsg_mc_stats_v3-stats.listclicktrackingstat
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/stats/singlesends
      name: v3-marketing-stats-singlesends
      description: REST surface for v3-marketing-stats-singlesends.
      operations:
      - method: GET
        name: listsinglesendstat
        description: Get All Single Sends Stats
        call: tsg_mc_stats_v3-stats.listsinglesendstat
        with:
          singlesend_ids: rest.singlesend_ids
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/stats/singlesends/export
      name: v3-marketing-stats-singlesends-export
      description: REST surface for v3-marketing-stats-singlesends-export.
      operations:
      - method: GET
        name: exportsinglesendstat
        description: Export Single Send Stats
        call: tsg_mc_stats_v3-stats.exportsinglesendstat
        with:
          ids: rest.ids
          timezone: rest.timezone
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/stats/singlesends/{id}
      name: v3-marketing-stats-singlesends-id
      description: REST surface for v3-marketing-stats-singlesends-id.
      operations:
      - method: GET
        name: getsinglesendstat
        description: Get Single Send Stats by ID
        call: tsg_mc_stats_v3-stats.getsinglesendstat
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/stats/singlesends/{id}/links
      name: v3-marketing-stats-singlesends-id-links
      description: REST surface for v3-marketing-stats-singlesends-id-links.
      operations:
      - method: GET
        name: listsinglesendtrackingstat
        description: Get Single Send Click Tracking Stats by ID
        call: tsg_mc_stats_v3-stats.listsinglesendtrackingstat
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: tsg_mc_stats_v3-stats-mcp
    port: 9090
    transport: http
    description: MCP adapter for Twilio SendGrid Marketing Campaigns Statistics API — Stats. One tool per consumed operation,
      routed inline through this capability's consumes block.
    tools:
    - name: get-all-automation-stats
      description: Get All Automation Stats
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_stats_v3-stats.listautomationstat
      with:
        automation_ids: tools.automation_ids
      outputParameters:
      - type: object
        mapping: $.
    - name: export-single-send-stats
      description: Export Single Send Stats
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_stats_v3-stats.exportautomationstat
      with:
        ids: tools.ids
        timezone: tools.timezone
      outputParameters:
      - type: object
        mapping: $.
    - name: get-automation-stats-id
      description: Get Automation Stats by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_stats_v3-stats.getautomationstat
      outputParameters:
      - type: object
        mapping: $.
    - name: get-automation-click-tracking-stats
      description: Get Automation Click Tracking Stats by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_stats_v3-stats.listclicktrackingstat
      outputParameters:
      - type: object
        mapping: $.
    - name: get-all-single-sends-stats
      description: Get All Single Sends Stats
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_stats_v3-stats.listsinglesendstat
      with:
        singlesend_ids: tools.singlesend_ids
      outputParameters:
      - type: object
        mapping: $.
    - name: export-single-send-stats-2
      description: Export Single Send Stats
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_stats_v3-stats.exportsinglesendstat
      with:
        ids: tools.ids
        timezone: tools.timezone
      outputParameters:
      - type: object
        mapping: $.
    - name: get-single-send-stats-id
      description: Get Single Send Stats by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_stats_v3-stats.getsinglesendstat
      outputParameters:
      - type: object
        mapping: $.
    - name: get-single-send-click-tracking
      description: Get Single Send Click Tracking Stats by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_stats_v3-stats.listsinglesendtrackingstat
      outputParameters:
      - type: object
        mapping: $.