chatId is the destination identifier used by Hypersender WhatsApp endpoints. The two formats you will work with most often are @c.us and @lid.
@c.us
- Format:
[phoneNumber]@c.us - Use this when you know the contact’s phone number.
- This is the standard phone-number-based identifier for direct messaging.
- Do not include
+, spaces, or punctuation in the numeric part. - Example:
[email protected]
@lid
- Format:
[numericIdentifier]@lid - Use this when the contact is represented by a linked identifier instead of a visible phone number.
- This is a privacy-preserving identifier. The same person can have both an
@lidvalue and an@c.usvalue. - Example:
1111111@lid
Difference Between @c.us And @lid
@c.usis based on the phone number.@lidis based on a linked identifier.- Both can refer to the same contact.
- The contact conversion endpoints let you map one format to the other when the mapping is already known by your instance.
Formatting Rules
- Keep the numeric part clean. Do not send
+, spaces, or punctuation in phone-number-based values. - When an endpoint accepts the identifier inside the URL path, encode
@as%40. - For example, use
1111111%40lidor201553730661%40c.usin path-based endpoints. - Some conversion endpoints also accept only the numeric part, such as
1111111or201553730661.
When To Convert
Use the contact conversion endpoints when you need to:- Resolve a linked identifier to a phone-number chat ID.
- Resolve a phone-number chat ID to a linked identifier.
- List or count the mappings your instance already knows.