Remove sandbox content as the platform's user

DELETE
/v1/sandbox/profiles/{profileId}/content/{collection}/{externalId}

Remove sandbox content as the platform's user. The item leaves the Profile's emulated platform account as if one of the platform's users had removed it, such as a person taking back their reaction to a DM, and Koil finds the change the way it finds a real one, as the collection's content.{collection}.deleted event through the platform's webhook. Only a collection whose deleted Koil observes takes one: for one that emits no deleted, such as YouTube's comments, Koil can't observe a deletion in live mode either, and the request answers not_supported. To delete content as the Profile, use DELETE /v1/profiles/{profileId}/content/{collection}/{externalId}. Sandbox keys only. Requires an Idempotency-Key: a retry with the same key delivers the same change, and its event has the same id.

Authorization

bearerAuth
AuthorizationBearer <token>

An API key from the Koil admin console, sent as Authorization: Bearer <key>. A live key starts koil_live_ and a sandbox key koil_sandbox_; the key alone selects the Organization and mode. See https://docs.koil.co/concepts/authentication.

In: header

Path Parameters

profileId*string

Koil Profile identifier.

Length1 <= length
collection*string

{platform}.{surface}.{resource}: instagram.media.comments.

Length1 <= length
externalId*string

The item's externalId, as its reads and events give it.

Length1 <= length

Header Parameters

Koil-Version*string

The dated API version the request is written against; it fixes the request and response shapes. Every response echoes the version it is rendered in.

Value in"2026-12-08"
Idempotency-Key*string

A unique key for this request, scoped to the Organization and operation. Retrying with the same key and payload returns the first result instead of repeating the work, or runs a request that failed again; the same key with a different payload is refused with 409 conflict. Keys expire 24 hours after first use, and a request still in flight after 15 minutes releases its key to a retry with the same payload.

Match\S
Length1 <= length <= 255

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/sandbox/profiles/string/content/string/string" \  -H "Koil-Version: 2026-12-08" \  -H "Idempotency-Key: string"
{  "collection": "string",  "externalId": "string"}
{  "error": {    "code": "validation_error",    "message": "string",    "meta": {      "violations": [        {          "code": "string",          "path": "string",          "message": "string"        }      ],      "budgets": [        "string"      ],      "profileIds": [        "string"      ],      "required": [        "string"      ],      "limit": 0,      "resourceType": "string",      "resourceId": "string",      "reason": "string",      "refusalReason": "messaging_window_closed",      "property1": null,      "property2": null    },    "requestId": "string"  }}
{  "error": {    "code": "validation_error",    "message": "string",    "meta": {      "violations": [        {          "code": "string",          "path": "string",          "message": "string"        }      ],      "budgets": [        "string"      ],      "profileIds": [        "string"      ],      "required": [        "string"      ],      "limit": 0,      "resourceType": "string",      "resourceId": "string",      "reason": "string",      "refusalReason": "messaging_window_closed",      "property1": null,      "property2": null    },    "requestId": "string"  }}
{  "error": {    "code": "validation_error",    "message": "string",    "meta": {      "violations": [        {          "code": "string",          "path": "string",          "message": "string"        }      ],      "budgets": [        "string"      ],      "profileIds": [        "string"      ],      "required": [        "string"      ],      "limit": 0,      "resourceType": "string",      "resourceId": "string",      "reason": "string",      "refusalReason": "messaging_window_closed",      "property1": null,      "property2": null    },    "requestId": "string"  }}
{  "error": {    "code": "validation_error",    "message": "string",    "meta": {      "violations": [        {          "code": "string",          "path": "string",          "message": "string"        }      ],      "budgets": [        "string"      ],      "profileIds": [        "string"      ],      "required": [        "string"      ],      "limit": 0,      "resourceType": "string",      "resourceId": "string",      "reason": "string",      "refusalReason": "messaging_window_closed",      "property1": null,      "property2": null    },    "requestId": "string"  }}
{  "error": {    "code": "validation_error",    "message": "string",    "meta": {      "violations": [        {          "code": "string",          "path": "string",          "message": "string"        }      ],      "budgets": [        "string"      ],      "profileIds": [        "string"      ],      "required": [        "string"      ],      "limit": 0,      "resourceType": "string",      "resourceId": "string",      "reason": "string",      "refusalReason": "messaging_window_closed",      "property1": null,      "property2": null    },    "requestId": "string"  }}
{  "error": {    "code": "validation_error",    "message": "string",    "meta": {      "violations": [        {          "code": "string",          "path": "string",          "message": "string"        }      ],      "budgets": [        "string"      ],      "profileIds": [        "string"      ],      "required": [        "string"      ],      "limit": 0,      "resourceType": "string",      "resourceId": "string",      "reason": "string",      "refusalReason": "messaging_window_closed",      "property1": null,      "property2": null    },    "requestId": "string"  }}
{  "error": {    "code": "validation_error",    "message": "string",    "meta": {      "violations": [        {          "code": "string",          "path": "string",          "message": "string"        }      ],      "budgets": [        "string"      ],      "profileIds": [        "string"      ],      "required": [        "string"      ],      "limit": 0,      "resourceType": "string",      "resourceId": "string",      "reason": "string",      "refusalReason": "messaging_window_closed",      "property1": null,      "property2": null    },    "requestId": "string"  }}
{  "error": {    "code": "validation_error",    "message": "string",    "meta": {      "violations": [        {          "code": "string",          "path": "string",          "message": "string"        }      ],      "budgets": [        "string"      ],      "profileIds": [        "string"      ],      "required": [        "string"      ],      "limit": 0,      "resourceType": "string",      "resourceId": "string",      "reason": "string",      "refusalReason": "messaging_window_closed",      "property1": null,      "property2": null    },    "requestId": "string"  }}

Change sandbox content as the platform's user PATCH

Change sandbox content as the platform's user. The item changes on the Profile's emulated platform account as if one of the platform's users had changed it, such as a person reacting to a DM, and Koil finds the change the way it finds a real one, as the collection's `content.{collection}.updated` event: through the platform's webhook, or through the collection's poll where it lists a changed item again (a Google review), whose next poll is due at once. Only a collection whose `updated` Koil observes takes one: for one that emits no `updated`, such as YouTube's comments, Koil can't observe an edit in live mode either, and the request answers `not_supported`. Where the poll finds the edit, the request answers `conflict` with `Retry-After` until the collection's first poll for the Profile has run. To edit content the Profile wrote, use `PATCH /v1/profiles/{profileId}/content/{collection}/{externalId}`. Sandbox keys only. Requires an `Idempotency-Key`: a retry with the same key delivers the same change, and its event has the same id.

Change a sandbox Connection's status as its platform would POST

Change a sandbox Connection's status as its platform would. `invalid`: the end user revokes the Connection's grant at the emulated platform. Koil finds out as in live mode, by asking the platform about the token, usually within a minute: the Connection becomes `invalid`, with the `statusReason` live mode gives for its issuer, and `connection.updated` is sent. The platform revokes this Connection's grant only: another Connection holding the same magic grant stays `active`. `PUT /v1/connections/{connectionId}/credential` with a magic grant makes it `active` again. An `invalid` Connection is refused with `conflict`. Sandbox keys only.