Get a contact
GET
/contact/{identifier}
const url = 'https://api.aelyst.ai/v1/contact/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.aelyst.ai/v1/contact/example \ --header 'Authorization: Bearer <token>'Retrieves the information of an existing contact.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”identifier
required
string
Identifier of the contact that can either be a phone number, email or contact ID. Examples: id:123 , email:abdc@gmail.com , phone:+60121233112
Responses
Section titled “Responses”Media typeapplication/json
object
id
Contact ID
integer
Any of:
object
firstName
required
string
lastName
string
phone
string
email
string
language
Following the ISO 639-1 standard.
string
profilePic
string
countryCode
Following the ISO 3166-1 alpha-2 standard.
string
custom_fields
Array<object>
object
name
required
string
value
Formatting rules
- Text: “string” (use quotation marks for the string value)
- Number: Number (without any quotation marks)
- Email: “email” (format: user@domain.com)
- URL: “url” (format: www.website.com, https://www.website.com, website.com, http://website.com)
- List: “string” (the string value must match one of the list options)
- Date: “yyyy-mm-dd” (must follow this format)
- Time: “HH:MM” (must follow 24H format, 1PM => 13:00)
- Checkbox: “true/false” (must be true for checked, false for unchecked)
string
status
Conversation status of the contact
string
tags
Array<string>
assignee
User
User to whom the contact is assigned
object
id
required
User ID
integer
firstName
required
string
lastName
required
string
email
required
string format: email
lifecycle
string
created_at
Unix timestamp in seconds representing when the contact was created.
integer
isBlocked
boolean
Example
{ "id": 12345, "firstName": "Muhammad ", "lastName": "Mahin", "phone": "+60123456789", "email": "test@example.com", "language": "ms", "profilePic": "https://cdn.aelyst.ai/profile_avatar.png", "countryCode": "MY", "custom_fields": [ { "name": "Company Website", "value": "https://example.com" } ], "status": "open", "tags": [ "new_customer, sales" ], "assignee": { "id": 12345, "firstName": "Muhammad Mahin", "lastName": "Dar", "email": "test@example.com" }, "lifecycle": "Hot Lead", "created_at": 1663274081}Media typeapplication/json
object
code
integer
message
string
Example
{ "code": 400, "message": "Validation error."}Media typeapplication/json
object
code
integer
message
string
Example
{ "code": 401, "message": "UN_AUTHORIZED"}Media typeapplication/json
object
code
integer
message
string
Example
{ "code": 404, "message": "Contact not found"}Media typeapplication/json
object
code
integer
message
string
Example
{ "code": 429, "message": "Too Many Requests"}Headers
Section titled “Headers”Retry-After
number
Example
1Number of seconds until you can retry the request
X-RateLimit-Limit
number
Example
10Number of request allowed for this end point
X-RateLimit-Remaining
number
Example
5Number of request remaining for this end point
Media typeapplication/json
object
code
integer
message
string
Example
{ "code": 500, "message": "Unexpected error occurred"}