Skip to content
Linq

Get the authenticated brand

GET/v1/me

Retrieves the brand this API key is scoped to.

Behavior

  • Check it at boot: every other endpoint scopes itself to your brand implicitly, and a key pointed at the wrong brand is invisible until it returns someone else’s chats.
  • Returns the key’s id, never the key. Cheap and safe to call on startup.
  • Carries webhook_delivery, so polling it at a human interval tells you whether webhook delivery to any of your endpoints is paused.
ReturnsExpand Collapse
IdentityResponse object { brand_id, key_id, webhook_delivery }

Who this API key is.

brand_id: string

The brand every request on this key is scoped to.

key_id: string

The key’s own id: the key_id that appears in support chats and logs, never the secret.

webhook_delivery: optional object { parked_feeds, next_recovery_attempt_at, oldest_parked_at }

Your webhook delivery health. Present whenever it could be computed, which is every ordinary request; ABSENT means we could not read it, and never that you are healthy.

parked_feeds: number

How many of your (endpoint, chat) feeds are parked. Always present; 0 is a measurement.

formatint32
next_recovery_attempt_at: optional string

At or after this instant, the next recovery attempt is made for one of the endpoints holding your parked feeds. It may be in the past: a due endpoint is probed on the next sweep tick. Absent when nothing is parked.

formatdate-time
oldest_parked_at: optional string

The event time of the oldest event now stuck, which is EARLIER than the moment the feed parked: a feed parks after ten attempts, roughly seventeen minutes after the first. Absent when nothing is parked.

formatdate-time

Get the authenticated brand

curl https://messages.api.linqapp.com/v1/me \
    -H "Authorization: Bearer $LINQ_AMB_API_KEY"
{
  "brand_id": "biz_9f2c1a",
  "key_id": "key_7bd41e",
  "webhook_delivery": {
    "parked_feeds": 0
  }
}
Returns Examples
{
  "brand_id": "biz_9f2c1a",
  "key_id": "key_7bd41e",
  "webhook_delivery": {
    "parked_feeds": 0
  }
}