Skip to main content
POST
/
streams
/
{streamId}
/
records
/
delete
Delete records from a stream
curl --request POST \
  --url https://{cluster}.cognitedata.com/api/v1/projects/{project}/streams/{streamId}/records/delete \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "items": [
    {
      "space": "mySpace",
      "externalId": "some_id"
    }
  ]
}
'
{}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Path Parameters

streamId
string
required

An identifier of the stream where the records are stored.

Required string length: 1 - 100
Pattern: ^[a-z]([a-z0-9_-]{0,98}[a-z0-9])?$
Example:

"test1"

Body

application/json

Records to delete from a stream.

items
recordItem · object[]
required

List of records to delete.

Required array length: 1 - 1000 elements

Response

An empty response is returned if all records from the request are successfully deleted.

Empty JSON object indicates all records are successfully accepted to be deleted.

Last modified on April 23, 2026