CallfireApiClient.Api.Campaigns.TextBroadcastsApi.AddRecipients C# (CSharp) Method

AddRecipients() public method

Use this API to add recipients to an already created text broadcast. Post a list of Recipient objects for them to be immediately added to the text broadcast campaign. These contacts do not go through validation process, and will be acted upon as they are added. Recipients may be added as a list of contact ids, or list of numbers.
in case HTTP response code is 400 - Bad request, the request was formatted improperly. in case HTTP response code is 401 - Unauthorized, API Key missing or invalid. in case HTTP response code is 403 - Forbidden, insufficient permissions. in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist. in case HTTP response code is 500 - Internal Server Error. in case HTTP response code is something different from codes listed above. in case error has occurred in client.
public AddRecipients ( long id, IList recipients, String fields = null ) : IList
id long id of text broadcast
recipients IList recipients to add
fields String limit fields returned. E.g. fields=id,name or fields=items(id,name)
return IList
        public IList<Text> AddRecipients(long id, IList<TextRecipient> recipients, String fields = null)
        {
            var queryParams = ClientUtils.BuildQueryParams("fields", fields);
            string path = TB_ITEM_RECIPIENTS_PATH.ReplaceFirst(ClientConstants.PLACEHOLDER, id.ToString());
            return Client.Post<ListHolder<Text>>(path, recipients, queryParams).Items;
        }