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

# Update Location

> Update location details



## OpenAPI

````yaml /openapi.yaml patch /locations/{location_id}
openapi: 3.0.0
info:
  title: Answering Agent API
  description: API for Answering Agent platform
  version: 1.0.0
servers:
  - url: https://answeringagent.com/api/v1
    description: Production API
  - url: https://playground.answeringagent.com/api/v1
    description: Playground API
security: []
paths:
  /locations/{location_id}:
    patch:
      tags:
        - Locations
      summary: Update Location
      description: Update location details
      operationId: updateLocation
      parameters:
        - in: path
          name: location_id
          required: true
          schema:
            type: integer
          description: The ID of the location
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the location
                address:
                  type: string
                  nullable: true
                  description: Physical address of the location
                google_place_id:
                  type: string
                  nullable: true
                  description: Google Places ID for the location
      responses:
        '200':
          description: Location updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Location not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Location not found
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Location:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        phone_number:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - pending
            - active
        address:
          type: string
          nullable: true
        google_place_id:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: API key is required
                enum:
                  - API key is required
                  - Invalid credentials
    ValidationError:
      description: Validation failed.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              errors:
                type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````