---
title: "Upload file for segment of subscribers of a group"
method: POST
path: "/orgunit/{orgunitId}/groups/{groupId}/messages/segment/file"
tags: ["Send"]
---

# Upload file for segment of subscribers of a group

`POST /orgunit/{orgunitId}/groups/{groupId}/messages/segment/file`

This function allows you to upload a CSV file which will have a set of subscribers whom the user wants to send message to. If the subscribers is not subscribed to the particular group, auto subscribe will be done. The response will include fileName, count(subscribers count) and the url of file.

## Path parameters

- `orgunitId` string, required
- `groupId` string, required

## Response `201`

Success

- SegmentFileUploadResponseExternalApiResponseNew
  - `data` SegmentFileUploadResponse
    - `fileName` string, nullable
    - `url` string, nullable
    - `count` integer
  - `appCode` string, nullable
  - `message` string, nullable
  - `isError` boolean

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/ministrybytext/apis/pbt-api-documentation.md) · [All operations](https://skmtc.net/ministrybytext/apis/pbt-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ministrybytext/pbt-api-documentation/versions/ca6e9c8f430d/schema)
