Resource Aliases
You can refer to all the resources with their system-generated IDs. In some cases, however, it may be easier to identify resources via more readily available aliases such as email addresses or via identifiers present in the UI. The Core API provides the following methods to make identifying resources simpler for you:
- Resource aliases—A subset of resources can be accessed via more human readable aliases, such as an email address or phone number. This means you can make API requests to retrieve or update these resources using identifiers that might be more readily available to you.
- Converting UI identifiers to system-generated identifiers—Refer to this section to learn how to take a UI identifier and convert it to its corresponding system-generated ID.
Resource aliases
Syntax
alt:ALIAS_NAME:ALIAS_VALUE
Example
https://api2.frontapp.com/teammates/alt:email:[email protected]
When you include the resource alias in the API endpoint, you will receive an HTTP 20X Success status if the resource exists with the specified alias. If you receive HTTP 404 Not Found, then the resource does not exist.
Supported API resources
You can use an alias for the following resources:
Resource | Alias | Example |
---|---|---|
|
| |
|
| |
Contacts can be identified with their source and handle. Refer to the list of sources on the Contacts page. You can also identify a contact's source/handles in the |
| |
Messages can be identified with their |
| |
Accounts can be identified with their |
|
Convert UI identifiers to system-generated IDs
This is method is a useful tip, but is not officially supported
Front may opt to change how UI identifiers relate to system-generated identifiers, so do not build any critical logic based on this conversion.
If you have an identifier you have found in the Front UI via the URL, such as an inbox ID, you can convert this to the system-generated ID necessary for API calls using the following method:
- Convert the numeric (base-10) URL ID into a base-36 string.
- Attach the resource prefix to the converted string followed by an underscore
-
The following are the prefixes for commonly used resources, but you can refer to the response examples in the Core API Reference to identify the prefixes for other resources.
cnv_
→ Conversationstag_
→ Tagsmsg_
→ Messagestea_
→ Teammatesrul_
→ Rules
-
<resource prefix>_<base-36 converted string>
Example
- The URL ID of your inbox is
30231326
- Converting it to base-36 gives
hzyn2
- Adding the inbox prefix
inb_
results in the system-generated ID necessary for API calls:inb_hzyn2
Updated 21 days ago