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

# Disburse Data

> Disburse mobile data bundles to one or multiple recipients.

<Note>
  Refer to [Authentication](/authentication) for information on how to obtain a
  Bearer token. This endpoint requires the `reward.mobile-data.disburse` API
  client authorization scope to disburse mobile data. You can set up scopes on
  the [API Clients](https://cloud.belio.co.ke/team-overview/api-access-keys)
  page.
</Note>

### Rate Limit

This endpoint is rate limited to **400** disbursements per second.

## Request Modes

The API supports two request modes:

* `SendToMany` — same data amount (and optional SMS message) sent to multiple recipients
* `SendToEach` — individual data amounts and optional messages per recipient

Both modes support a maximum of **100** recipients per request and the optional message is limited to not more than **960** characters .


## OpenAPI

````yaml POST /data/{campaignId}
openapi: 3.1.0
info:
  title: Belio API
  description: OpenAPI Specification for Belio's REST API
  contact:
    name: Belio API Support
    url: https://belio.co.ke
  version: 1.0.0
servers:
  - url: https://api.belio.co.ke
    description: API Server
security:
  - bearerAuth: []
paths:
  /data/{campaignId}:
    post:
      tags:
        - Mobile Data
      description: Disburse mobile data bundles to one or multiple recipients.
      operationId: disburseData
      parameters:
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
          description: Unique identifier that references the rules for the disbursement.
      requestBody:
        description: Disbursement request payload
        content:
          application/json:
            schema:
              oneOf:
                - title: SendToEach
                  description: Send a custom denomination to each recipient
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - SendToEach
                      description: Indicates per-recipient bundle disbursement mode
                    disbursements:
                      type: array
                      minItems: 1
                      maxItems: 100
                      items:
                        type: object
                        properties:
                          phone:
                            type: string
                            description: Recipient phone number
                          denomination:
                            type: string
                            enum:
                              - 10MB
                              - 20MB
                              - 25MB
                              - 30MB
                              - 50MB
                              - 100MB
                              - 150MB
                              - 200MB
                              - 250MB
                              - 500MB
                              - 750MB
                              - 1GB
                              - 2GB
                              - 3GB
                              - 5GB
                              - 10GB
                            description: >-
                              Bundle denomination to be sent to recipient.
                              Should exist in the chosen campaign
                          message:
                            type: string
                            minLength: 1
                            maxLength: 960
                            description: >-
                              Optional SMS notification sent after successful
                              data disbursement (requires top-level messaging
                              configuration).
                        required:
                          - phone
                          - denomination
                        additionalProperties: false
                      description: List of recipients with individual denominations
                    messaging:
                      $ref: '#/components/schemas/DataMessagingConfig'
                    receiptRequest:
                      $ref: '#/components/schemas/DataReceiptRequest'
                  required:
                    - type
                    - disbursements
                  allOf:
                    - if:
                        properties:
                          disbursements:
                            contains:
                              type: object
                              required:
                                - message
                      then:
                        required:
                          - messaging
                  additionalProperties: false
                - title: SendToMany
                  description: Send the same denomination to multiple recipients
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - SendToMany
                      description: Indicates bulk disbursement mode
                    phones:
                      type: array
                      minItems: 1
                      maxItems: 100
                      items:
                        type: string
                        description: Recipient phone number
                      description: >-
                        List of recipients' phone numbers. Maximum of 100 per
                        request.
                    denomination:
                      type: string
                      enum:
                        - 10MB
                        - 20MB
                        - 25MB
                        - 30MB
                        - 50MB
                        - 100MB
                        - 150MB
                        - 200MB
                        - 250MB
                        - 500MB
                        - 750MB
                        - 1GB
                        - 2GB
                        - 3GB
                        - 5GB
                        - 10GB
                      description: >-
                        Bundle to be sent to recipient. Should exist in the
                        chosen campaign.
                    messaging:
                      $ref: '#/components/schemas/DataMessagingToMany'
                    receiptRequest:
                      $ref: '#/components/schemas/DataReceiptRequest'
                  required:
                    - type
                    - phones
                    - denomination
                  additionalProperties: false
        required: true
      responses:
        '200':
          description: Request successfully queued for processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataDisbursementResponse'
        '400':
          description: Validation error due to missing or invalid fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '401':
          description: Unauthenticated - invalid or expired token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: Unauthorized - permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '422':
          description: Business rule validation failure (e.g. unsupported denomination)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '500':
          description: Internal system error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
components:
  schemas:
    DataMessagingConfig:
      type: object
      description: Messaging configuration used when sending optional SMS notifications.
      properties:
        serviceSelection:
          $ref: '#/components/schemas/MessagingServiceSelection'
      required:
        - serviceSelection
      additionalProperties: false
    DataReceiptRequest:
      type: object
      description: Receipt callback configuration
      properties:
        correlator:
          type: string
          maxLength: 100
          description: >-
            Unique correlation identifier used to match delivery receipts to the
            original request
        callbackUrl:
          type: string
          format: uri
          description: Public HTTPS callback URL to receive delivery receipts
      required:
        - correlator
        - callbackUrl
      additionalProperties: false
    DataMessagingToMany:
      type: object
      description: Optional SMS notification sent after successful data disbursement.
      properties:
        message:
          type: string
          minLength: 1
          maxLength: 960
          description: SMS content to be delivered to all recipients (SendToMany only).
        serviceSelection:
          $ref: '#/components/schemas/MessagingServiceSelection'
      required:
        - message
        - serviceSelection
      additionalProperties: false
    DataDisbursementResponse:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
          description: Unique identifier assigned to the request
        units:
          type: object
          description: >-
            Number of credit units consumed by the request, grouped by channel
            and denomination
          properties:
            Safaricom:
              type: object
              description: Units consumed per denomination for Safaricom
              additionalProperties:
                type: integer
            Airtel:
              type: object
              description: Units consumed per denomination for Airtel
              additionalProperties:
                type: integer
        addresses:
          type: object
          description: Number of recipient addresses processed
          properties:
            Safaricom:
              type: integer
              description: Number of Safaricom recipient addresses processed
            Airtel:
              type: integer
              description: Number of Airtel recipient addresses processed
    APIError:
      type: object
      properties:
        desc:
          type: string
        result:
          description: Optional structured error details.
    MessagingServiceSelection:
      description: Select which SMS service to use when messaging is enabled.
      oneOf:
        - title: DefaultService
          type: object
          properties:
            type:
              type: string
              const: DefaultService
              description: Uses the campaign/product default SMS service
          required:
            - type
          additionalProperties: false
        - title: SelfService
          type: object
          properties:
            type:
              type: string
              const: SelfService
              description: Uses an explicitly provided SMS service ID
            serviceId:
              type: string
              description: Unique identifier of the SMS service to use
          required:
            - type
            - serviceId
          additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````