# terminateServiceApiRequest

> **terminateServiceApiRequest**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/sp/namespaces/terminateserviceapirequest/type-aliases/outputtype/)\>

Defined in: [packages/synapse-core/src/sp/terminate-service.ts:130](https://github.com/FilOzone/synapse-sdk/blob/ac439ced73387be0f1e7ed7e635dce4bdba76399/packages/synapse-core/src/sp/terminate-service.ts#L130)

Request data set termination on the PDP API.

POST /pdp/data-sets/{dataSetId}/terminate

The provider queues the request and relays it on chain asynchronously; a 202
response carries no transaction hash. Poll [waitForTerminateService](/reference/filoz/synapse-core/sp/functions/waitforterminateservice/)
for the hash and confirmation.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/sp/namespaces/terminateserviceapirequest/type-aliases/optionstype/) | [terminateServiceApiRequest.OptionsType](/reference/filoz/synapse-core/sp/namespaces/terminateserviceapirequest/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/sp/namespaces/terminateserviceapirequest/type-aliases/outputtype/)\>

Status URL [terminateServiceApiRequest.OutputType](/reference/filoz/synapse-core/sp/namespaces/terminateserviceapirequest/type-aliases/outputtype/)

## Throws

Errors [terminateServiceApiRequest.ErrorType](/reference/filoz/synapse-core/sp/namespaces/terminateserviceapirequest/type-aliases/errortype/)