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

# Update a subscriber's pinned location

> Updates a subscriber's pinned location. This is a full replacement, not a partial update: `city`, `state_province`, `country_code` (ISO 3166-1 alpha-2), `latitude`, `longitude`, and `timezone` (IANA timezone name, e.g. `America/Denver`) are all required, so resend the current value for any field you are not changing. Omitting one returns `422`. Returns the subscriber's `id` and the updated `location` on success.

To create a pin from scratch, use [Pin a subscriber's location](/api-reference/subscribers/pin-a-subscribers-location) (POST); to remove the pin entirely, use [Delete a subscriber's location](/api-reference/subscribers/delete-a-subscribers-location). Returns `404` when the subscriber is not found, `422` when a required field is missing or invalid.



## OpenAPI

````yaml /api-reference/v4.json patch /v4/subscribers/{subscriber_id}/location
openapi: 3.0.3
info:
  title: Kit API
  version: '4.0'
servers:
  - url: https://api.kit.com
security: []
paths:
  /v4/subscribers/{subscriber_id}/location:
    patch:
      tags:
        - Subscribers
      summary: Update a subscriber's pinned location
      description: >-
        Updates a subscriber's pinned location. This is a full replacement, not
        a partial update: `city`, `state_province`, `country_code` (ISO 3166-1
        alpha-2), `latitude`, `longitude`, and `timezone` (IANA timezone name,
        e.g. `America/Denver`) are all required, so resend the current value for
        any field you are not changing. Omitting one returns `422`. Returns the
        subscriber's `id` and the updated `location` on success.


        To create a pin from scratch, use [Pin a subscriber's
        location](/api-reference/subscribers/pin-a-subscribers-location) (POST);
        to remove the pin entirely, use [Delete a subscriber's
        location](/api-reference/subscribers/delete-a-subscribers-location).
        Returns `404` when the subscriber is not found, `422` when a required
        field is missing or invalid.
      parameters:
        - name: subscriber_id
          in: path
          required: true
          schema:
            type: integer
          example: 1133
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                location:
                  type: object
                  properties:
                    city:
                      type: string
                    state_province:
                      type: string
                    country_code:
                      type: string
                    latitude:
                      type: number
                      format: float
                    longitude:
                      type: number
                      format: float
                    timezone:
                      type: string
                  required:
                    - city
                    - state_province
                    - country_code
                    - latitude
                    - longitude
                    - timezone
              required:
                - location
            example:
              location:
                city: Boise
                state_province: Idaho
                country_code: US
                latitude: 43.62
                longitude: -116.2
                timezone: America/Denver
      responses:
        '200':
          description: Pins the location and returns it
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscriber:
                    type: object
                    properties:
                      id:
                        type: integer
                      location:
                        type: object
                        properties:
                          city:
                            type: string
                          state_province:
                            type: string
                          country_code:
                            type: string
                          latitude:
                            type: number
                            format: float
                          longitude:
                            type: number
                            format: float
                          timezone:
                            type: string
                        required:
                          - city
                          - state_province
                          - country_code
                          - latitude
                          - longitude
                          - timezone
                    required:
                      - id
                      - location
                required:
                  - subscriber
              example:
                subscriber:
                  id: 1128
                  location:
                    city: Boise
                    state_province: Idaho
                    country_code: US
                    latitude: 43.62
                    longitude: -116.2
                    timezone: America/Denver
        '401':
          description: Returns a 401 if the token and/or account cannot be authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                required:
                  - errors
              example:
                errors:
                  - The access token is invalid
        '404':
          description: Returns 404 for an unknown subscriber
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                required:
                  - errors
              example:
                errors:
                  - Not Found
        '422':
          description: Returns 422 and does not persist when country_code is missing
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                required:
                  - errors
              example:
                errors:
                  - Country code can't be blank
      security:
        - API Key: []
        - OAuth2: []
components:
  securitySchemes:
    API Key:
      description: Authenticate API requests via an API Key
      type: apiKey
      in: header
      name: X-Kit-Api-Key
    OAuth2:
      description: Authenticate API requests via an OAuth token
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.kit.com/v4/oauth/authorize
          tokenUrl: https://api.kit.com/v4/oauth/token
          refreshUrl: https://api.kit.com/v4/oauth/token
          scopes:
            read: Read access to Kit API v4
            write: Write access to Kit API v4

````