Skip to main content

Delete Asset from Segment

Deletes a specific asset file from a segment. The asset is permanently removed from the project's reference material folder.

URL

(DELETE) /api/resources/assets/{segmentid}

PARAMETERS

Parameter

Type

Required

Description

segmentid (URL)

int

Mandatory

The unique segment identifier containing the asset to delete

scope (Query)

string

Mandatory

The scope parameter that defines the project or job context. Formats: pr{projectid} (e.g., pr7214), jbs{jobid} for standard jobs, jbc{jobid} for Codyt jobs

filename (Query)

string

Mandatory

The name of the asset file to delete

locale (Query)

string

Optional

Language code if the asset is associated with a specific language

relativePath (Query)

string

Optional

Relative path within the segment's asset folder. If provided, takes precedence over path in filename

ACCESS RIGHTS

The user must have access rights to the project's reference material with delete permissions. The system checks project-level permissions to ensure the user can delete assets from the specified scope.

EXAMPLE REQUEST

CODE
curl --location --request DELETE '{{URL}}/api/resources/assets/27665601?scope=pr7214&filename=pexels-gons3.jpg&locale=en' \
--header 'X-Auth-Token: {{AUTH_TOKEN}}' \
--header 'X-Auth-AccountId: {{ACCOUNT_ID}}'

RESULTS

The response returns an HTTP status code without a response body:

Status Code

Description

200 OK

Asset successfully deleted

Response Body: Empty

USAGE NOTES

  • The asset is permanently deleted and cannot be recovered

  • The filename parameter must match exactly the stored filename

  • If locale is specified, only the asset in that language-specific subfolder is deleted

  • If the asset doesn't exist, the operation still returns 200 OK (idempotent behavior)

  • All references to the deleted asset (such as cached download URLs) become invalid

  • File Path Handling: The system supports two ways to specify file paths:

    • Use the relativePath parameter to specify the folder structure

    • Include the path directly in the filename (e.g., "subfolder/image.jpg")

    • If both are provided, relativePath takes precedence

  • Path separators should be URL-encoded in query parameters

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.