Archive API User
Archive an API user. Superadmins only. Deletes all of the API user's keys, so they stop working immediately, then deactivates the API user.
Use this instead of archiving the API user in the Coperniq UI. Archiving it there deactivates the user but does not delete its keys.
If any key can't be deleted, the response is a 502 and the API user is left active, so no key is left working on an archived account. Retry the request to finish. Archiving an API user that has no keys left is safe and returns 200.
Archiving doesn't stop new keys from being created. If the person who created the API user calls POST /api-keys again, the API user is reactivated and gets a new key. The archive only returns 200 once it has confirmed no keys are left.
Authenticate with Basic Auth (your Coperniq email and password), not an API key.
Request
- Base URL: https://api.coperniq.io/v1
- URL: https://api.coperniq.io/v1/api-users/{user_id}/archive
- Auth: HTTP basic
Path parameters
The API user's id from GET /api-users
Query parameters
ID of the company to manage. Needed only when the authenticated user belongs to more than one company and the default (their first non-collaborator company) is not the one you want. You must be a superadmin in that company. Your company ID can be found in the URL after logging in to the Coperniq UI: https://app.coperniq.io/{company_id}/inbox.
Response
All of the API user's keys were deleted and the API user was deactivated
Changes
No recorded changes to this operation across all 1 revision of this API.