> ## 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 location

> Create a location

```jsonc Body raw (json) wrap expandable theme={null}
{
  "object_type": "customer",// required | string | description: object type which location is
  "object_id": 1,// required | integer | existing object id
  "title": "some string",// required | string | max:255
  "address_1": "some string",// string | nullable | max:255
  "address_2": "some string",// string | nullable | max:255
  "city": "some string",// string | nullable | max:255
  "state": "some string",// string | nullable | max:255
  "zip_code": "some string",// string | nullable | max:255
  "notes": "some string",// string | nullable | max:5000
  "is_main_location": true,// optional | boolean
  "is_primary_location": true,// optional | boolean
  "primary_customer_contact_id": null // optional | integer | existing customer contact id
}
```


## OpenAPI

````yaml post /locations
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:
  /locations:
    post:
      tags:
        - Locations
      summary: Create a location
      description: Create a location
      operationId: postLocations
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                object_type:
                  type: string
                  description: Object type which location is.
                object_id:
                  type: integer
                  description: Existing object id.
                title:
                  type: string
                  maxLength: 255
                address_1:
                  type: string
                  nullable: true
                  maxLength: 255
                address_2:
                  type: string
                  nullable: true
                  maxLength: 255
                city:
                  type: string
                  nullable: true
                  maxLength: 255
                state:
                  type: string
                  nullable: true
                  maxLength: 255
                zip_code:
                  type: string
                  nullable: true
                  maxLength: 255
                notes:
                  type: string
                  nullable: true
                  maxLength: 5000
                is_main_location:
                  type: boolean
                is_primary_location:
                  type: boolean
                primary_customer_contact_id:
                  type: integer
                  description: Existing customer contact id.
              required:
                - object_type
                - object_id
                - title
            example:
              object_type: customer
              object_id: 1
              title: some string
              address_1: some string
              address_2: some string
              city: some string
              state: some string
              zip_code: some string
              notes: some string
              is_main_location: true
              is_primary_location: true
              primary_customer_contact_id: null
      responses:
        '200':
          description: Successful response
          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)
- [User Roles and Permissions Details](/settings/users-teams/user-roles.md)
- [How to Create Related Customers](/customers/managing-customers/creating-related-customers.md)
- [How to Create Estimate Reports](/reporting/raw-data/estimate-reports.md)


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