Skip to content

Remove an image

DELETE
/api/v1/activities/{activityId}/images/{imageId}
curl --request DELETE \
--url http://localhost:8080/api/v1/activities/activity-9756441741/images/activityImage-0a8cdfbb-63b4-4f0f-a09d-faedd5a00753 \
--header 'Authorization: Bearer <token>'

Removes the image from the activity and deletes the file.

activityId
required
string

The prefixed activity identifier, activity- included.

imageId
required
string

The prefixed image identifier, activityImage- included, as listed in the activity’s images.

The image was removed.

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

The activity does not exist, or the image is not one of its images.

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

No such activity

{
"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": "Images can only be removed from activities when running in file import mode."
}