View admin activity logs

Example Request

cURL

curl https://api.intercom.io/admins/activity_logs?created_at_after=489222000&created_at_before=685695600 \\\n-X GET \\\n-H 'Authorization:Bearer <Your access token>' \\\n-H 'Accept: application/json' \\\n-H 'Content-Type: application/json'

Example Response

HTTP/1.1 200 OK
{
	"type": "activity_log.list",
  "pages": {
		"type": "pages",
		"next": nil,
		"page": 1,
		"per_page": 20,
		"total_pages": 1
	},
  "activity_logs": [{
  	"id": "6",
  	"performed_by": {
    	"type": "admin",
    	"id": "123456",
    	"email": "jane.doe@company.com",
    	"ip": "127.0.0.1"
  	},
  	"metadata": {
    	"message"; {
      	"id": 123,
      	"title": "salt&vinegar"
        },
       "before": "before",
       "after": "after"
    	},
  	"created_at": 1547669358,
  	"activity_type": "message_state_change",
  	"activity_description"" "Jane Doe changed your salt&vinegar message from before to after."
  }]
}

Example Errors

HTTP/1.1 404 NOT FOUND\n{\n  \"type\" => \"error.list\",\n  \"request_id\" => nil,\n  \"errors\" => [{\n\t\"code\" => \"parameter_not_found\",\n\t\"message\" => \"Please provide the following parameters: created_at_after\"\n  }]\n}\n
HTTP/1.1 403 RESTRICTED\n{\n  \"type\" => \"error.list\",\n  \"request_id\" => nil,\n  \"errors\" => [{\n\t\"code\" => \"api_plan_restricted\",\n\t\"message\" => \"This feature is not yet available to your app\"\n  }]\n}

You can get a log of activities by all admins in an app by sending a GET request to the URL https://api.intercom.io/admins/activity_logs.

Activity List

AttributeTypeDescription
typestringValue is activity_log.list
activity_logsarrayA list of activity objects
pagesobjectOptional. A pagination object which may be empty, indication no further pages to fetch

Activity Object

AttributeTypeDescription
activity_typestringThe type of activity - see Activity Types & Descriptions below.
activity_descriptionstringA sentence or two describing the activity - see Activity Types & Descriptions below.
metadataobjectAn object containing information on the activity and what it modified
created_attimestampThe time the activity was performed
performed_byobjectAn Admin object of the admin who performed the activity
idstringThe id representing the activity

Activity Types & Descriptions

TypeDescription
admin_deletionAn admin was removed from your app
admin_invite_changeThe permissions for an invited person to be an admin on your app were changed
admin_invite_creationSomeone was invited to be an admin on your app
admin_invite_deletionSomeone is no longer invited to be an admin on your app
admin_login_failureAn admin tried to login with the wrong credentials
admin_login_successAn admin logged in successfully
admin_logoutAn admin logged out
admin_permission_changeThe permissions for an admin were changed
app_name_changeThe name of your app was changed
admin_away_modeAn admin changed their away mode and conversation reassignment settings
app_timezone_changeThe timezone of your app was changed
bulk_exportUser or lead data was exported from your app
message_deletionA message was deleted from your app
message_state_changeA message was changed on your app
campaign_deletionA campaign was deleted from your app

Request Parameters

ParameterRequired?Description
created_at_afterYesThe start date that you request data for. It must be formatted as a UNIX timestamp.
created_at_beforeNoThe end date that you request data for. It must be formatted as a UNIX timestamp.

Returns

This will return an Activity List which will contain an array titled activity_logs, in turn containing multiple Activity Objects.