---
title: "Find a contact's history"
method: GET
path: "/contacts/{id}/history"
tags: ["contacts"]
---

# Find a contact's history

`GET /contacts/{id}/history`

Searches for all texts and calls attributed to a contact. Returns a list of calls and texts a contact has been involved with

## Path parameters

- `id` integer, required

## Query parameters

- `limit` integer
- `offset` integer
- `fields` string

## Response `200`

successful operation

- ContactHistory — Contains history of all calls and texts addressed to a given contact
  - `id` integer — An id of a contact
  - `calls` Call[] — List of Call objects addressed to a given contact
    - `id` integer — An id of an action
    - `fromNumber` string — A sender's phone number in E.164 (11-digit) format
    - `toNumber` string — A recipient's phone number in E.164 (11-digit) format
    - `attributes` object — Map of user-defined string attributes associated with an action
    - `state` 'READY' | 'SELECTED' | 'CALLBACK' | 'FINISHED' | 'DISABLED' | 'SKIPPED' | 'DNC' | 'DUP' | 'INVALID' | 'TIMEOUT' | 'PERIOD_LIMIT' | 'RESTRICTED_NUMBER' — State of an action (READY, SELECTED, CALLBACK, DISABLED, FINISHED, DNC, DUP, INVALID, TIMEOUT, PERIOD_LIMIT). See [call states and results](https://developers.callfire.com/results-responses-errors.html)
    - `campaignId` integer — An id of broadcast associated with an action if call is sent as part of call broadcast
    - `batchId` integer — An id of contact batch associated with an action
    - `contact` Contact — Represents a contact in CallFire platform. Contains info about the people you want to contact. It allows you to store a user-defined properties for each contact
      - `id` integer — An id of a contact
      - `firstName` string — A first name of a contact
      - `lastName` string — A last name of a contact
      - `zipcode` string — A Zip code of a contact
      - `homePhone` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `workPhone` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `mobilePhone` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `extraPhone1` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `extraPhone2` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `extraPhone3` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `externalId` string — An external id of a contact for syncing with external sources
      - `externalSystem` string — External system that external id refers to
      - `properties` object — Map of user-defined string properties for contact
      - `deleted` boolean — A deleted contact, deleted contacts are hidden from search results
    - `inbound` boolean — Is action inbound
    - `created` integer — The time when the given resource was created, formatted in unix time milliseconds (read only). Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT
    - `modified` integer — The time when the given resource was modified, formatted in unix time milliseconds (read only). Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT
    - `labels` string[] — Labels associated with action or broadcast for this action
    - `finalCallResult` 'LA' | 'AM' | 'BUSY' | 'DNC' | 'XFER' | 'NO_ANS' | 'XFER_LEG' | 'INTERNAL_ERROR' | 'CARRIER_ERROR' | 'CARRIER_TEMP_ERROR' | 'UNDIALED' | 'SD' | 'POSTPONED' | 'ABANDONED' | 'SKIPPED' — Result of a call (LA, AM, BUSY, DNC, XFER, NO_ANS, XFER_LEG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED, SD, POSTPONED, ABANDONED, SKIPPED). See [call states and results](https://developers.callfire.com/results-responses-errors.html)
    - `records` CallRecord[] — List of call records, each record contains call details like originate time, duration, cost, notes made by agents. A single contact may have a multiple phone numbers. In this case if given call was sent as a part of broadcast with configured retry logic then each call record will contain details about attempted phone number
      - `id` integer — An id of a call record
      - `toNumber` string — A phone number to which a call was addressed. Phone number in E.164 format (11-digit). Example: 12132000384
      - `billedAmount` number, float — A cost of the call
      - `finishTime` integer — Timestamp when call was finished, formatted in unix time milliseconds (read only). Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT
      - `switchId` string — ~
      - `callerName` string — ~
      - `labels` string[] — Labels associated with a call action
      - `result` 'LA' | 'AM' | 'BUSY' | 'DNC' | 'XFER' | 'NO_ANS' | 'XFER_LEG' | 'INTERNAL_ERROR' | 'CARRIER_ERROR' | 'CARRIER_TEMP_ERROR' | 'UNDIALED' | 'SD' | 'POSTPONED' | 'ABANDONED' | 'SKIPPED' — ~
      - `originateTime` integer — A date and time (timestamp) when call was originated by CallFire platform and went to downstream provider, formatted in unix time milliseconds (read only). Example: 1473781817000
      - `answerTime` integer — Timestamp when call was answered, formatted in unix time milliseconds (read only). Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT
      - `duration` integer — Duration of the call in seconds
      - `notes` Note[] — Notes of call added by agent
        - `text` string — A text of a note
        - `created` integer — The time when the given resource was created, formatted in unix time milliseconds (read only). Example: 1473781817000
      - `recordings` CallRecording[] — A list of voice recordings of the call
        - `id` integer — An id of a call recording
        - `callId` integer — An id of a call action
        - `campaignId` integer — Contains broadcast id if call was sent as a part of voice broadcast
        - `name` string — A name of a recording
        - `created` integer — The time when the given resource was created, formatted in unix time milliseconds (read only). Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT
        - `lengthInBytes` integer — A size of a recording file in bytes
        - `lengthInSeconds` integer — Duration of a recording in seconds
        - `hash` string — A unique string hash identifier of a recording
        - `mp3Url` string — A public URL of a call recording
        - `state` 'RECORDING' | 'READY' | 'ERROR' — Current state of a recording, available values: RECORDING - recording is in progress, READY - recording is ready, ERROR - error has occurred and recording can be broken
      - `questionResponses` QuestionResponse[] — Notes of call added by an agent
        - `question` string — A text of a question
        - `response` string — Client's answer
    - `agentCall` boolean — An internal call to an agent
    - `notes` Note[] — Notes of call added by an agent
      - `text` string — A text of a note
      - `created` integer — The time when the given resource was created, formatted in unix time milliseconds (read only). Example: 1473781817000
  - `texts` Text[] — List of Text objects addressed to a given contact
    - `id` integer — An id of an action
    - `fromNumber` string — Sender's phone number in E.164 format (11-digit) or short code. Example: 12132000384, 67076
    - `toNumber` string — Recipient's phone number in E.164 format (11-digit) or short code. Example: 12132000384, 67076
    - `attributes` object — Map of user-defined string attributes associated with an action
    - `state` 'READY' | 'SELECTED' | 'CALLBACK' | 'FINISHED' | 'DISABLED' | 'SKIPPED' | 'DNC' | 'DUP' | 'INVALID' | 'TIMEOUT' | 'PERIOD_LIMIT' | 'RESTRICTED_NUMBER' — Current state of an action (READY, SELECTED, CALLBACK, DISABLED, FINISHED, DNC, DUP, INVALID, TIMEOUT, PERIOD_LIMIT). See [call states and results](https://developers.callfire.com/results-responses-errors.html)
    - `campaignId` integer — An id of broadcast if given text was sent as a part of text broadcast
    - `batchId` integer — An id of contact batch associated with an action
    - `contact` Contact — Represents a contact in CallFire platform. Contains info about the people you want to contact. It allows you to store a user-defined properties for each contact
      - `id` integer — An id of a contact
      - `firstName` string — A first name of a contact
      - `lastName` string — A last name of a contact
      - `zipcode` string — A Zip code of a contact
      - `homePhone` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `workPhone` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `mobilePhone` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `extraPhone1` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `extraPhone2` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `extraPhone3` string — Phone number in E.164 format (11-digit). Example: 12132000384
      - `externalId` string — An external id of a contact for syncing with external sources
      - `externalSystem` string — External system that external id refers to
      - `properties` object — Map of user-defined string properties for contact
      - `deleted` boolean — A deleted contact, deleted contacts are hidden from search results
    - `inbound` boolean — An action inbound
    - `created` integer — The time when the given resource was created, formatted in unix time milliseconds (read only). Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT
    - `modified` integer — The time when the given resource was modified, formatted in unix time milliseconds (read only). Example: 1473781817000 for Sat, 05 Jan 1985 14:03:37 GMT
    - `labels` string[] — Labels associated with an action
    - `message` string — A text message
    - `finalTextResult` 'SENT' | 'RECEIVED' | 'DNT' | 'TOO_BIG' | 'INTERNAL_ERROR' | 'CARRIER_ERROR' | 'CARRIER_TEMP_ERROR' | 'UNDIALED' | 'INVALID_NUMBER' — Result of text (SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED). See [call states and results](https://developers.callfire.com/results-responses-errors.html)
    - `records` TextRecord[] — List of text records, each record contains additional details: time of sending, cost, current state. A single contact may have multiple numbers. If given text was sent as part of broadcast with configured retry logic then each text record will contain details about attempted number
      - `id` integer — An id of a text record
      - `toNumber` string — An attempted phone number
      - `billedAmount` number, float — A cost of a sent text
      - `finishTime` integer — A time when the given resource was updated, formatted in unix time milliseconds (read only). Example: 1473781817000
      - `switchId` string — ~
      - `callerName` string — ~
      - `labels` string[] — Labels associated with a text action
      - `message` string — A text message
      - `textResult` 'SENT' | 'RECEIVED' | 'DNT' | 'TOO_BIG' | 'INTERNAL_ERROR' | 'CARRIER_ERROR' | 'CARRIER_TEMP_ERROR' | 'UNDIALED' | 'INVALID_NUMBER' — Result of a text (SENT, RECEIVED, DNT, TOO_BIG, INTERNAL_ERROR, CARRIER_ERROR, CARRIER_TEMP_ERROR, UNDIALED). See [call states and results](https://developers.callfire.com/results-responses-errors.html)
    - `media` Media[] — ~
      - `id` integer — An id of a media file
      - `accountId` integer — ~
      - `name` string — A name of a media file
      - `created` integer — The time when the given resource was created, formatted in unix time milliseconds (read only). Example: 1473781817000
      - `lengthInBytes` integer — A size of a media file in bytes
      - `mediaType` string — A MIME type of media file, ex: image/jpeg, image/png, video/mp4, audio/mp3, etc
      - `publicUrl` string — A public URL of a media file

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/callfire/apis/callfire-api-documentation.md) · [All operations](https://skmtc.dev/callfire/apis/callfire-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/callfire/callfire-api-documentation/revisions/9f6fb501bc03/schema)
