> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getraya.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getraya.app/_mcp/server.

# Start a batch

POST https://v1.getraya.app/api/batch/{id}/start
Content-Type: application/json

Starts a batch with scheduling configuration. Updates contact statuses based on selected_statuses. Customer ID is automatically determined from the API key.

**Calling hours.** Contacts are called only between 09:05 and 20:55 in each contact's local time. A schedule that reaches outside that window is still accepted; the response's `messages` says so, and contacts outside the window wait until it opens.

Reference: https://docs.getraya.app/api-reference/batches/start-a-batch

## Authentication

- `X-API-Key` header (required) — API key for authentication. Example: raya_ABCD1234567890abcdef

## Request

### Path parameters

- `id` (integer, required) — The batch ID

### Body (application/json)

This endpoint expects a StartBatchRequest.

- `max_retries` (integer, required) — Maximum number of retry attempts for failed calls. This determines how many times the system will attempt to call a contact if the initial call fails or is not completed. - 0 = No retries (only one attempt per contact) - 1 = One retry attempt (total of 2 attempts) - 3 = Three retry attempts (total of 4 attempts) - etc. A call is considered for retry if it fails, is unanswered, or has an unsuccessful outcome. The system will wait for the duration specified in retry_after_hrs before making the next attempt.
- `retry_after_hrs` (double, required) — Hours to wait before retrying a failed call. This is the time delay between retry attempts. The system will wait this many hours after a failed call before attempting to call the contact again. Examples: - 0 = Retry immediately (not recommended for most use cases) - 3 = Wait 3 hours before retrying - 24 = Wait 24 hours (1 day) before retrying - 48 = Wait 48 hours (2 days) before retrying The retry will only occur if: 1. The number of attempts is less than max_retries 2. The batch is still active 3. The current time is within the schedule window
- `max_concurrent_calls` (integer, required) — Maximum number of concurrent calls the batch can make simultaneously. This controls how many calls can be in progress at the same time for this batch. Higher values allow more parallel calls but require more system resources. Examples: - 1 = One call at a time (sequential calling) - 5 = Up to 5 calls simultaneously - 10 = Up to 10 calls simultaneously **Important:** The actual number of concurrent calls may be limited by: - Your account's concurrency limit - Available system resources - The batch's schedule (calls only happen during scheduled hours) Setting this too high may cause rate limiting or resource exhaustion.
- `selected_statuses` (list of string, required) — Array of contact statuses to reset to "Pending" when starting the batch. Contacts with these statuses will become eligible for calling immediately. **Important Behavior:** - Contacts with the specified statuses will be reset to "Pending" status - Only contacts with "Pending" status will be called by the batch - **If you include "Unanswered" or "Failed" statuses, those contacts will be re-called immediately without waiting for the retry duration** (retry_after_hrs). This bypasses the normal retry wait time. **Common Status Values:** - "Pending" - Contact has not been called yet (new contacts) - "Unanswered" - Previous call was not answered (will be re-called immediately if included) - "Invalid" - Dialing to this number isn't allowed from the given DID. - "Completed" - Contact was successfully reached (rarely included for retries) **Usage Guidelines:** **For Resuming/Starting a Batch (Recommended):** - Use only ["Pending"] to call only new contacts that haven't been called yet - This is the standard approach when starting or resuming a batch **For Immediate Retry (Use with Caution):** - Include "Unanswered" or "Failed" only if you want to immediately re-call contacts that were previously unsuccessful - **Warning:** This will bypass the retry_after_hrs wait time and call them right away - Example: ["Pending", "Unanswered"] will call both new contacts AND immediately retry unanswered contacts **Best Practice:** For normal batch operations, use ["Pending"] only. Only include "Unanswered" or "Failed" if you specifically need to bypass the retry wait time.
- `schedule` (StartBatchRequestSchedule, optional) — Schedule configuration object (optional). If not provided, the existing schedule from the batch will be used. If no schedule exists, an error will be returned. The schedule defines when the batch should be active and making calls. All times are interpreted in the specified timezone. **Required fields:** * timezone: IANA timezone identifier (e.g., "Asia/Kolkata", "America/New\_York", "Europe/London", "UTC") * start\_time: Start time in "HH:mm" format using 24-hour clock (e.g., "09:00" for 9 AM, "18:30" for 6:30 PM) * end\_time: End time in "HH:mm" format using 24-hour clock (must be after start\_time) * days: Array of day numbers representing which days of the week the batch should run **Day Numbers:** * 1 = Monday * 2 = Tuesday * 3 = Wednesday * 4 = Thursday * 5 = Friday * 6 = Saturday * 7 = Sunday **Example:** \{"timezone": "Asia/Kolkata", "start\_time": "09:00", "end\_time": "18:00", "days": \[1,2,3,4,5]} This means the batch will run Monday through Friday from 9:00 AM to 6:00 PM India Standard Time (IST).

## Response

### 200

Batch started successfully

- `id` (integer, optional)
- `name` (string, optional, nullable)
- `status` (string, optional, nullable)
- `agent_id` (string, optional)
- `created_at` (datetime, optional, nullable)
- `schedule` (BatchDetailsResponseSchedule, optional, nullable)
- `max_retries` (integer, optional)
- `concurrency` (integer, optional)
- `retry_after_hrs` (double, optional)
- `total_contacts` (integer, optional)
- `completed_contacts` (integer, optional)
- `unanswered_contacts` (integer, optional)

## Errors

### 404 Not Found Error

Batch not found or unauthorized

- `error` (string, optional)
- `message` (string, optional)

## Types

### StartBatchRequestSchedule

Schedule configuration object (optional). If not provided, the existing schedule from the batch will be used. If no schedule exists, an error will be returned. The schedule defines when the batch should be active and making calls. All times are interpreted in the specified timezone. **Required fields:** * timezone: IANA timezone identifier (e.g., "Asia/Kolkata", "America/New\_York", "Europe/London", "UTC") * start\_time: Start time in "HH:mm" format using 24-hour clock (e.g., "09:00" for 9 AM, "18:30" for 6:30 PM) * end\_time: End time in "HH:mm" format using 24-hour clock (must be after start\_time) * days: Array of day numbers representing which days of the week the batch should run **Day Numbers:** * 1 = Monday * 2 = Tuesday * 3 = Wednesday * 4 = Thursday * 5 = Friday * 6 = Saturday * 7 = Sunday **Example:** \{"timezone": "Asia/Kolkata", "start\_time": "09:00", "end\_time": "18:00", "days": \[1,2,3,4,5]} This means the batch will run Monday through Friday from 9:00 AM to 6:00 PM India Standard Time (IST).

- `timezone` (string, required) — IANA timezone identifier. This determines the timezone for interpreting start_time and end_time. Common examples: - "Asia/Kolkata" - India Standard Time (IST) - "America/New_York" - Eastern Time (ET) - "America/Los_Angeles" - Pacific Time (PT) - "Europe/London" - Greenwich Mean Time / British Summer Time - "UTC" - Coordinated Universal Time The timezone must be a valid IANA timezone string in the format "Region/City".
- `start_time` (string, required) — Start time when the batch should begin making calls. Format: "HH:mm" using 24-hour clock (00:00 to 23:59) - Hours: 00-23 (00 = midnight, 12 = noon, 23 = 11 PM) - Minutes: 00-59 Examples: - "09:00" = 9:00 AM - "14:30" = 2:30 PM - "00:00" = Midnight - "23:59" = 11:59 PM This time is interpreted in the timezone specified in the timezone field.
- `end_time` (string, required) — End time when the batch should stop making calls. Format: "HH:mm" using 24-hour clock (00:00 to 23:59) - Hours: 00-23 (00 = midnight, 12 = noon, 23 = 11 PM) - Minutes: 00-59 Examples: - "18:00" = 6:00 PM - "17:30" = 5:30 PM - "23:59" = 11:59 PM **Important:** end_time must be after start_time. For example, if start_time is "09:00", end_time must be later than "09:00" on the same day. This time is interpreted in the timezone specified in the timezone field.
- `days` (list of integer, required) — Array of day numbers representing which days of the week the batch should be active. **Day Number Mapping:** - 1 = Monday - 2 = Tuesday - 3 = Wednesday - 4 = Thursday - 5 = Friday - 6 = Saturday - 7 = Sunday **Examples:** - [1, 2, 3, 4, 5] = Monday through Friday (weekdays) - [6, 7] = Saturday and Sunday (weekends) - [1, 3, 5] = Monday, Wednesday, Friday - [1, 2, 3, 4, 5, 6, 7] = Every day of the week The batch will only make calls on the specified days, during the time window defined by start_time and end_time.

### BatchDetailsResponseSchedule

- `timezone` (string, required) — IANA timezone string
- `start_time` (string, required) — Start time in "HH:mm" format (24-hour)
- `end_time` (string, required) — End time in "HH:mm" format (24-hour)
- `days` (list of integer, required) — Array of day numbers (1=Monday, 7=Sunday)

## Examples

### Weekday Schedule (Monday-Friday, 9 AM to 6 PM IST)

**Request**

```json
{
  "max_retries": 3,
  "retry_after_hrs": 3,
  "max_concurrent_calls": 5,
  "selected_statuses": [
    "Pending"
  ],
  "schedule": {
    "timezone": "Asia/Kolkata",
    "start_time": "09:00",
    "end_time": "18:00",
    "days": [
      1,
      2,
      3,
      4,
      5
    ]
  }
}
```

**Response**

```json
{
  "id": 1,
  "name": "string",
  "status": "string",
  "agent_id": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "schedule": {
    "timezone": "Asia/Kolkata",
    "start_time": "09:00",
    "end_time": "18:00",
    "days": [
      1,
      2,
      3,
      4,
      5
    ]
  },
  "max_retries": 1,
  "concurrency": 1,
  "retry_after_hrs": 1.1,
  "total_contacts": 1,
  "completed_contacts": 1,
  "unanswered_contacts": 1
}
```

**SDK Code**

```python Weekday Schedule (Monday-Friday, 9 AM to 6 PM IST)
import requests

url = "https://v1.getraya.app/api/batch/1/start"

payload = {
    "max_retries": 3,
    "retry_after_hrs": 3,
    "max_concurrent_calls": 5,
    "selected_statuses": ["Pending"],
    "schedule": {
        "timezone": "Asia/Kolkata",
        "start_time": "09:00",
        "end_time": "18:00",
        "days": [1, 2, 3, 4, 5]
    }
}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Weekday Schedule (Monday-Friday, 9 AM to 6 PM IST)
const url = 'https://v1.getraya.app/api/batch/1/start';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"max_retries":3,"retry_after_hrs":3,"max_concurrent_calls":5,"selected_statuses":["Pending"],"schedule":{"timezone":"Asia/Kolkata","start_time":"09:00","end_time":"18:00","days":[1,2,3,4,5]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Weekday Schedule (Monday-Friday, 9 AM to 6 PM IST)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://v1.getraya.app/api/batch/1/start"

	payload := strings.NewReader("{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\"\n  ],\n  \"schedule\": {\n    \"timezone\": \"Asia/Kolkata\",\n    \"start_time\": \"09:00\",\n    \"end_time\": \"18:00\",\n    \"days\": [\n      1,\n      2,\n      3,\n      4,\n      5\n    ]\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Weekday Schedule (Monday-Friday, 9 AM to 6 PM IST)
require 'uri'
require 'net/http'

url = URI("https://v1.getraya.app/api/batch/1/start")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\"\n  ],\n  \"schedule\": {\n    \"timezone\": \"Asia/Kolkata\",\n    \"start_time\": \"09:00\",\n    \"end_time\": \"18:00\",\n    \"days\": [\n      1,\n      2,\n      3,\n      4,\n      5\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Weekday Schedule (Monday-Friday, 9 AM to 6 PM IST)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://v1.getraya.app/api/batch/1/start")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\"\n  ],\n  \"schedule\": {\n    \"timezone\": \"Asia/Kolkata\",\n    \"start_time\": \"09:00\",\n    \"end_time\": \"18:00\",\n    \"days\": [\n      1,\n      2,\n      3,\n      4,\n      5\n    ]\n  }\n}")
  .asString();
```

```php Weekday Schedule (Monday-Friday, 9 AM to 6 PM IST)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://v1.getraya.app/api/batch/1/start', [
  'body' => '{
  "max_retries": 3,
  "retry_after_hrs": 3,
  "max_concurrent_calls": 5,
  "selected_statuses": [
    "Pending"
  ],
  "schedule": {
    "timezone": "Asia/Kolkata",
    "start_time": "09:00",
    "end_time": "18:00",
    "days": [
      1,
      2,
      3,
      4,
      5
    ]
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Weekday Schedule (Monday-Friday, 9 AM to 6 PM IST)
using RestSharp;

var client = new RestClient("https://v1.getraya.app/api/batch/1/start");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\"\n  ],\n  \"schedule\": {\n    \"timezone\": \"Asia/Kolkata\",\n    \"start_time\": \"09:00\",\n    \"end_time\": \"18:00\",\n    \"days\": [\n      1,\n      2,\n      3,\n      4,\n      5\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Weekday Schedule (Monday-Friday, 9 AM to 6 PM IST)
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "max_retries": 3,
  "retry_after_hrs": 3,
  "max_concurrent_calls": 5,
  "selected_statuses": ["Pending"],
  "schedule": [
    "timezone": "Asia/Kolkata",
    "start_time": "09:00",
    "end_time": "18:00",
    "days": [1, 2, 3, 4, 5]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://v1.getraya.app/api/batch/1/start")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Use Existing Schedule (Resume Batch)

**Request**

```json
{
  "max_retries": 3,
  "retry_after_hrs": 3,
  "max_concurrent_calls": 5,
  "selected_statuses": [
    "Pending"
  ]
}
```

**Response**

```json
{
  "id": 1,
  "name": "string",
  "status": "string",
  "agent_id": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "schedule": {
    "timezone": "Asia/Kolkata",
    "start_time": "09:00",
    "end_time": "18:00",
    "days": [
      1,
      2,
      3,
      4,
      5
    ]
  },
  "max_retries": 1,
  "concurrency": 1,
  "retry_after_hrs": 1.1,
  "total_contacts": 1,
  "completed_contacts": 1,
  "unanswered_contacts": 1
}
```

**SDK Code**

```python Use Existing Schedule (Resume Batch)
import requests

url = "https://v1.getraya.app/api/batch/1/start"

payload = {
    "max_retries": 3,
    "retry_after_hrs": 3,
    "max_concurrent_calls": 5,
    "selected_statuses": ["Pending"]
}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Use Existing Schedule (Resume Batch)
const url = 'https://v1.getraya.app/api/batch/1/start';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"max_retries":3,"retry_after_hrs":3,"max_concurrent_calls":5,"selected_statuses":["Pending"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Use Existing Schedule (Resume Batch)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://v1.getraya.app/api/batch/1/start"

	payload := strings.NewReader("{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Use Existing Schedule (Resume Batch)
require 'uri'
require 'net/http'

url = URI("https://v1.getraya.app/api/batch/1/start")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Use Existing Schedule (Resume Batch)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://v1.getraya.app/api/batch/1/start")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\"\n  ]\n}")
  .asString();
```

```php Use Existing Schedule (Resume Batch)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://v1.getraya.app/api/batch/1/start', [
  'body' => '{
  "max_retries": 3,
  "retry_after_hrs": 3,
  "max_concurrent_calls": 5,
  "selected_statuses": [
    "Pending"
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Use Existing Schedule (Resume Batch)
using RestSharp;

var client = new RestClient("https://v1.getraya.app/api/batch/1/start");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Use Existing Schedule (Resume Batch)
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "max_retries": 3,
  "retry_after_hrs": 3,
  "max_concurrent_calls": 5,
  "selected_statuses": ["Pending"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://v1.getraya.app/api/batch/1/start")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Immediate Retry (Bypass Wait Time)

**Request**

```json
{
  "max_retries": 3,
  "retry_after_hrs": 3,
  "max_concurrent_calls": 5,
  "selected_statuses": [
    "Pending",
    "Unanswered"
  ],
  "schedule": {
    "timezone": "Asia/Kolkata",
    "start_time": "09:00",
    "end_time": "18:00",
    "days": [
      1,
      2,
      3,
      4,
      5
    ]
  }
}
```

**Response**

```json
{
  "id": 1,
  "name": "string",
  "status": "string",
  "agent_id": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "schedule": {
    "timezone": "Asia/Kolkata",
    "start_time": "09:00",
    "end_time": "18:00",
    "days": [
      1,
      2,
      3,
      4,
      5
    ]
  },
  "max_retries": 1,
  "concurrency": 1,
  "retry_after_hrs": 1.1,
  "total_contacts": 1,
  "completed_contacts": 1,
  "unanswered_contacts": 1
}
```

**SDK Code**

```python Immediate Retry (Bypass Wait Time)
import requests

url = "https://v1.getraya.app/api/batch/1/start"

payload = {
    "max_retries": 3,
    "retry_after_hrs": 3,
    "max_concurrent_calls": 5,
    "selected_statuses": ["Pending", "Unanswered"],
    "schedule": {
        "timezone": "Asia/Kolkata",
        "start_time": "09:00",
        "end_time": "18:00",
        "days": [1, 2, 3, 4, 5]
    }
}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Immediate Retry (Bypass Wait Time)
const url = 'https://v1.getraya.app/api/batch/1/start';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"max_retries":3,"retry_after_hrs":3,"max_concurrent_calls":5,"selected_statuses":["Pending","Unanswered"],"schedule":{"timezone":"Asia/Kolkata","start_time":"09:00","end_time":"18:00","days":[1,2,3,4,5]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Immediate Retry (Bypass Wait Time)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://v1.getraya.app/api/batch/1/start"

	payload := strings.NewReader("{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\",\n    \"Unanswered\"\n  ],\n  \"schedule\": {\n    \"timezone\": \"Asia/Kolkata\",\n    \"start_time\": \"09:00\",\n    \"end_time\": \"18:00\",\n    \"days\": [\n      1,\n      2,\n      3,\n      4,\n      5\n    ]\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Immediate Retry (Bypass Wait Time)
require 'uri'
require 'net/http'

url = URI("https://v1.getraya.app/api/batch/1/start")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\",\n    \"Unanswered\"\n  ],\n  \"schedule\": {\n    \"timezone\": \"Asia/Kolkata\",\n    \"start_time\": \"09:00\",\n    \"end_time\": \"18:00\",\n    \"days\": [\n      1,\n      2,\n      3,\n      4,\n      5\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Immediate Retry (Bypass Wait Time)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://v1.getraya.app/api/batch/1/start")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\",\n    \"Unanswered\"\n  ],\n  \"schedule\": {\n    \"timezone\": \"Asia/Kolkata\",\n    \"start_time\": \"09:00\",\n    \"end_time\": \"18:00\",\n    \"days\": [\n      1,\n      2,\n      3,\n      4,\n      5\n    ]\n  }\n}")
  .asString();
```

```php Immediate Retry (Bypass Wait Time)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://v1.getraya.app/api/batch/1/start', [
  'body' => '{
  "max_retries": 3,
  "retry_after_hrs": 3,
  "max_concurrent_calls": 5,
  "selected_statuses": [
    "Pending",
    "Unanswered"
  ],
  "schedule": {
    "timezone": "Asia/Kolkata",
    "start_time": "09:00",
    "end_time": "18:00",
    "days": [
      1,
      2,
      3,
      4,
      5
    ]
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Immediate Retry (Bypass Wait Time)
using RestSharp;

var client = new RestClient("https://v1.getraya.app/api/batch/1/start");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"max_retries\": 3,\n  \"retry_after_hrs\": 3,\n  \"max_concurrent_calls\": 5,\n  \"selected_statuses\": [\n    \"Pending\",\n    \"Unanswered\"\n  ],\n  \"schedule\": {\n    \"timezone\": \"Asia/Kolkata\",\n    \"start_time\": \"09:00\",\n    \"end_time\": \"18:00\",\n    \"days\": [\n      1,\n      2,\n      3,\n      4,\n      5\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Immediate Retry (Bypass Wait Time)
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "max_retries": 3,
  "retry_after_hrs": 3,
  "max_concurrent_calls": 5,
  "selected_statuses": ["Pending", "Unanswered"],
  "schedule": [
    "timezone": "Asia/Kolkata",
    "start_time": "09:00",
    "end_time": "18:00",
    "days": [1, 2, 3, 4, 5]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://v1.getraya.app/api/batch/1/start")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```