Skip to content
Linq Copy agent prompt

Stop location sharing

chats.location.stop(strchat_id, LocationStopParams**kwargs) -> StopChatLocationSharingResponse
DELETE/v3/chats/{chatId}/location

End the location share a contact started with you, as though they had stopped it themselves. Their device stops listing you as someone they share with, so they can start a fresh share cleanly.

Use this to recover when a share has gone stale — coordinates that stop advancing, or a share you believe has ended but is still reported as active. Without it the only remedy is asking the contact to stop and re-share, which is confusing for them because their phone still shows everything as working.

This is not reversible from the API. Sharing can only resume when the contact starts a new share, so prompt them to re-share afterwards. Request a new one with POST /v3/chats/{chatId}/location/request.

Apple keeps one location-sharing relationship per person rather than per chat, so this ends that contact’s share everywhere, not only in this chat.

handle names whose share to end, and is always required — a group chat can have several people sharing, and this is not an operation to infer a target for.

This returns 202, not 200. The removal happens on the device that holds the sharing relationship, so a success here means the request was accepted, not that sharing has ended. Wait for the location.sharing.stopped webhook to confirm it — that webhook is what tells you the contact’s device has actually let go.

Returns 404 if the contact is not currently sharing.

ParametersExpand Collapse
chat_id: str
formatuuid
handle: str

Phone number (E.164 format) or email address of the contact whose share to end

ReturnsExpand Collapse
class StopChatLocationSharingResponse:
message: str
success: bool

Stop location sharing

import os
from linq import LinqAPIV3

client = LinqAPIV3(
    api_key=os.environ.get("LINQ_API_V3_API_KEY"),  # This is the default and can be omitted
)
stop_chat_location_sharing_response = client.chats.location.stop(
    chat_id="975d0776-bd17-4273-8337-f346b4c661b0",
    handle="+15551234567",
)
print(stop_chat_location_sharing_response.message)
{
  "success": true,
  "message": "Location sharing stop requested"
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/1xxx/1002/"
  },
  "success": false
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2004/"
  },
  "success": false
}
{
  "error": {
    "status": 403,
    "code": 2005,
    "message": "Access denied - insufficient permissions for this resource",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2005/"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2001/"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/3xxx/3006/"
  },
  "success": false
}
Returns Examples
{
  "success": true,
  "message": "Location sharing stop requested"
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/1xxx/1002/"
  },
  "success": false
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2004/"
  },
  "success": false
}
{
  "error": {
    "status": 403,
    "code": 2005,
    "message": "Access denied - insufficient permissions for this resource",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2005/"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2001/"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error",
    "doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/3xxx/3006/"
  },
  "success": false
}