Skip to content

Delete browser profiles

Request

Move browser profiles to the recycle bin, or permanently delete them with permanentDelete: true.

  • Authorization: both modes require browser-profile deletion permission and existing data access. Team and member identity come from authentication.
  • Default mode: omitted, null or false permanentDelete preserves the existing recycle-bin flow. Profiles must not already be recycled, running or transferring; existing sharing rules apply. Profile data and cloud cache remain recoverable through the client. Quota retention follows the team's recycle-bin policy; the daily creation counter is not refunded.
  • Permanent mode: positive IDs are deduplicated. Targets can be normal profiles or profiles already in the recycle bin. Running, transfer, authorization and sharing checks still apply. Deletion and association cleanup commit before the response; base-data and cloud-cache cleanup continue asynchronously. Deletion cannot be undone.
  • Result: data is boolean. In permanent mode, true means at least one matching profile was deleted; false means no matching profile was deleted. It is not proof that background cleanup finished, and no taskId is returned.
  • Validation: envIds is required and non-empty. Send IDs as decimal strings to preserve precision; JSON integers are also accepted. Fractions (including .0), scientific notation, non-integer strings and signed-64-bit overflow reject the entire request with 99006 (HTTP 200). Format errors identify envIds[index] with IntegerRequired or OutOfRange in error.info.
  • Retry: verify state before retrying after a timeout. Use the client for recycle-bin inspection and restoration; these APIs expose no restore operation.
Security
OpenApiBearer
Bodyapplication/jsonrequired
envIdsArray of strings, non-emptyrequired

Required non-empty profile ID array. Permanent deletion requires positive IDs and removes duplicates. Decimal strings are recommended; JSON integers are also accepted within signed 64-bit range. Fractions (including .0), scientific notation, non-integer strings and overflow reject the entire request with 99006.

Example:
[ "1868548141708648448" ]
permanentDeleteboolean or null

True permanently deletes profiles; omitted, null or false uses the existing recycle-bin flow. Permanent deletion cannot be undone.

Default:false
Example:false
curl -i -X POST \
  https://api.morelogin.com/env/removeToRecycleBin/batch \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "envIds": [
      "1868548141708648448"
    ],
    "permanentDelete": false
  }'

Responses

Success

Bodyapplication/json
codeintegerrequired

Return result code. 0 means success; other codes indicate exceptions.

Example:0
msgstring or nullrequired

Error message. Usually null on success.

Example:null
requestIdstring

Operation request ID. This field may be present when the request passes through the API gateway.

Example:"1d4f3ea968664593860b94b35d4ebf5e"
databooleanrequired

Whether the batch operation succeeded.

Example:true
Response
{ "code": 0, "msg": null, "requestId": "1d4f3ea968664593860b94b35d4ebf5e", "data": true }