> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decodahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Estimate Cost

> Estimate the cost of sending a blast before actually sending.



## OpenAPI

````yaml post /comms/blasts/estimate-cost
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /comms/blasts/estimate-cost:
    post:
      tags:
        - Message Blasts
      summary: Estimate Cost
      description: Estimate the cost of sending a blast before actually sending.
      operationId: estimate_cost_comms_blasts_estimate_cost_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CostEstimateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CostEstimateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CostEstimateRequest:
      properties:
        channel:
          $ref: '#/components/schemas/BlastChannel'
        cohortId:
          anyOf:
            - type: string
            - type: 'null'
          title: Cohortid
        cohortIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Cohortids
        patientIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Patientids
        smsContent:
          anyOf:
            - type: string
            - type: 'null'
          title: Smscontent
        isMarketing:
          type: boolean
          title: Ismarketing
          default: false
      type: object
      required:
        - channel
      title: CostEstimateRequest
    CostEstimateResponse:
      properties:
        recipientCount:
          type: integer
          title: Recipientcount
          default: 0
        segmentsPerMessage:
          type: integer
          title: Segmentspermessage
          default: 0
        isMms:
          type: boolean
          title: Ismms
          default: false
        costPerMessageCents:
          type: integer
          title: Costpermessagecents
          default: 0
        totalEstimatedCostCents:
          type: integer
          title: Totalestimatedcostcents
          default: 0
      type: object
      title: CostEstimateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BlastChannel:
      type: string
      enum:
        - SMS
        - EMAIL
      title: BlastChannel
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````