> 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.

# Attach a compliance profile to a subcontractor

POST https://api.tradeguardins.com/v1/subcontractors/{subcontractorId}/compliance-profiles
Content-Type: application/json

Attaches one of your organization's compliance profiles to the
subcontractor, creating one `pending` compliance record per requirement
and starting an onboarding compliance run (`complianceRunId`; poll it with
[Get a compliance run](https://docs.tradeguardins.com/api-reference/compliance/get-compliance-run)).

If the profile is already attached the call still returns **201**, with
`alreadyAttached: true`, no new records (`complianceRecords: []`) and no
run.

A profile with a Secretary of State or license check runs it right away
when the subcontractor has the information it needs;
`informationNeeded` lists what to add otherwise.

Project-owned profiles cannot be attached here (`400`); attach the
subcontractor to the project with
[Attach a subcontractor to a project](https://docs.tradeguardins.com/api-reference/projects/attach-project-subcontractor).
Returns `404` when the subcontractor is not visible to you, or the profile
does not exist, is deleted or belongs to another organization. Requires
scope `subcontractors:write`.

Reference: https://docs.tradeguardins.com/api-reference/subcontractors/attach-compliance-profile

## Authentication

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

## Request

### Path parameters

- `subcontractorId` (string, required)

### Body (application/json)

This endpoint expects an object.

- `complianceProfileId` (string, required)

## Response

### 201

Profile attached and compliance records created

- `data` (V1SubcontractorsSubcontractorIdComplianceProfilesPostResponsesContentApplicationJsonSchemaData, optional)

## Errors

### 400 Bad Request Error

Body failed validation (`validation_failed`), the `subcontractorId` is not a UUID (`invalid_identifier`), or the profile is project-owned (`bad_request`)

- `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

### V1SubcontractorsSubcontractorIdComplianceProfilesPostResponsesContentApplicationJsonSchemaData

- `complianceProfileEnrollment` (ComplianceProfileEnrollment, optional) — A subcontractor's attachment to a compliance profile (GC-level when `projectId` is null).
- `complianceRecords` (list of ComplianceRecord, optional) — The records created (or reset to `pending`) for this attachment; empty when `alreadyAttached`.
- `complianceRunId` (string, optional) — The onboarding compliance run. Absent when `alreadyAttached`.
- `alreadyAttached` (boolean, optional)
- `informationNeeded` (list of ReportInformationNeededListItems, optional) — Secretary of State and license checks your compliance profiles require that can't run yet, with what to add to the subcontractor. Empty when nothing is missing. Add the fields with [Update a subcontractor](https://docs.tradeguardins.com/api-reference/subcontractors/update-subcontractor); the check then runs automatically.

### ErrorDetailsItems

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

### ComplianceProfileEnrollment

A subcontractor's attachment to a compliance profile (GC-level when `projectId` is null).

- `id` (string, optional)
- `subcontractorId` (string, optional)
- `complianceProfileId` (string, optional)
- `projectId` (string, optional, nullable)
- `attachedAt` (datetime, optional)
- `detachedAt` (datetime, optional, nullable)

### ComplianceRecord

- `id` (string, optional)
- `subcontractorId` (string, optional)
- `requirementId` (string, optional)
- `complianceProfileEnrollmentId` (string, optional)
- `status` (enum, optional)
  - Allowed values: `pending`, `compliant`, `compliant_pending_verification`, `non_compliant`, `expired`, `under_review`, `not_applicable`
- `met` (boolean, optional) — Whether the requirement is actually met. A track-only requirement (`enforcementLevel: preferred`) never blocks, so one the subcontractor doesn't meet still reads `status: compliant`; `met` is `false` for it. `met` is `true` for `compliant` and `compliant_pending_verification` otherwise (including a manual override to compliant), and `false` for every other status.
- `statusReason` (string, optional, nullable)
- `lastCheckedAt` (datetime, optional, nullable)
- `nextCheckAt` (datetime, optional, nullable)
- `expiresAt` (datetime, optional, nullable)
- `checkResult` (CheckResultDetails, optional) — The evaluation behind a compliance record's status. Extra properties may appear.
- `overrideStatus` (enum, optional, nullable) — Set while a manual override is in force (compliant or non_compliant).
  - Allowed values: `pending`, `compliant`, `compliant_pending_verification`, `non_compliant`, `expired`, `under_review`, `not_applicable`
- `overrideReason` (string, optional, nullable)
- `overrideBy` (string, optional, nullable) — Operator identity (Clerk user id or API key subject).
- `overrideByType` (enum, optional, nullable)
  - Allowed values: `user`, `api_key`
- `overrideAt` (datetime, optional, nullable)
- `overrideFingerprint` (string, optional, nullable) — Internal evidence hash; do not rely on its format.
- `metadata` (ComplianceRecordMetadata, optional)
- `createdAt` (datetime, optional)
- `updatedAt` (datetime, optional)

### ReportInformationNeededListItems

- `source` (enum, required) — A business-report source that evidences a requirement instead of a document
  - Allowed values: `cobalt_sos`, `tradesapi_license`, `jdp_background`, `web_research`
- `check` (string, required) — Plain-English name, e.g. `Secretary of State check`.
- `requirements` (list of string, required) — Titles of the requirements that use this check.
- `missing` (list of ReportInformationNeeded, required)

### CheckResultDetails

The evaluation behind a compliance record's status. Extra properties may appear.

- `documentCategory` (string, optional)
- `policyType` (string, optional, nullable)
- `criteria` (CheckResultDetailsCriteria, optional) — The requirement criteria evaluated.
- `checkedAt` (datetime, optional)
- `criteriaResults` (list of CriterionResult, optional)
- `passRate` (CheckResultDetailsPassRate, optional)
- `warnings` (list of string, optional)
- `informationNeeded` (list of ReportInformationNeeded, optional) — A Secretary of State or license check that can't run yet ("Waiting on information"), and what to add to the subcontractor.
- `licenseDetermination` (CheckResultDetailsLicenseDetermination, optional) — For a license check on a subcontractor with no license number, TradeGuard's research on whether this trade needs a license where they work, with its sources.
- `enforcement` (CheckResultDetailsEnforcement, optional) — How the requirement's enforcement level shaped this verdict.
- `changesSinceLastCheck` (list of string, optional) — What changed since the previous Secretary of State or license check, e.g. an entity that is no longer active or a registered name that changed.

### ComplianceRecordMetadata

### ReportInformationNeeded

- `field` (enum, required) — The subcontractor field to fill in. New values may be added.
  - Allowed values: `companyName`, `businessAddress.state`, `tradeCategory`, `licenses[].state`
- `label` (string, required) — What to add, in plain English.

### CheckResultDetailsCriteria

The requirement criteria evaluated.

### CriterionResult

One check on a compliance record: what was required, what the certificate shows, and the outcome. `passed` is true exactly when `outcome` is `pass` or `waived`. Rows written before TG-1307 have only `key`, `passed`, `expected`, `actual` and `message`.

- `key` (string, required) — Stable id of the check, e.g. `limit:each_occurrence`, `endorsement:additional_insured`, `expiration_date`.
- `passed` (boolean, required)
- `expected` (any, required) — The requirement's value (any JSON type).
- `actual` (any, required) — The value found, or `null` when it is not on the certificate (any JSON type).
- `message` (string, required) — Plain-English line built from the values (never AI-written).
- `field` (string, optional) — Certificate field the value came from, e.g. `general_liability.each_occurrence`.
- `label` (string, optional) — Plain-English name of the check, e.g. `Each Occurrence`.
- `rule` (string, optional) — Comparison used, e.g. `gte` (at least), `lte` (at most), `equals`, `one_of`, `present`, `includes`, `name_match`, `not_expired`. New values may be added.
- `outcome` (enum, optional) — The outcome of one check (TG-1307). `pass` / `fail`: the certificate clearly does or doesn't meet the requirement. `not_on_certificate`: the field is blank on the certificate (never read as 0 or "no"); not passing. `needs_review`: the system couldn't tell what the certificate says (read with under 70% confidence, or ambiguous); a TradeGuard operator decides, and the record reads `under_review` meanwhile. `waived`: the check is waived for this policy; counts as passing. `waiting_on_sub`: waiting on an answer from the subcontractor; not passing. `waiting_on_information`: a Secretary of State or license check can't run until information is added to the subcontractor (see `checkResult.informationNeeded`); not passing, and the record reads `pending`. New values may be added; treat an unknown value as not passing.
  - Allowed values: `pass`, `fail`, `not_on_certificate`, `needs_review`, `waived`, `waiting_on_sub`, `waiting_on_information`
- `policyType` (string, optional, nullable)
- `evidence` (CriterionResultEvidence, optional, nullable) — Where on the certificate the value was read, when known.
- `confidence` (double, optional, nullable) — How sure the certificate reader was of this value (0 to 1), when known. Under 0.70 the outcome is `needs_review`.
- `deferral` (CriterionResultDeferral, optional) — Set when a check is **due at renewal**: it waits, reads `outcome: waived` (counts as met) and its `message` starts with the reason and date. * An endorsement check (the enrollment's `enforceEndorsementsAtRenewal`): "Endorsement due at renewal (\<date>)", no `kind`. * A missing policy the GC deferred (the enrollment's `missingPoliciesAtRenewal`), and the endorsement checks on that policy: "Policy due at renewal (\<date>)", `kind: missing_policy`.

### CheckResultDetailsPassRate

- `passed` (integer, optional)
- `total` (integer, optional)

### CheckResultDetailsLicenseDetermination

For a license check on a subcontractor with no license number, TradeGuard's research on whether this trade needs a license where they work, with its sources.

- `required` (boolean, optional, nullable) — `true` a license is required, `false` none is required, `null` couldn't be determined.
- `trade` (string, optional, nullable)
- `jurisdiction` (CheckResultDetailsLicenseDeterminationJurisdiction, optional, nullable)
- `licenseType` (string, optional, nullable)
- `licensingAuthority` (string, optional, nullable)
- `reasoning` (string, optional, nullable)
- `sources` (list of CheckResultDetailsLicenseDeterminationSourcesItems, optional)

### CheckResultDetailsEnforcement

How the requirement's enforcement level shaped this verdict.

- `level` (enum, optional)
  - Allowed values: `required`, `preferred`, `conditional`
- `met` (boolean, optional) — Whether the evidence met the requirement, before enforcement. `false` on a track-only (`preferred`) requirement that reads `compliant`.
- `rawStatus` (string, optional) — The status before enforcement, for a track-only requirement or one waiting on the sub's answer.
- `conditionKey` (string, optional, nullable)
- `conditionMet` (boolean, optional, nullable) — `null` while the sub hasn't answered the condition's question.

### CriterionResultEvidence

Where on the certificate the value was read, when known.

- `documentId` (string, optional)
- `page` (integer, optional)
- `text` (string, optional)

### CriterionResultDeferral

Set when a check is **due at renewal**: it waits, reads `outcome: waived` (counts as met) and its `message` starts with the reason and date. * An endorsement check (the enrollment's `enforceEndorsementsAtRenewal`): "Endorsement due at renewal (\<date>)", no `kind`. * A missing policy the GC deferred (the enrollment's `missingPoliciesAtRenewal`), and the endorsement checks on that policy: "Policy due at renewal (\<date>)", `kind: missing_policy`.

- `until` (date, optional) — The date the check applies again. For an endorsement, the policy's expiration date (sooner if the renewal certificate arrives). For a missing policy, the sub's next renewal: the earliest expiration date among its policies on file (sooner if a renewed policy arrives).
- `originalOutcome` (enum, optional) — The outcome of one check (TG-1307). `pass` / `fail`: the certificate clearly does or doesn't meet the requirement. `not_on_certificate`: the field is blank on the certificate (never read as 0 or "no"); not passing. `needs_review`: the system couldn't tell what the certificate says (read with under 70% confidence, or ambiguous); a TradeGuard operator decides, and the record reads `under_review` meanwhile. `waived`: the check is waived for this policy; counts as passing. `waiting_on_sub`: waiting on an answer from the subcontractor; not passing. `waiting_on_information`: a Secretary of State or license check can't run until information is added to the subcontractor (see `checkResult.informationNeeded`); not passing, and the record reads `pending`. New values may be added; treat an unknown value as not passing.
  - Allowed values: `pass`, `fail`, `not_on_certificate`, `needs_review`, `waived`, `waiting_on_sub`, `waiting_on_information`
- `kind` (enum, optional) — `missing_policy` for a missing policy due at renewal; absent for an endorsement.
  - Allowed values: `missing_policy`

### CheckResultDetailsLicenseDeterminationJurisdiction

- `state` (string, optional)
- `city` (string, optional, nullable)

### CheckResultDetailsLicenseDeterminationSourcesItems

- `url` (string, optional)
- `title` (string, optional, nullable)

## Examples

**Request**

```json
{
  "complianceProfileId": "string"
}
```

**Response**

```json
{
  "data": {
    "complianceProfileEnrollment": {
      "id": "string",
      "subcontractorId": "string",
      "complianceProfileId": "string",
      "projectId": "string",
      "attachedAt": "2024-01-15T09:30:00Z",
      "detachedAt": "2024-01-15T09:30:00Z"
    },
    "complianceRecords": [
      {
        "id": "string",
        "subcontractorId": "string",
        "requirementId": "string",
        "complianceProfileEnrollmentId": "string",
        "status": "pending",
        "met": true,
        "statusReason": "string",
        "lastCheckedAt": "2024-01-15T09:30:00Z",
        "nextCheckAt": "2024-01-15T09:30:00Z",
        "expiresAt": "2024-01-15T09:30:00Z",
        "checkResult": {
          "documentCategory": "string",
          "policyType": "string",
          "criteria": {},
          "checkedAt": "2024-01-15T09:30:00Z",
          "criteriaResults": [
            {
              "key": "string",
              "passed": true,
              "expected": null,
              "actual": null,
              "message": "string",
              "field": "string",
              "label": "string",
              "rule": "string",
              "outcome": "pass",
              "policyType": "string",
              "evidence": {
                "documentId": "string",
                "page": 1,
                "text": "string"
              },
              "confidence": 0.5,
              "deferral": {
                "until": "2023-01-15",
                "originalOutcome": "pass",
                "kind": "missing_policy"
              }
            }
          ],
          "passRate": {
            "passed": 1,
            "total": 1
          },
          "warnings": [
            "string"
          ],
          "informationNeeded": [
            {
              "field": "companyName",
              "label": "string"
            }
          ],
          "licenseDetermination": {
            "required": true,
            "trade": "string",
            "jurisdiction": {
              "state": "string",
              "city": "string"
            },
            "licenseType": "string",
            "licensingAuthority": "string",
            "reasoning": "string",
            "sources": [
              {
                "url": "string",
                "title": "string"
              }
            ]
          },
          "enforcement": {
            "level": "required",
            "met": true,
            "rawStatus": "string",
            "conditionKey": "string",
            "conditionMet": true
          },
          "changesSinceLastCheck": [
            "string"
          ]
        },
        "overrideStatus": "pending",
        "overrideReason": "string",
        "overrideBy": "string",
        "overrideByType": "user",
        "overrideAt": "2024-01-15T09:30:00Z",
        "overrideFingerprint": "string",
        "metadata": {},
        "createdAt": "2024-01-15T09:30:00Z",
        "updatedAt": "2024-01-15T09:30:00Z"
      }
    ],
    "complianceRunId": "string",
    "alreadyAttached": true,
    "informationNeeded": [
      {
        "source": "cobalt_sos",
        "check": "string",
        "requirements": [
          "string"
        ],
        "missing": [
          {
            "field": "companyName",
            "label": "string"
          }
        ]
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/compliance-profiles"

payload = { "complianceProfileId": "string" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.tradeguardins.com/v1/subcontractors/subcontractorId/compliance-profiles';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"complianceProfileId":"string"}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/compliance-profiles"

	payload := strings.NewReader("{\n  \"complianceProfileId\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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/compliance-profiles")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"complianceProfileId\": \"string\"\n}"

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.post("https://api.tradeguardins.com/v1/subcontractors/subcontractorId/compliance-profiles")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"complianceProfileId\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.tradeguardins.com/v1/subcontractors/subcontractorId/compliance-profiles', [
  'body' => '{
  "complianceProfileId": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.tradeguardins.com/v1/subcontractors/subcontractorId/compliance-profiles");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"complianceProfileId\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["complianceProfileId": "string"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/compliance-profiles")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```