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

# Post v1smsroutingplans simulatesegments



## OpenAPI

````yaml https://api.comm.com/docs/api.json post /v1/sms/routing/plans/{plan}/simulate/segments
openapi: 3.1.0
info:
  title: Commvoice API
  version: '1'
servers:
  - url: https://api.comm.com/api
    description: Live
security:
  - http: []
paths:
  /v1/sms/routing/plans/{plan}/simulate/segments:
    post:
      tags:
        - SmsRoutingPlans
      operationId: sms.routing.simulate.segments
      parameters:
        - name: plan
          in: path
          required: true
          description: The plan ID
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter_segment_id:
                  type:
                    - string
                    - 'null'
                  format: uuid
                counter:
                  type: integer
                  minimum: 0
                segment_ids:
                  type: array
                  items:
                    type: string
                    format: uuid
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SimulateResponseData'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    SimulateResponseData:
      type: object
      properties:
        contacts_count:
          type: integer
        resource:
          $ref: '#/components/schemas/SmsRoutingSelectedData'
        country_ids:
          type:
            - array
            - 'null'
          items:
            type: string
        network_ids:
          type:
            - array
            - 'null'
          items:
            type: string
      required:
        - contacts_count
        - resource
        - country_ids
        - network_ids
      title: SimulateResponseData
    SmsRoutingSelectedData:
      type: object
      properties:
        to_send:
          type: boolean
          default: true
        fail_reason:
          anyOf:
            - $ref: '#/components/schemas/SmsRoutingPlanSelectorFailStatusEnum'
            - type: 'null'
        status:
          type:
            - object
            - 'null'
        selected_method:
          type:
            - object
            - 'null'
        selected_action:
          type:
            - object
            - 'null'
        selected_rule_id:
          type:
            - string
            - 'null'
        selected_route:
          type:
            - string
            - 'null'
        costs:
          anyOf:
            - $ref: '#/components/schemas/SmsCostsData'
            - type: 'null'
      required:
        - to_send
        - fail_reason
        - status
        - selected_method
        - selected_action
        - selected_rule_id
        - selected_route
        - costs
      title: SmsRoutingSelectedData
    SmsRoutingPlanSelectorFailStatusEnum:
      type: string
      enum:
        - No route found
        - Rule dropped
      title: SmsRoutingPlanSelectorFailStatusEnum
    SmsCostsData:
      type: object
      properties:
        cost_platform_customer:
          type: number
        cost_route_vendor:
          type: number
        cost_route_seller:
          type: number
          default: 0
        cost_platform_seller:
          type: number
          default: 0
        sms_route_rate_id:
          type:
            - string
            - 'null'
      required:
        - cost_platform_customer
        - cost_route_vendor
        - cost_route_seller
        - cost_platform_seller
        - sms_route_rate_id
      title: SmsCostsData
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: JWT

````