Skip to content

Delete an activity

DELETE
/api/v1/activities/{activityId}
curl --request DELETE \
--url http://localhost:8080/api/v1/activities/activity-9756441741 \
--header 'Authorization: Bearer <token>'

Deletes the activity together with its streams, laps, splits, best efforts and import log.

activityId
required
string

The prefixed activity identifier, activity- included.

The activity was deleted.

The Authorization header was missing, malformed, or did not match the configured key.

Media typeapplication/json

Every error uses this shape.

object
error
required

A stable, machine readable code.

string
Allowed values: invalid_token missing_file unsupported_media_type unsupported_file_type file_too_large import_mode_not_files gpx_not_available not_found method_not_allowed bad_request forbidden internal_error
message
required
string
Examples
ExampleinvalidToken
{
"error": "invalid_token",
"message": "A valid API token is required. Send it in the Authorization header as a Bearer token."
}
WWW-Authenticate
string

No activity with this identifier exists.

Media typeapplication/json

Every error uses this shape.

object
error
required

A stable, machine readable code.

string
Allowed values: invalid_token missing_file unsupported_media_type unsupported_file_type file_too_large import_mode_not_files gpx_not_available not_found method_not_allowed bad_request forbidden internal_error
message
required
string
Examples
ExampleunknownActivity
{
"error": "not_found",
"message": "Activity \"activity-1\" not found"
}

This instance runs with IMPORT_MODE=stravaApi

Media typeapplication/json

Every error uses this shape.

object
error
required

A stable, machine readable code.

string
Allowed values: invalid_token missing_file unsupported_media_type unsupported_file_type file_too_large import_mode_not_files gpx_not_available not_found method_not_allowed bad_request forbidden internal_error
message
required
string
Examples
ExamplewrongImportMode
{
"error": "import_mode_not_files",
"message": "Activities can only be deleted when running in file import mode."
}