---
title: "Update a location"
method: PATCH
path: "/locations/{locationId}"
tags: ["locations"]
---

# Update a location

`PATCH /locations/{locationId}`

## Path parameters

- `locationId` string, required

## Request body

- Location
  - `id` string
  - `name` string
  - `type` integer
  - `configuration` Configuration
    - `theme` 'standard' | 'crosby' | 'vibrant' | 'beachcomber' | 'grunge'
    - `background_color` string
    - `foreground_color` string
    - `text_color` string
    - `accent_color` string
    - `background_image_url` string
    - `splash_type` 'none' | 'bubbles'
    - `splash_title` string
    - `splash_subtitle` string
    - `elevation` number
    - `qr_theme` string
    - `qr_title` string
    - `qr_subtitle` string
    - `qr_message` string
    - `help_string` string
    - `qr_show_link` boolean
    - `header` Header
      - `title` string
      - `subtitle` string
      - `image` object
        - `url` string
        - `mime_type` string
    - `wifi` Wifi
      - `credential` string
      - `fragment` string
      - `password_visible` boolean
      - `authorization` object
        - `authentication` object
          - `providers` string[]
          - `title` string
          - `subtitle` string
          - `show_privacy_policy` boolean
        - `age_policy` object
          - `enabled` boolean
          - `minimum_age` integer
          - `default_checked` boolean
          - `under_minimum_age_action` 'allow_without_collection' | 'deny_access'
          - `label` string
          - `description` string
        - `share` object
          - `providers` string[]
          - `title` string
          - `subtitle` string
          - `content_url` string
          - `content_text` string
          - `content_hashtag` string
        - `terms` object
          - `show_terms` boolean
          - `require_terms` boolean
          - `terms` string
      - `display_duration` number
      - `use_oob_keys` boolean
      - `key_derivation_info` string
  - `display_duration` integer
  - `plaintext_credential` Credential — Send only when encryption of credential is not possible on the client side. If a new credential is the only change to a location, the only other required property is account_password.
    - `ssid` string
    - `key` string
    - `hidden` boolean
    - `security` 'wpa2' | 'wep' | 'none'
    - `captive_portal_username` string
    - `captive_portal_password` string
  - `account_password` string — The account_password enables our server to encrypt and store a plaintext_credential on your behalf. It is offered as a convenience when encryption is not possible on the client side.
  - `porters` Porter[]
    - `id` string
    - `short_id` string
    - `name` string
    - `location` string
    - `phv` integer
    - `pmi` integer
    - `interaction_count` integer
    - `interacted_at` integer
    - `created_at` integer
    - `updated_at` integer
  - `collected_data` object
    - `emails` Email[]
      - `email` string
      - `porter` string
      - `porter_name` string
      - `created_at` integer
  - `created_at` integer
  - `updated_at` integer

## Response `200`

Success

- Location
  - `id` string
  - `name` string
  - `type` integer
  - `configuration` Configuration
    - `theme` 'standard' | 'crosby' | 'vibrant' | 'beachcomber' | 'grunge'
    - `background_color` string
    - `foreground_color` string
    - `text_color` string
    - `accent_color` string
    - `background_image_url` string
    - `splash_type` 'none' | 'bubbles'
    - `splash_title` string
    - `splash_subtitle` string
    - `elevation` number
    - `qr_theme` string
    - `qr_title` string
    - `qr_subtitle` string
    - `qr_message` string
    - `help_string` string
    - `qr_show_link` boolean
    - `header` Header
      - `title` string
      - `subtitle` string
      - `image` object
        - `url` string
        - `mime_type` string
    - `wifi` Wifi
      - `credential` string
      - `fragment` string
      - `password_visible` boolean
      - `authorization` object
        - `authentication` object
          - `providers` string[]
          - `title` string
          - `subtitle` string
          - `show_privacy_policy` boolean
        - `age_policy` object
          - `enabled` boolean
          - `minimum_age` integer
          - `default_checked` boolean
          - `under_minimum_age_action` 'allow_without_collection' | 'deny_access'
          - `label` string
          - `description` string
        - `share` object
          - `providers` string[]
          - `title` string
          - `subtitle` string
          - `content_url` string
          - `content_text` string
          - `content_hashtag` string
        - `terms` object
          - `show_terms` boolean
          - `require_terms` boolean
          - `terms` string
      - `display_duration` number
      - `use_oob_keys` boolean
      - `key_derivation_info` string
  - `display_duration` integer
  - `plaintext_credential` Credential — Send only when encryption of credential is not possible on the client side. If a new credential is the only change to a location, the only other required property is account_password.
    - `ssid` string
    - `key` string
    - `hidden` boolean
    - `security` 'wpa2' | 'wep' | 'none'
    - `captive_portal_username` string
    - `captive_portal_password` string
  - `account_password` string — The account_password enables our server to encrypt and store a plaintext_credential on your behalf. It is offered as a convenience when encryption is not possible on the client side.
  - `porters` Porter[]
    - `id` string
    - `short_id` string
    - `name` string
    - `location` string
    - `phv` integer
    - `pmi` integer
    - `interaction_count` integer
    - `interacted_at` integer
    - `created_at` integer
    - `updated_at` integer
  - `collected_data` object
    - `emails` Email[]
      - `email` string
      - `porter` string
      - `porter_name` string
      - `created_at` integer
  - `created_at` integer
  - `updated_at` integer

## Other responses

- `401` — Authentication Error
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/portersetup/apis/porter-api.md) · [All operations](https://skmtc.net/portersetup/apis/porter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portersetup/porter-api/versions/b765ef01c634/schema)
