# Accept a Co-Sell Lead Invitation

`POST https://api.suger.cloud/org/{orgId}/cosell/lead/{leadId}/accept`

Accept a PENDING AWS Partner Central lead invitation for this organization, which starts the outbound sync that records the acceptance with AWS. Returns the operation details for that run. The lead must still be PENDING: any other invitation status returns 400 naming the status it is in, since an accepted, rejected or expired invitation cannot be accepted again. Accepting does not qualify the lead or convert it into an opportunity, and sends nothing to the customer.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgId` | path | string | yes | Organization ID |
| `leadId` | path | string | yes | Co-sell Lead ID |

## Responses

### 200 — OK

Content-Type: `application/json` · Schema: `OperationExecutionDetails`

**`OperationExecutionDetails`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `newWorkflowStarted` | boolean | no |  |
| `referralId` | string | no | ReferralID is the created referral's id, set by the SUGER co-sell create so the caller can chain follow-up calls (e.g. InviteCosellPartners) onto the new engagement without re-querying. Empty elsewhere. |
| `runID` | string | no |  |
| `slackMirrorWarning` | string | no | SlackMirrorWarning is a non-blocking advisory set when a SUGER co-sell console message was saved but could not be mirrored to the partner's Slack channel (no workspace connected, no channel mapped, bot not in the channel, or a transient post failure). Empty when the message mirrored or Slack is not involved. The console surfaces it as a warning toast; the message is always persisted regardless (best-effort mirror). |
| `status` | string | no |  |
| `workflowID` | string | no |  |

### 400 — Lead is not PENDING

Content-Type: `application/json` · Schema: `ErrorResponse`

**`ErrorResponse`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | ErrorCode | no |  |
| `info` | object | no |  |
| `message` | string | no |  |

### 404 — Lead not found

Content-Type: `application/json` · Schema: `ErrorResponse`

**`ErrorResponse`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | ErrorCode | no |  |
| `info` | object | no |  |
| `message` | string | no |  |

### 500 — Internal server error

Content-Type: `application/json` · Schema: `ErrorResponse`

**`ErrorResponse`** fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | ErrorCode | no |  |
| `info` | object | no |  |
| `message` | string | no |  |

## Example

_Generated from this operation's schema. Values are placeholders — substitute your own ids, and set `SUGER_TOKEN` to a bearer token from the [OAuth client-credentials exchange](https://doc.fours.com/settings/oauth-app/)._

### Request

```bash
curl -X POST 'https://api.suger.cloud/org/{orgId}/cosell/lead/{leadId}/accept' \
  -H "Authorization: Bearer $SUGER_TOKEN"
```

### Response — 200

```json
{
  "newWorkflowStarted": true,
  "referralId": "01H0000000000000000000",
  "runID": "01H0000000000000000000",
  "slackMirrorWarning": "string",
  "status": "string",
  "workflowID": "01H0000000000000000000"
}
```

### Error — 400

```json
{
  "code": "InternalServerError",
  "message": "string"
}
```

---

API reference: https://doc.fours.com/api/
