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

# Create a location

> Create a new location for the given project.



## OpenAPI

````yaml POST /projects/{project_id}/locations
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /projects/{project_id}/locations:
    post:
      summary: Create a location
      description: Create a new location for the given project.
      operationId: create-a-location
      parameters:
        - name: project_id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                location:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Name of the location
                    lat:
                      type: string
                      description: Latitude of the location
                    long:
                      type: string
                      description: Longitude of the location
            examples:
              Request Example:
                value:
                  location:
                    name: New Location
                    lat: '49.25265'
                    long: '-123.23356'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: loc_4EASWoe5STyK7oWQ
                    lat: '49.25265'
                    long: '-123.23356'
                    name: New Location
                    created_at: '2024-12-20T02:49:37.569Z'
                    updated_at: '2024-12-20T02:49:37.569Z'
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: loc_4EASWoe5STyK7oWQ
                  lat:
                    type: string
                    example: '49.25265'
                  long:
                    type: string
                    example: '-123.23356'
                  name:
                    type: string
                    example: New Location
                  created_at:
                    type: string
                    example: '2024-12-20T02:49:37.569Z'
                  updated_at:
                    type: string
                    example: '2024-12-20T02:49:37.569Z'
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````