> ## Client identification
>
> Requests to this API should include a `Client-Platform` header alongside
> `Authorization`, identifying the application, tool, or model making the
> request. This is used for integration support and analytics.
>
> Use your model or tool name, for example `claude-code` or `chatgpt`.
>
> Example:
>
> ```bash
> curl https://api.salaryboxapp.com/... \
>   -H "Authorization: Api-Key <api-key>" \
>   -H "Client-Platform: claude-code"
> ```

# Update Scheduled Report

PUT https://api.salaryboxapp.com/v2/customer/v1/report/scheduled
Content-Type: application/json

Changes or pauses one scheduled report. Shared rules: see [Writing data](/conventions#writing-data).

- The report is named by its current `report` and `time_slot`, exactly as List Scheduled Reports shows them. An Admin can change any scheduled report; anyone else only the ones they set up.
- Send at least one change: otherwise `400` `"Send at least one field to change."`
- `new_report` and `new_time_slot` move it to another report or time. Refused with `400` when that report is already scheduled at that time.
- `recipient_emails`, `branch_names` and `department_names` replace the current lists. An empty `branch_names` or `department_names` means the branches or departments of the person who set it up.
- `is_active: false` pauses the emails; `true` resumes them.
- No match: `404` "Scheduled report not found." If two scheduled reports match (possible for reports set up in the app), `400`: change them in the SalaryBox app.
- Needs the Attendance Reports plan feature. Deleting is not available through the API.


Reference: https://docs.salarybox.in/api-reference/attendance/report-scheduled-update

## Authentication

- `Authorization` header (required) (prefixed with ` Api-Key   `) — Format: "Api-Key \{api-key}"

## Request

### Body (application/json)

This endpoint expects a ScheduledReportUpdateRequest.

- `report` (enum, required) — The report's current report.
  - Allowed values: `Daily Attendance Report`, `Shift Wise Daily Attendance Report`
- `time_slot` (enum, required) — The report's current time slot.
  - Allowed values: `12 PM IST`, `4 PM IST`, `8 PM IST`, `12 AM IST`
- `new_report` (enum, optional)
  - Allowed values: `Daily Attendance Report`, `Shift Wise Daily Attendance Report`
- `new_time_slot` (enum, optional)
  - Allowed values: `12 PM IST`, `4 PM IST`, `8 PM IST`, `12 AM IST`
- `file_type` (enum, optional)
  - Allowed values: `PDF`, `XLSX`
- `recipient_emails` (list of string, optional) — Replaces the current list.
- `branch_names` (list of string, optional) — Replaces the current branches. Empty means the branches of the person who set it up.
- `department_names` (list of string, optional) — Replaces the current departments. Empty means the departments of the person who set it up.
- `is_active` (boolean, optional) — `false` pauses the emails, `true` resumes them.

## Response

### 200

The change was saved. `data` is the scheduled report after the change.

- `message` (string, required)
- `status` (boolean, required)
- `data` (ScheduledReportItem, required)

## Errors

### 400 Bad Request Error

The request was refused, so nothing was changed.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

### 403 Forbidden Error

The plan lacks Attendance Reports, or a Custom role lacks the permission.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

### 404 Not Found Error

No scheduled report matches `report` and `time_slot`.

- `message` (string, required)
- `status` (boolean, required)
- `errors` (map from string to any, optional, nullable)

## Types

### ScheduledReportItem

- `report` (enum, required)
  - Allowed values: `Daily Attendance Report`, `Shift Wise Daily Attendance Report`
- `file_type` (enum, required)
  - Allowed values: `PDF`, `XLSX`
- `branches` (list of string, required, nullable) — Branch names. `null` means all branches.
- `departments` (list of string, required, nullable) — Department names. `null` means all departments.
- `time_slot` (enum, required) — When the report is emailed each day.
  - Allowed values: `12 PM IST`, `4 PM IST`, `8 PM IST`, `12 AM IST`
- `recipient_emails` (list of string, required) — Up to 5 email addresses.
- `is_active` (boolean, required)
- `created_by` (string, required, nullable) — Name of the person who set the report up.
- `created_on` (datetime, required)
- `updated_on` (datetime, required)

## Examples

### Example

**Response**

```json
{
  "message": "Scheduled report updated successfully",
  "status": true,
  "data": {
    "report": "Daily Attendance Report",
    "file_type": "PDF",
    "branches": null,
    "departments": [
      "Sales"
    ],
    "time_slot": "8 PM IST",
    "recipient_emails": [
      "hr@example.com"
    ],
    "is_active": true,
    "created_by": "Asha Mehta",
    "created_on": "2026-11-12T09:30:00.123456Z",
    "updated_on": "2026-11-12T09:30:00.123456Z"
  }
}
```

**SDK Code**

```python Example
import requests

url = "https://api.salaryboxapp.com/v2/customer/v1/report/scheduled"

headers = {"Authorization": "Api-Key  <apiKey>"}

response = requests.put(url, headers=headers)

print(response.json())
```

```javascript Example
const url = 'https://api.salaryboxapp.com/v2/customer/v1/report/scheduled';
const options = {method: 'PUT', headers: {Authorization: 'Api-Key  <apiKey>'}};

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

```go Example
package main

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

func main() {

	url := "https://api.salaryboxapp.com/v2/customer/v1/report/scheduled"

	req, _ := http.NewRequest("PUT", url, nil)

	req.Header.Add("Authorization", "Api-Key  <apiKey>")

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

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

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

}
```

```ruby Example
require 'uri'
require 'net/http'

url = URI("https://api.salaryboxapp.com/v2/customer/v1/report/scheduled")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Api-Key  <apiKey>'

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

```java Example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.salaryboxapp.com/v2/customer/v1/report/scheduled")
  .header("Authorization", "Api-Key  <apiKey>")
  .asString();
```

```php Example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.salaryboxapp.com/v2/customer/v1/report/scheduled', [
  'headers' => [
    'Authorization' => 'Api-Key  <apiKey>',
  ],
]);

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

```csharp Example
using RestSharp;

var client = new RestClient("https://api.salaryboxapp.com/v2/customer/v1/report/scheduled");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Api-Key  <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Example
import Foundation

let headers = ["Authorization": "Api-Key  <apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.salaryboxapp.com/v2/customer/v1/report/scheduled")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers

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()
```

### Pause

**Request**

```json
{
  "report": "Daily Attendance Report",
  "time_slot": "8 PM IST",
  "is_active": false
}
```

**Response**

```json
{
  "message": "Scheduled report updated successfully",
  "status": true,
  "data": {
    "report": "Daily Attendance Report",
    "file_type": "PDF",
    "branches": null,
    "departments": [
      "Sales"
    ],
    "time_slot": "8 PM IST",
    "recipient_emails": [
      "hr@example.com"
    ],
    "is_active": true,
    "created_by": "Asha Mehta",
    "created_on": "2026-11-12T09:30:00.123456Z",
    "updated_on": "2026-11-12T09:30:00.123456Z"
  }
}
```

**SDK Code**

```python Pause
import requests

url = "https://api.salaryboxapp.com/v2/customer/v1/report/scheduled"

payload = {
    "report": "Daily Attendance Report",
    "time_slot": "8 PM IST",
    "is_active": False
}
headers = {
    "Authorization": "Api-Key  <apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Pause
const url = 'https://api.salaryboxapp.com/v2/customer/v1/report/scheduled';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Api-Key  <apiKey>', 'Content-Type': 'application/json'},
  body: '{"report":"Daily Attendance Report","time_slot":"8 PM IST","is_active":false}'
};

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

```go Pause
package main

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

func main() {

	url := "https://api.salaryboxapp.com/v2/customer/v1/report/scheduled"

	payload := strings.NewReader("{\n  \"report\": \"Daily Attendance Report\",\n  \"time_slot\": \"8 PM IST\",\n  \"is_active\": false\n}")

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

	req.Header.Add("Authorization", "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 Pause
require 'uri'
require 'net/http'

url = URI("https://api.salaryboxapp.com/v2/customer/v1/report/scheduled")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Api-Key  <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"report\": \"Daily Attendance Report\",\n  \"time_slot\": \"8 PM IST\",\n  \"is_active\": false\n}"

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

```java Pause
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.salaryboxapp.com/v2/customer/v1/report/scheduled")
  .header("Authorization", "Api-Key  <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"report\": \"Daily Attendance Report\",\n  \"time_slot\": \"8 PM IST\",\n  \"is_active\": false\n}")
  .asString();
```

```php Pause
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.salaryboxapp.com/v2/customer/v1/report/scheduled', [
  'body' => '{
  "report": "Daily Attendance Report",
  "time_slot": "8 PM IST",
  "is_active": false
}',
  'headers' => [
    'Authorization' => 'Api-Key  <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Pause
using RestSharp;

var client = new RestClient("https://api.salaryboxapp.com/v2/customer/v1/report/scheduled");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Api-Key  <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"report\": \"Daily Attendance Report\",\n  \"time_slot\": \"8 PM IST\",\n  \"is_active\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Pause
import Foundation

let headers = [
  "Authorization": "Api-Key  <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "report": "Daily Attendance Report",
  "time_slot": "8 PM IST",
  "is_active": false
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.salaryboxapp.com/v2/customer/v1/report/scheduled")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```

### MoveAndAddRecipient

**Request**

```json
{
  "report": "Daily Attendance Report",
  "time_slot": "8 PM IST",
  "new_time_slot": "4 PM IST",
  "recipient_emails": [
    "hr@example.com",
    "ops@example.com"
  ]
}
```

**Response**

```json
{
  "message": "Scheduled report updated successfully",
  "status": true,
  "data": {
    "report": "Daily Attendance Report",
    "file_type": "PDF",
    "branches": null,
    "departments": [
      "Sales"
    ],
    "time_slot": "8 PM IST",
    "recipient_emails": [
      "hr@example.com"
    ],
    "is_active": true,
    "created_by": "Asha Mehta",
    "created_on": "2026-11-12T09:30:00.123456Z",
    "updated_on": "2026-11-12T09:30:00.123456Z"
  }
}
```

**SDK Code**

```python MoveAndAddRecipient
import requests

url = "https://api.salaryboxapp.com/v2/customer/v1/report/scheduled"

payload = {
    "report": "Daily Attendance Report",
    "time_slot": "8 PM IST",
    "new_time_slot": "4 PM IST",
    "recipient_emails": ["hr@example.com", "ops@example.com"]
}
headers = {
    "Authorization": "Api-Key  <apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript MoveAndAddRecipient
const url = 'https://api.salaryboxapp.com/v2/customer/v1/report/scheduled';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Api-Key  <apiKey>', 'Content-Type': 'application/json'},
  body: '{"report":"Daily Attendance Report","time_slot":"8 PM IST","new_time_slot":"4 PM IST","recipient_emails":["hr@example.com","ops@example.com"]}'
};

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

```go MoveAndAddRecipient
package main

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

func main() {

	url := "https://api.salaryboxapp.com/v2/customer/v1/report/scheduled"

	payload := strings.NewReader("{\n  \"report\": \"Daily Attendance Report\",\n  \"time_slot\": \"8 PM IST\",\n  \"new_time_slot\": \"4 PM IST\",\n  \"recipient_emails\": [\n    \"hr@example.com\",\n    \"ops@example.com\"\n  ]\n}")

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

	req.Header.Add("Authorization", "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 MoveAndAddRecipient
require 'uri'
require 'net/http'

url = URI("https://api.salaryboxapp.com/v2/customer/v1/report/scheduled")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Api-Key  <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"report\": \"Daily Attendance Report\",\n  \"time_slot\": \"8 PM IST\",\n  \"new_time_slot\": \"4 PM IST\",\n  \"recipient_emails\": [\n    \"hr@example.com\",\n    \"ops@example.com\"\n  ]\n}"

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

```java MoveAndAddRecipient
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.salaryboxapp.com/v2/customer/v1/report/scheduled")
  .header("Authorization", "Api-Key  <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"report\": \"Daily Attendance Report\",\n  \"time_slot\": \"8 PM IST\",\n  \"new_time_slot\": \"4 PM IST\",\n  \"recipient_emails\": [\n    \"hr@example.com\",\n    \"ops@example.com\"\n  ]\n}")
  .asString();
```

```php MoveAndAddRecipient
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.salaryboxapp.com/v2/customer/v1/report/scheduled', [
  'body' => '{
  "report": "Daily Attendance Report",
  "time_slot": "8 PM IST",
  "new_time_slot": "4 PM IST",
  "recipient_emails": [
    "hr@example.com",
    "ops@example.com"
  ]
}',
  'headers' => [
    'Authorization' => 'Api-Key  <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp MoveAndAddRecipient
using RestSharp;

var client = new RestClient("https://api.salaryboxapp.com/v2/customer/v1/report/scheduled");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Api-Key  <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"report\": \"Daily Attendance Report\",\n  \"time_slot\": \"8 PM IST\",\n  \"new_time_slot\": \"4 PM IST\",\n  \"recipient_emails\": [\n    \"hr@example.com\",\n    \"ops@example.com\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift MoveAndAddRecipient
import Foundation

let headers = [
  "Authorization": "Api-Key  <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "report": "Daily Attendance Report",
  "time_slot": "8 PM IST",
  "new_time_slot": "4 PM IST",
  "recipient_emails": ["hr@example.com", "ops@example.com"]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.salaryboxapp.com/v2/customer/v1/report/scheduled")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```