> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.tradeguardins.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.tradeguardins.com/_mcp/server.

# Get the issue resolution timeline for a subcontractor

GET https://api.tradeguardins.com/v1/subcontractors/{subcontractorId}/conversation

When TradeGuard collects documents for your organization, Jake (TradeGuard's account manager) keeps one email conversation with each of your subcontractors. This returns that conversation as a read-only timeline, oldest first: every email Jake sent, every reply and portal message from the subcontractor or their broker, and every document they sent in. It also says where the reminder schedule stands.

The reminder schedule: an invite when you add the subcontractor, then up to three reminders two business days apart (Chicago time, 8 AM to 6 PM, skipping weekends and US federal holidays), then a phone call by the TradeGuard team. Every email lists everything still needed. An upload restarts the schedule, and Jake answers it with one email (a thank-you plus anything still missing, or a closing note when nothing is left).

`conversation` is `null` when no conversation has started; `reason` says why (`customer_collects`: your organization collects documents itself, so TradeGuard never contacts your subcontractors; `not_started`: nothing to ask for yet). In the sandbox, emails are written to the timeline with status `simulated` and never sent.

Drafts, review notes and internal staff notes are never included.

Requires scope `subcontractors:read`.

Reference: https://docs.tradeguardins.com/api-reference/subcontractors/get-subcontractor-conversation

## Authentication

- `Authorization` header (bearer token, required) — Session JWT or API key (`ak_...`)

## Request

### Path parameters

- `subcontractorId` (string, required)

## Response

### 200

The conversation and its timeline

- `data` (SubcontractorConversation, optional)

## Errors

### 400 Bad Request Error

Malformed request (`bad_request`, `invalid_identifier`)

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

### 401 Unauthorized Error

Missing, malformed, expired or revoked credential (`unauthenticated`)

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

### 403 Forbidden Error

The credential lacks the scope or role for this action (`forbidden`)

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

### 404 Not Found Error

Resource not found, or not visible to the caller's organization (`not_found`)

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

### 429 Too Many Requests Error

Rate limit exceeded (`rate_limited`); retry after `Retry-After` seconds

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

## Types

### SubcontractorConversation

- `conversation` (SubcontractorConversationConversation, required, nullable)
- `reason` (enum, required, nullable) — Why there is no conversation. Null when there is one.
  - Allowed values: `customer_collects`, `enrollment_inactive`, `not_started`
- `timeline` (list of ConversationTimelineEntry, required)

### ErrorDetailsItems

- `path` (string, optional)
- `message` (string, optional)

### SubcontractorConversationConversation

- `id` (string, optional)
- `status` (enum, optional) — `active`: reminders running. `paused`: waiting until a date. `held`: stopped by the TradeGuard team. `escalated`: emails done, a person will call. `bounced`: an email bounced and the contact is being fixed. `closed`: nothing left to collect (a new issue reopens it in the same thread).
  - Allowed values: `active`, `paused`, `held`, `escalated`, `bounced`, `closed`
- `language` (enum, optional)
  - Allowed values: `en`, `es`
- `subject` (string, optional, nullable)
- `ladderPosition` (string, optional) — Plain-English position in the reminder schedule, e.g. "Reminder 2 of 3 sent".
- `step` (integer, optional) — 0 for the first email, 1 to 3 for the reminders, 4 once a call is due.
- `nextStepAt` (datetime, optional, nullable) — When the schedule looks at this conversation next. Null when it waits on someone.
- `waitUntil` (datetime, optional, nullable)
- `lastOutboundAt` (datetime, optional, nullable)
- `lastInboundAt` (datetime, optional, nullable)
- `lastDocumentAt` (datetime, optional, nullable)
- `primaryIssueId` (string, optional, nullable) — The issue the emails lead with (the most urgent open issue).
- `simulated` (boolean, optional) — True in the sandbox, where emails are recorded but never sent.
- `createdAt` (datetime, optional)

### ConversationTimelineEntry

- `type` (enum, required)
  - Allowed values: `email`, `portal_message`, `document`
- `id` (string, required)
- `at` (datetime, required)
- `direction` (enum, optional) — email and portal_message only. `outbound` is from Jake.
  - Allowed values: `outbound`, `inbound`
- `status` (string, optional) — email and portal_message only. `sent`, `delivered`, `bounced`, `failed`, `queued`, `simulated` (sandbox), or `received` for inbound messages.
- `kind` (string, optional, nullable) — Outbound only: invite, nudge_1, nudge_2, nudge_3, upload_thanks, still_missing, closing, expiring or expired.
- `from` (string, optional, nullable)
- `to` (list of string, optional)
- `cc` (list of string, optional)
- `subject` (string, optional, nullable)
- `body` (string, optional, nullable) — The plain-text body as the recipient read it.
- `fileName` (string, optional) — document only.
- `documentCategory` (string, optional) — document only.
- `submittedByRole` (string, optional) — document only: sub, broker, gc, customer_api, staff or unknown.
- `submittedVia` (string, optional, nullable) — document only: portal, email, web or api.

## Examples

**Response**

```json
{
  "data": {
    "conversation": {
      "id": "string",
      "status": "active",
      "language": "en",
      "subject": "string",
      "ladderPosition": "Reminder 2 of 3 sent",
      "step": 1,
      "nextStepAt": "2024-01-15T09:30:00Z",
      "waitUntil": "2024-01-15T09:30:00Z",
      "lastOutboundAt": "2024-01-15T09:30:00Z",
      "lastInboundAt": "2024-01-15T09:30:00Z",
      "lastDocumentAt": "2024-01-15T09:30:00Z",
      "primaryIssueId": "string",
      "simulated": true,
      "createdAt": "2024-01-15T09:30:00Z"
    },
    "reason": "customer_collects",
    "timeline": [
      {
        "type": "email",
        "id": "string",
        "at": "2024-01-15T09:30:00Z",
        "direction": "outbound",
        "status": "string",
        "kind": "string",
        "from": "string",
        "to": [
          "string"
        ],
        "cc": [
          "string"
        ],
        "subject": "string",
        "body": "string",
        "fileName": "string",
        "documentCategory": "string",
        "submittedByRole": "string",
        "submittedVia": "string"
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/conversation"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.tradeguardins.com/v1/subcontractors/subcontractorId/conversation';
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);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/conversation"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.tradeguardins.com/v1/subcontractors/subcontractorId/conversation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.tradeguardins.com/v1/subcontractors/subcontractorId/conversation")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.tradeguardins.com/v1/subcontractors/subcontractorId/conversation', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.tradeguardins.com/v1/subcontractors/subcontractorId/conversation");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/conversation")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```