# Delete service token (/docs/rest-api/endpoints/service-tokens/delete-workspaces-by-workspace-id-service-tokens-by-service-token-id)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Revokes the service token with the given ID by deleting it.

Location: REST API > Endpoints > Service Tokens > Delete service token

Revokes the service token with the given ID by deleting it.

## API reference

### Delete service token

`DELETE /v1/workspaces/{workspaceId}/service-tokens/{serviceTokenId}`

Revokes the service token with the given ID by deleting it.

#### Parameters

- `workspaceId` (path, string, required)
- `serviceTokenId` (path, string, required)

#### Responses

- `204`: Deleted the service token successfully.
- `401`: Missing or invalid authorization token.
- `404`: Workspace not found, or the service token does not exist in it.

## Related pages

- [`Create service token`](https://www.prisma.io/docs/rest-api/endpoints/service-tokens/post-workspaces-by-workspace-id-service-tokens): Creates a new service token for the given workspace. The `value` field is returned exactly once in this response and is never stored — copy it immediately.
- [`List service tokens`](https://www.prisma.io/docs/rest-api/endpoints/service-tokens/get-workspaces-by-workspace-id-service-tokens): Returns the service tokens for the given workspace, newest first.