How to resolve author of type `bot`?


When I fetch an Intercom conversation via REST API /conversations/{id} it returns an author of type bot for conversation parts posted by bots:

                "type": "conversation_part",
                "id": "1676332104",
                "part_type": "comment",
                "body": "<p>Give them a way to reach you:</p>",
                "created_at": 1533900881,
                "updated_at": 1533900881,
                "notified_at": 1533900881,
                "assigned_to": null,
                "author": {
                    "type": "bot",
                    "id": "2298638"
                "attachments": [],
                "external_id": null

The bot has an id so that’s good, but how can I resolve it to something useful? Is there an API resource for this?

I tried no fetch the id via /users/{id} but that does not work.



Ok, so just found out that you can call /admins/{id} resource with the bot id and it will return an admin-like value. Interestingly though, the REST API returns an object of type admin when the conversation endpoint has type bot.

    "type": "admin",
    "id": "2298638",
    "name": "Operator",
    "email": "",
    "away_mode_enabled": false,
    "away_mode_reassign": false,
    "avatar": {
        "image_url": ""
    "team_ids": [

Would be good if the documentation could be updated with some details on this.



Hey @tobi - indeed, it’s because you’ve hit the admins endpoint that the type shows as admin on the latter, but Operator is well and truly a bot. I’ll add a small callout to the documentation to flag that this is the case - nice digging yourself :+1:

1 Like