---
title: "Create job site"
method: POST
path: "/v2/organizations/{organization_id}/job_sites"
tags: ["job_sites"]
---

# Create job site

`POST /v2/organizations/{organization_id}/job_sites`

## Request

- Base URL: `https://api.hubstaff.com`
- URL: `https://api.hubstaff.com/v2/organizations/{organization_id}/job_sites`
- Auth: OAuth 2
  - Authorization code: `https://account.hubstaff.com/authorizations/new`
  - Token URL: `https://account.hubstaff.com/access_tokens` scopes: `hubstaff:read`, `hubstaff:write`
- TypeScript: <https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/docs/v2/organizations/:organization_id/job_sites/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new job site.

Returns the created job site.

## Path parameters

- `organization_id` integer, required

## Request body

- PostV2OrganizationsOrganizationIdJobSites: Create job site
  - `name` string, required: Job site name
  - `address` string, required: Job site address
  - `latitude` number, double, required: Job site latitude
  - `longitude` number, double, required: Job site longitude
  - `radius` integer, required: Job site radius
  - `rules` object[], required: At least one rule; each rule needs user_ids or team_ids
    - `enter_action` 'none' | 'track' | 'notify': The enter action
    - `exit_action` 'none' | 'track' | 'notify': The exit action
    - `user_ids` integer[]: List of user IDs to add to this rule. Required unless team_ids is set
    - `team_ids` integer[]: List of team IDs to add to this rule. Required unless user_ids is set
    - `start_project_id` integer: Project ID to auto start when enter_action is set to track

## Response `201`

A job site

- object
  - `job_site` JobSite: JobSite model
    - `id` integer, required: Job Site ID
    - `organization_id` integer, required: Organization ID
    - `name` string, required: Job site name
    - `status` string, required: Job site status
    - `address` string, required: Job site address
    - `latitude` string, required: Job site latitude, a decimal string
    - `longitude` string, required: Job site longitude, a decimal string
    - `radius` integer, required: Job site radius
    - `created_at` string, date-time, required: When the record was created
    - `updated_at` string, date-time, required: When the record was last updated
    - `last_visited_at` string, date-time, required: Last visit time
    - `rules` JobSiteRule[]: Job site rules
      - `id` integer, required: Job Site Rule ID
      - `enter_action` string, required: The enter action
      - `exit_action` string, required: The exit action
      - `user_ids` integer[], required: List of user IDs to set for this rule
      - `team_ids` integer[], required: List of team IDs to set for this rule
      - `start_project_id` integer: Project ID to auto start when enter_action is set to track
      - `start_task_id` integer: Task ID to auto start when enter_action is set to track

## Other responses

- `400`: Invalid parameters
- `401`: Unauthorized
- `403`: API access is only for organizations on an active plan
- `404`: Could not find record
- `429`: Rate limit exceeded

## Changes

- **2026-11-06** `c6b90e4e4bdc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/changes/v2/organizations/:organization_id/job_sites/post.md)

---

[API](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api.md) - [All operations](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/revisions/c6b90e4e4bdc?raw)
