Skip to content

Area: Developers

Delete a company

DELETE https://releva.ai/api/v0/companies/{companyId} deletes one company of your shop.

Call it from your server when a company is closed or removed in your system. The profiles linked to the company are not deleted, and their roles are kept: to unlink them, call Remove a profile from a company for each one.

Send your shop’s Secret Key as a bearer token, from your server only:

authorization: Bearer $RELEVA_SECRET_KEY

Find the key under Settings › Shop & Integration; see Find your Access Token and Secret Key. Authentication failures answer 400, not 401 (see Errors).

DELETE /api/v0/companies/{companyId}, where {companyId} is the id you sent to Create or update companies. Percent-encode reserved characters in the id. No body. A request without an id (DELETE /api/v0/companies/) answers 404.

curl -X DELETE 'https://releva.ai/api/v0/companies/DEMO-1001' \
-H "authorization: Bearer $RELEVA_SECRET_KEY" \
-H 'content-type: application/json'

202 Accepted with the body {}. The deletion is queued, and the company leaves Data Platform › Companies shortly after. An unknown id also answers 202. Sending the company again with Create or update companies brings it back.

Errors have one shape, { "message": "..." }.

Status When Message
400 No authorization header Authorization header is missing.
400 The header is not Bearer <token> Authorization header is malformed. It should look like `Bearer <string>`.
400 The token is not a UUID Authorization header contains an invalid Bearer token.
400 No shop has this key Domain with the provided secret key cannot be found.
402 The shop is disabled Domain is disabled. Please reach out to support@releva.ai to enable it.
500 Unexpected error An internal error occurred. Retry later.
  • One company per request.
  • Rate limits: none on this endpoint.