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

# Update Job

> Update an existing job within a project.

Requires an API key with `full_access` scope. All fields are optional. Only include the fields you want to change.

## Path parameters

<ParamField path="projectId" type="string" required>
  The unique identifier of the project.
</ParamField>

<ParamField path="jobId" type="string" required>
  The unique identifier of the job.
</ParamField>

## Body

<ParamField body="name" type="string">
  Job name. 1 to 100 characters.
</ParamField>

<ParamField body="description" type="string">
  Job description. Max 1000 characters.
</ParamField>

<ParamField body="type" type="string">
  Job type. Must match one of the job types configured in your workspace.
</ParamField>

<ParamField body="status" type="string">
  Job status. One of: `draft`, `not_started`, `planned`, `in_progress`, `completed`, `on_hold`, `weather_delayed`, `technical_issues`, `cancelled`, `aborted`, `other`.

  <Note>
    Your workspace may show custom display names for these statuses in the dashboard. The API always uses the predefined values listed above. Use `other` with `other_status_reason` for statuses that don't map to a predefined value.
  </Note>
</ParamField>

<ParamField body="priority" type="string">
  Priority level. One of: `low`, `medium`, `high`.
</ParamField>

<ParamField body="job_pattern" type="string">
  Either `one_time` or `recurring`. Changing this will regenerate job
  occurrences.
</ParamField>

<ParamField body="start_date" type="string">
  Start date in ISO 8601 format. Cannot be more than 6 months in the past.
</ParamField>

<ParamField body="end_date" type="string | null">
  End date in ISO 8601 format. Must be on or after `start_date`. Set to `null`
  to clear.
</ParamField>

<ParamField body="latitude" type="number | null">
  Latitude of the job location. Between -90 and 90. Must be provided together
  with `longitude`. Set both to `null` to clear.
</ParamField>

<ParamField body="longitude" type="number | null">
  Longitude of the job location. Between -180 and 180. Must be provided together
  with `latitude`. Set both to `null` to clear.
</ParamField>

<ParamField body="inspection_notes" type="string">
  Notes for the inspection. Max 2000 characters.
</ParamField>

<ParamField body="capture_types" type="string[] | null">
  Array of capture types. Valid values: `drone_inspection`,
  `thermal_inspection`, `video_capture`, `3d_mapping`, `lidar_scan`,
  `orthomosaic`, `ground_smartphone`, `ground_360`, `panorama`. Max 20 items, no
  duplicates. Set to `null` to clear.
</ParamField>

<ParamField body="external_id" type="string | null">
  Your own identifier for this job. Max 255 characters. Set to `null` to clear.
</ParamField>

<ParamField body="other_status_reason" type="string">
  Required when `status` is `other`. 1 to 200 characters.
</ParamField>

### Recurring job fields

These fields only apply when `job_pattern` is `recurring`. Changing any of these will regenerate job occurrences.

<ParamField body="recurring_frequency" type="string | null">
  Recurrence frequency. One of: `daily`, `weekly`, `monthly`, `yearly`,
  `flexible`. Set to `null` to clear.
</ParamField>

<ParamField body="recurring_interval" type="number | null">
  Repeat every N periods. Between 1 and 365. Cannot be used with `flexible`
  frequency. Set to `null` to clear.
</ParamField>

<ParamField body="selected_days_of_week" type="number[] | null">
  Days of the week. Array of numbers where 0 = Sunday, 6 = Saturday. Max 7
  values. Set to `null` to clear.
</ParamField>

<ParamField body="week_of_month" type="number | null">
  Which week of the month. One of: `1`, `2`, `3`, `4`, or `-1` (last week). Set
  to `null` to clear.
</ParamField>

<ParamField body="weeks_of_month" type="number[] | null">
  Multiple weeks of the month. Array of values: `1`, `2`, `3`, `4`, or `-1`
  (last week). Max 5 values, no duplicates. Set to `null` to clear.
</ParamField>

<ParamField body="flights_per_occurrence" type="number | null">
  Number of flights per occurrence. Between 1 and 10. Set to `null` to clear.
</ParamField>

## Response

<ResponseField name="message" type="string">
  Confirmation message.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.dronebundle.com/v1/projects/01964c6b-7a3e-7f00-8000-abc123def456/jobs/019d4350-a1b2-7c3d-8e4f-567890abcdef \
    -H "Authorization: Bearer v1_your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "status": "in_progress",
      "priority": "medium",
      "capture_types": ["drone_inspection", "thermal_inspection"]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Job updated"
  }
  ```
</ResponseExample>

## Errors

**400 Bad Request** - Validation failed.

```json theme={null}
{
  "message": "name must be between 1 and 100 characters"
}
```

Other validation messages include:

* `status must be one of: draft, not_started, in_progress, ...`
* `priority must be one of: low, medium, high`
* `start_date must be a valid ISO date string`
* `end_date cannot be before start_date`
* `latitude must be between -90 and 90`
* `Both latitude and longitude must be provided together`
* `other_status_reason is required when status is "other"`

**404 Not Found** - Job not found.

```json theme={null}
{
  "message": "Job not found"
}
```
