Developer Guide

Slack Permalink Timestamp Format Explained

Copy a link to any Slack message and you'll get a URL ending in something like p1234567890123456. It looks arbitrary. It isn't — here's exactly what those digits are and how to work with them.

Updated July 2026

If you've ever grabbed a "Copy link" URL from Slack, or called chat.getPermalink from the API, you've seen a URL shaped like this:

https://yourteam.slack.com/archives/C0123ABC/p1234567890123456

That trailing p1234567890123456 isn't a random ID — it's the message's timestamp, encoded in a way that trips people up because it doesn't look like a timestamp at first glance. This guide covers exactly what it is, how it maps to the ts field Slack's API uses everywhere else, and how to convert between the two forms yourself, whether you'd rather do it by hand, in code, or with a tool.

The short answer

Take the digits after the p. Insert a decimal point after the first 10 of them. That's it — you now have Slack's standard ts value:

p12345678901234561234567890.123456

The first 10 digits are a normal Unix timestamp, in seconds. The last 6 digits are microseconds, tacked on so that two messages posted in the same second still get distinct, sortable IDs. Convert 1234567890 as a regular Unix timestamp and you get the message's date and time — 1234567890 happens to be February 13, 2009.

Why Slack does it this way

Every message in Slack is identified internally by its ts, which doubles as both "when was this sent" and "what is this message's unique ID within the channel." Reusing the timestamp as an ID is efficient — it's already unique per channel, already sortable, and Slack doesn't need to generate or store a separate ID field. When Slack builds a permalink, it needs that same identifier inside a URL, and URLs don't love decimal points sitting in a path segment next to other numbers, so the dot gets stripped and a p is prepended to mark the whole thing as a timestamp-shaped ID rather than, say, a channel or team ID. Nothing about the underlying value changes — it's a formatting choice for the URL, not a different timestamp.

Working with it in the API: chat.getPermalink

If you're building the permalink programmatically rather than clicking "Copy link" in the client, Slack's chat.getPermalink method is the documented way to do it. You call it with a channel ID and a message_ts parameter — the same 1234567890.123456-style value you'd get back from conversations.history or a message event payload — and Slack's API hands you back the fully-formed permalink URL, p-string included. You never have to build the p-string yourself when going in this direction; the API does the encoding. The reverse direction — pulling a ts back out of a permalink someone pasted into a support ticket, a spreadsheet, or a bug report — is the part that has no built-in API call, since there's rarely a reason for Slack to offer one. That's the direction this page (and the decoder linked below) is for.

Converting it yourself, in code

The parsing logic is the same idea in every language: pull the digit run out of the string, split it after position 10, and rejoin with a decimal point.

JavaScript

JavaScript
function slackPermalinkToTs(permalink) {
  const match = permalink.match(/p(\d{16})/);
  if (!match) return null;
  const digits = match[1];
  return `${digits.slice(0, 10)}.${digits.slice(10)}`;
}

slackPermalinkToTs('https://team.slack.com/archives/C1/p1234567890123456');
// -> "1234567890.123456"

Python

Python
import re

def slack_permalink_to_ts(permalink: str) -> str | None:
    match = re.search(r"p(\d{16})", permalink)
    if not match:
        return None
    digits = match.group(1)
    return f"{digits[:10]}.{digits[10:]}"

slack_permalink_to_ts("https://team.slack.com/archives/C1/p1234567890123456")
# -> "1234567890.123456"

Going the other way: ts to permalink

If you already have a ts value and just need to reconstruct what the permalink's p-string would look like (say, for building a link yourself without an API call, or matching against permalinks in stored data), strip the decimal point and prepend p:

JavaScript
function tsToPermalinkFragment(ts) {
  return 'p' + ts.replace('.', '');
}
tsToPermalinkFragment('1234567890.123456'); // -> "p1234567890123456"

Note this only reconstructs the timestamp fragment, not a working URL — a real permalink also needs the correct team domain, channel ID, and (for threaded replies) a thread_ts query parameter, none of which you can derive from the timestamp alone.

A couple of edge cases worth knowing

Don't want to run any code for a one-off conversion? Paste the permalink directly into the Slack Permalink Timestamp Decoder and it'll show you the date, the UTC time, and the ts value instantly.

Related

Related tools & reading