Skip to main content
wesley_harding_conveyor
Conversationalist
May 8, 2025
Solved

How to get API inbox ID from URL Inbox ID

  • May 8, 2025
  • 3 replies
  • 467 views

We’re building an integration that makes use of Application Webhooks and would like to configure some logic based on the originating inbox. We’re running into a challenge getting inbox IDs. Notably, the UI and API use different, incompatible IDs.
 

  • UI ID: 30231326
  • API ID: inb_123

In particular, we’d like to be able to use the UI ids to configure these filters since it’s what our customers are familiar with (or they can simply drop a link that we pull the ID out of). Problem is we can’t figure out a way to match up a UI ID with the API ID.

Alternative, we considered building some sort of “Inbox Picker” in our app, but want to avoid this for several reasons:
 

  • Two Inbox can have the same name, so we need a means of disambiguating inboxes. 
    • Further, the API response is pretty limited so we’re not sure how we’d even help users understand the difference.
  • Building a UI “Picker” component is a lot more work. 
  • In our other integrations (non-Front integrations), it’s not uncommon for customers to send us IDs or links when debugging (we can infer ID from links). We can’t figure out a way that’d we’d be able to correlate what our customer sees with records that hit our backend.
    Best answer by Andy

    Hi there! The API ID for a resource is created by converting the numeric (base-10) URL ID into a base-36 string. Then, a resource identifier is added as a prefix to indicate the type of object.

    For example, if the URL ID of your inbox is 30231326, converting it to base-36 gives hzyn2. Adding the inbox prefix inb_ gives the final API ID: inb_hzyn2.

    This holds true for all of our resources. I’ve also included the more common resource prefixes just in case your team needs to do this for our other resource types (conversations, tags, etc.):

    cnv_ → Conversations
    tag_ → Tags
    msg_ →  Messages
    tea → Teammates

    rul_ → Rules

     

    3 replies

    wesley_harding_conveyor
    Conversationalist
    May 8, 2025

    For what it’s worth, we’ve decided to work around this for now by using custom fields on Inboxes. We can largely avoid the ID issue this way.

    That being said, it would be nice to have a solution for this going forward.

    Andy
    AndyAnswer
    Fronteer
    May 8, 2025

    Hi there! The API ID for a resource is created by converting the numeric (base-10) URL ID into a base-36 string. Then, a resource identifier is added as a prefix to indicate the type of object.

    For example, if the URL ID of your inbox is 30231326, converting it to base-36 gives hzyn2. Adding the inbox prefix inb_ gives the final API ID: inb_hzyn2.

    This holds true for all of our resources. I’ve also included the more common resource prefixes just in case your team needs to do this for our other resource types (conversations, tags, etc.):

    cnv_ → Conversations
    tag_ → Tags
    msg_ →  Messages
    tea → Teammates

    rul_ → Rules

     

    wesley_harding_conveyor
    Conversationalist
    May 9, 2025

    AMAZING!

    Thank you so much!