---
title: "Create a new Job Activity"
method: POST
path: "/jobactivity.json"
tags: ["Job Activities"]
---

# Create a new Job Activity

`POST /jobactivity.json`

#### OAuth Scope
This endpoint requires the following OAuth scope **manage_schedule**.

			
			
#### Record UUID
UUID is optional for record creation. If no UUID is supplied, a UUID will be automatically generated for the new record and returned in the `x-record-uuid` response header.

## Request body

- JobActivityCreate
  - `job_uuid` string, uuid — The UUID of the job this activity belongs to
  - `staff_uuid` string, uuid — The UUID of the staff member assigned to this activity
  - `start_date` string — The scheduled start date and time of the activity
  - `end_date` string — The scheduled end date and time of the activity
  - `activity_was_scheduled` string — Boolean flag indicating whether this activity was scheduled in advance. Cannot be true if activity_was_recorded is true.
  - `activity_was_recorded` string — Boolean flag indicating whether this activity was recorded after completion rather than scheduled in advance. Cannot be true if activity_was_scheduled is true.
  - `activity_was_automated` string — Integer flag indicating if the activity was automated: 0
  - `has_been_opened` string — Boolean flag indicating whether the assigned staff member has viewed this job activity. Resets to false if the staff member or start time is changed. Only relevant when activity_was_scheduled is true.
  - `has_been_opened_timestamp` string — The date and time when the assigned staff member first viewed this job activity. Format is YYYY-MM-DD HH:MM:SS. Resets when staff member or start time is changed. Only relevant when activity_was_scheduled is true.
  - `travel_time_in_seconds` integer — The estimated travel time to reach this activity location in seconds
  - `travel_distance_in_meters` integer — The estimated travel distance to reach this activity location in meters
  - `allocated_by_staff_uuid` unknown
  - `allocated_timestamp` unknown
  - `material_uuid` string, uuid — The UUID of the material associated with this activity. Used to determine the cost of the activity.
  - `uuid` string, uuid — Unique identifier for this record
  - `edit_by_staff_uuid` string, uuid — UUID of Staff Member who last modified record

## Response `200`

Success

- Result
  - `errorCode` number
  - `message` string

## Other responses

- `400` — Bad Request - The request is malformed or contains invalid parameters
- `401` — Unauthorized - Authentication credentials are missing or invalid
- `403` — Forbidden - You don't have permission to create this resource
- `429` — Too Many Requests - You have exceeded the rate limit
- `500` — Internal Server Error - An unexpected error occurred on the server

---

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