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

# Create Location



## OpenAPI

````yaml /openapi/public.openapi.json post /v1/locations
openapi: 3.1.0
info:
  title: CurbWaste Public API
  version: 1.0.0
  description: >-
    Partner-facing public API under /v1. Authenticate with a company API key
    (Authorization: Bearer cw_live_…). Outbound webhooks (customer.created /
    customer.updated / location.created / location.updated / pricelist.created)
    use HMAC and are documented separately.
  contact:
    name: CurbWaste
  license:
    name: UNLICENSED 1
servers:
  - url: https://api.curbwaste.com
    description: Production public API
security:
  - ApiKeyBearer: []
tags:
  - name: Customers
    description: >-
      Company CRM customers under /v1/customers. Requires customers:read or
      customers:write.
  - name: Catalog
  - name: Locations
  - name: Zones
paths:
  /v1/locations:
    post:
      tags:
        - Locations
      summary: Create Location
      operationId: createLocation
      parameters:
        - name: expand
          in: query
          schema:
            type: string
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePublicLocationDto'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicLocationResponse'
components:
  schemas:
    CreatePublicLocationDto:
      type: object
      properties:
        customerId:
          type: string
          format: uuid
        address:
          type: string
          minLength: 1
          maxLength: 500
          description: >-
            Street address to geocode. Coordinates must not be supplied by the
            client —

            the public API geocodes this string server-side.
        name:
          type: string
          minLength: 1
          maxLength: 255
        locationNote:
          type: string
          maxLength: 2000
        purchaseOrderNumber:
          type: string
          maxLength: 255
        reactivateIfInactive:
          type: boolean
          title: >-
            When true, reactivate an inactive match at this address+name instead
            of failing
          description: >-
            When true, reactivate an inactive match at this address+name instead
            of failing.
      required:
        - customerId
        - address
    PublicLocationResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PublicLocation'
      required:
        - data
    PublicLocation:
      type: object
      properties:
        id:
          type: string
        customerId:
          type: string
        name:
          oneOf:
            - type: 'null'
            - type: string
        status:
          type: string
        locationNote:
          oneOf:
            - type: 'null'
            - type: string
        purchaseOrderNumber:
          oneOf:
            - type: 'null'
            - type: string
        address:
          $ref: '#/components/schemas/PublicLocationAddress'
        createdAt:
          oneOf:
            - type: 'null'
            - type: string
        updatedAt:
          oneOf:
            - type: 'null'
            - type: string
        reused:
          type: boolean
        reactivated:
          type: boolean
      required:
        - id
        - customerId
        - name
        - status
        - locationNote
        - purchaseOrderNumber
        - address
        - createdAt
        - updatedAt
    PublicLocationAddress:
      type: object
      properties:
        address:
          oneOf:
            - type: 'null'
            - type: string
        city:
          oneOf:
            - type: 'null'
            - type: string
        state:
          oneOf:
            - type: 'null'
            - type: string
        zipcode:
          oneOf:
            - type: 'null'
            - type: string
        streetNo:
          oneOf:
            - type: 'null'
            - type: string
        county:
          oneOf:
            - type: 'null'
            - type: string
        borough:
          oneOf:
            - type: 'null'
            - type: string
        geoPlaceId:
          oneOf:
            - type: 'null'
            - type: string
        location:
          oneOf:
            - type: 'null'
            - type: object
              properties:
                lat:
                  type: number
                lng:
                  type: number
              required:
                - lat
                - lng
      required:
        - address
        - city
        - state
        - zipcode
        - streetNo
        - county
        - borough
        - geoPlaceId
        - location
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Company API key from the developer platform. Header: Authorization:
        Bearer cw_live_…. Key must include customers:read and/or
        customers:write.

````

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