Atmee.aiDocs
APIAPI referenceAvatars

Delete a version

DELETE
/v1/avatars/{avatarId}/versions/{versionId}

Deletes an older version of a v2 avatar: its takes and the files only it uses. It can no longer be restored.

  • Files that a kept take or the current inputs use are never deleted.
  • The current version, a version holding the serving or selected take (409 version_in_use) and one whose capture is still running (409 version_busy) cannot be deleted.
  • If storage cannot delete every file now, the takes are still gone and pendingFiles counts what is left: call again to retry.

Authorization

headerX-Api-Key<token>

Your secret API key (sk_atmee_...; older keys start sk_live_), sent as X-Api-Key. Keep it on your server and never send it to a browser.

Path Parameters

avatarId*string
Formatuuid
versionId*string

A versionId from GET /candidates.

Match^[0-9a-f]{8}$

Response Body

Deleted.

application/json
  1. response

The takes are deleted at once. Their files (the ones only this version used) are deleted from storage in the same request; when storage fails, pendingFiles says how many are left and repeating the same DELETE (also once the version is gone) retries them.

versionId*string
deletedCandidateIds*array<>

The takes this request deleted (empty on a retry of files only).

deletedFiles*integer

How many files were deleted from storage by this request.

pendingFiles*integer

How many files could not be deleted now; repeat the DELETE to retry them. 0 when everything is gone.

Example Request
curl -X DELETE 'https://api.atmanity.us/v1/avatars/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions/string'
Example Response
{  "versionId": "string",  "deletedCandidateIds": [    "c5c499e7-a424-49c1-8487-aa808be50bac"  ],  "deletedFiles": 0,  "pendingFiles": 0}