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

# Create a job

> Create a job

```jsonc Body raw (json) wrap expandable theme={null}
{
  "customer_id",// required | integer | existing customer id
  "project_id",// nullable | integer | existing project id
  "job_type",// required | string | max:150
  "subtitle",// optional | string | max:150
  "status",// required, if status_id is not set | integer | acceptable_values: 1(new),2(in progress),3(pending),4(completed),5(canceled),6(on the way)
  "status_id",// required, if status is not set | integer | existing custom status id
  "status_workflow_id",// required, if status_id is set | integer | existing status workflow id
  "start_time",// nullable | timestamp
  "end_time",// nullable | timestamp
  "due_date",// nullable | timestamp
  "billing",// required | integer
  "notes",// optional | string | max:7500
  "field_notes",// optional | string | max:5000
  "location_id",// nullable | integer | existing location id
  "generate_invoice",// optional | boolean
  "type",// optional | string | acceptable_values: task,job
  "is_template",// optional | boolean
  "in_progress_status_log",// nullable | integer
  "template_id",// nullable | integer | existing job template id
  "hazardco_swms_id",// nullable | integer | existing swms file id
  "maintenance_agreement_id",// nullable | integer | existing maintenance agreement id
  "maintenance_occurrence_id",// nullable | integer | existing maintenance occurrence id
  "recurring_parent_id",// nullable | integer | existing job recurring id
  "task_category_id",// nullable | integer | existing task category id
  "customer_contact_id",// nullable | integer | existing customer contact id
  "assignments": [// optional | array
    {
      "team_id",// nullable | integer | existing team id
      "assigned_members"// required | array | existing user ids
    }
  ],
  "customfields": [ // nullable | optional | array | description: array of custom fleds
    {
        "id", // optional | nullable | required if field_instance_id is not set | integer | custom field id
        "field_instance_id", // optional | nullable | required if id is not set | integer | custom field instance id
        "value" // required | string | custom value
    },
    {
        "id", // optional | nullable | required if field_instance_id is not set | integer | custom field id
        "field_instance_id", // optional | nullable | required if id is not set | integer | custom field instance id
        "value" // required | string | custom value
    }
  ],
  "visits": [// nullable | array
    {
      "status",// nullable | integer | acceptable_values: 1(new),2(in progress),3(pending),4(completed),5(canceled),6(on the way)
      "title",// nullable | string
      "subtitle",// nullable | string
      "is_visible",// optional | boolean
      "start_time",// nullable | timestamp
      "end_time"// nullable | timestamp
    }
  ],
  "tags",// optional | array | description: array of tag ids
  "customer_arrival_window_start_time",// nullable | timestamp
  "customer_arrival_window_end_time",// nullable | timestamp
  "asset_ids"// optional | array | description: array of existing assets ids
  "qb_time_class_id"// optional | nullable | integer | existing Quickbooks Time class id
}
```


## OpenAPI

````yaml post /jobs
openapi: 3.0.0
info:
  title: FieldPulse API
  description: >-
    REST API for the FieldPulse field service management platform.


    **Authentication:** All requests require an `x-api-key` header. Contact
    support@fieldpulse.com to obtain your API key.


    **Important:** The API Playground below makes live requests against your
    production data. Use caution when testing write operations (POST, PUT,
    DELETE).
  version: 1.0.0
servers:
  - url: https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Assets
    description: Endpoints related to assets
  - name: Assets Category
    description: Endpoints related to assets category
  - name: Comments
    description: Endpoints related to comments
  - name: Company Profile
    description: Endpoints related to contracts
  - name: Contracts
    description: Endpoints related to contracts
  - name: Customers
    description: Endpoints related to customers
  - name: Custom Fields
    description: Endpoints related to custom fields
  - name: Estimates
    description: Endpoints related to estimates
  - name: Invoices
  - name: Items
  - name: Jobs
  - name: Lead Source
  - name: Locations
  - name: Material Lists
  - name: Payments
  - name: Pipeline Status
  - name: Projects
  - name: Purchase Orders
  - name: Subtasks
  - name: Tags
  - name: Teams
  - name: Timesheets
  - name: Users
  - name: Vendors
  - name: Version
paths:
  /jobs:
    post:
      tags:
        - Jobs
      summary: Create a job
      description: Create a job
      operationId: postJobs
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: integer
                  description: Existing customer id.
                project_id:
                  type: integer
                  nullable: true
                  description: Existing project id.
                job_type:
                  type: string
                  maxLength: 150
                subtitle:
                  type: string
                  maxLength: 150
                status:
                  type: integer
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                  description: >-
                    Required if status_id is not set. 1 = new, 2 = in progress,
                    3 = pending, 4 = completed, 5 = canceled, 6 = on the way.
                status_id:
                  type: integer
                  description: Required if status is not set. Existing custom status id.
                status_workflow_id:
                  type: integer
                  description: Required if status_id is set. Existing status workflow id.
                start_time:
                  type: integer
                  nullable: true
                  description: Unix timestamp.
                end_time:
                  type: integer
                  nullable: true
                  description: Unix timestamp.
                due_date:
                  type: integer
                  nullable: true
                  description: Unix timestamp.
                billing:
                  type: integer
                notes:
                  type: string
                  maxLength: 7500
                field_notes:
                  type: string
                  maxLength: 5000
                location_id:
                  type: integer
                  nullable: true
                  description: Existing location id.
                generate_invoice:
                  type: boolean
                type:
                  type: string
                  enum:
                    - task
                    - job
                is_template:
                  type: boolean
                in_progress_status_log:
                  type: integer
                  nullable: true
                template_id:
                  type: integer
                  nullable: true
                  description: Existing job template id.
                hazardco_swms_id:
                  type: integer
                  nullable: true
                  description: Existing swms file id.
                maintenance_agreement_id:
                  type: integer
                  nullable: true
                  description: Existing maintenance agreement id.
                maintenance_occurrence_id:
                  type: integer
                  nullable: true
                  description: Existing maintenance occurrence id.
                recurring_parent_id:
                  type: integer
                  nullable: true
                  description: Existing job recurring id.
                task_category_id:
                  type: integer
                  nullable: true
                  description: Existing task category id.
                customer_contact_id:
                  type: integer
                  nullable: true
                  description: Existing customer contact id.
                assignments:
                  type: array
                  items:
                    type: object
                    properties:
                      team_id:
                        type: integer
                        nullable: true
                        description: Existing team id.
                      assigned_members:
                        type: array
                        items:
                          type: integer
                        description: Existing user ids.
                    required:
                      - assigned_members
                customfields:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        nullable: true
                        description: >-
                          Required if field_instance_id is not set. Custom field
                          id.
                      field_instance_id:
                        type: integer
                        nullable: true
                        description: Required if id is not set. Custom field instance id.
                      value:
                        type: string
                        description: Custom value.
                    required:
                      - value
                  nullable: true
                  description: Array of custom fields.
                visits:
                  type: array
                  items:
                    type: object
                    properties:
                      status:
                        type: integer
                        nullable: true
                        enum:
                          - 1
                          - 2
                          - 3
                          - 4
                          - 5
                          - 6
                        description: >-
                          1 = new, 2 = in progress, 3 = pending, 4 = completed,
                          5 = canceled, 6 = on the way.
                      title:
                        type: string
                        nullable: true
                      subtitle:
                        type: string
                        nullable: true
                      is_visible:
                        type: boolean
                      start_time:
                        type: integer
                        nullable: true
                        description: Unix timestamp.
                      end_time:
                        type: integer
                        nullable: true
                        description: Unix timestamp.
                  nullable: true
                tags:
                  type: array
                  items:
                    type: integer
                  description: Array of tag ids.
                customer_arrival_window_start_time:
                  type: integer
                  nullable: true
                  description: Unix timestamp.
                customer_arrival_window_end_time:
                  type: integer
                  nullable: true
                  description: Unix timestamp.
                asset_ids:
                  type: array
                  items:
                    type: integer
                  description: Array of existing assets ids.
                qb_time_class_id:
                  type: integer
                  nullable: true
                  description: Existing Quickbooks Time class id.
              required:
                - customer_id
                - job_type
                - billing
            example:
              customer_id: 1
              project_id: 1
              job_type: some string
              subtitle: some string
              status: 1
              status_id: 1
              status_workflow_id: 1
              start_time: 1234567890
              end_time: 1234567890
              due_date: 1234567890
              billing: 1
              notes: some string
              field_notes: some string
              location_id: 1
              generate_invoice: true
              type: task
              is_template: true
              in_progress_status_log: 1
              template_id: 1
              hazardco_swms_id: 1
              maintenance_agreement_id: 1
              maintenance_occurrence_id: 1
              recurring_parent_id: 1
              task_category_id: 1
              customer_contact_id: 1
              assignments:
                - team_id: 1
                  assigned_members:
                    - 1
              customfields:
                - id: 1
                  field_instance_id: 1
                  value: some string
                - id: 1
                  field_instance_id: 1
                  value: some string
              visits:
                - status: 1
                  title: some string
                  subtitle: some string
                  is_visible: true
                  start_time: 1234567890
                  end_time: 1234567890
              tags:
                - 1
              customer_arrival_window_start_time: 1234567890
              customer_arrival_window_end_time: 1234567890
              asset_ids:
                - 1
              qb_time_class_id: 1
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: false when the request succeeds.
                    example: false
                  response:
                    type: object
                    description: The created record.
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                error: true
                errors:
                  - error message
                  - error message
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                message: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              example:
                message: Request URL not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                message: Internal Server Error
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

## Related topics

- [How to Create a Job](/jobs/jobs-tasks/creating-a-job.md)
- [How to Create a Maintenance Agreement](/jobs/assets/maintenance-agreements.md)
- [How to Create Recurring Jobs](/jobs/jobs-tasks/recurring-jobs.md)
- [How to Create Job Reports](/reporting/raw-data/job-reports.md)
- [How to Create Dynamic Job Reports](/jobs/jobs-tasks/dynamic-job-reports.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.