Verify whether an agent has already been linked to a Boost account using GraphQL queries. This endpoint is part of Boost Integration V2 and uses a separate GraphQL API secret token (not the same as the JWT token used for other V2 endpoints). Use this to determine if an agent needs to be created or if they have an existing account.
POST
/graphql
curl \
--request POST 'https://api.homespotter.com/graphql' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '"{\n \"query\": \"query Agents($partnerShortCode: String, $partnerAgentId: ID!) {\\n agents(partnerShortCode: $partnerShortCode, partnerAgentId: $partnerAgentId, pagination: {first: 1}) {\\n totalCount\\n list {\\n firstName\\n lastName\\n emailAddress\\n }\\n }\\n}\\n\",\n \"variables\": {\n \"partnerShortCode\": \"YOUR_PARTNER_CODE\",\n \"partnerAgentId\": \"agent_12345\"\n }\n}"'
Request example
{
"query": "query Agents($partnerShortCode: String, $partnerAgentId: ID!) {\n agents(partnerShortCode: $partnerShortCode, partnerAgentId: $partnerAgentId, pagination: {first: 1}) {\n totalCount\n list {\n firstName\n lastName\n emailAddress\n }\n }\n}\n",
"variables": {
"partnerShortCode": "YOUR_PARTNER_CODE",
"partnerAgentId": "agent_12345"
}
}
Response examples (200)
{
"data": {
"agents": {
"totalCount": 42,
"list": [
{
"firstName": "string",
"lastName": "string",
"emailAddress": "hello@example.com"
}
]
}
}
}