DELETE
Remove a profile from a company
- Path
/roles/{companyId}/{emailOrPhone}- Auth
- Secret key · server only
DELETE
/roles/{companyId}/{emailOrPhone}
const url = 'https://releva.ai/api/v0/roles/DEMO-CO-1001/maria%40example.com';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://releva.ai/api/v0/roles/DEMO-CO-1001/maria%40example.com \ --header 'Authorization: Bearer <token>'Removes the role that links the profile to the company. The profile and the company are kept.
emailOrPhone is read as an email if it contains @, otherwise as a phone number, and must match the
stored value exactly. If no profile matches, nothing changes and the response is still 202.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”companyId
required
string
Example
DEMO-CO-1001emailOrPhone
required
string
Email address or phone number (+ and digits; send + as is or as %2B).
Examples
maria@example.com+15555550123Responses
Section titled “Responses”Accepted for asynchronous processing.
Media typeapplication/json
object
Example
{}Authorization header missing, malformed, not a UUID, or unknown.
Media typeapplication/json
object
message
required
Human-readable error. Several validation errors are joined with a space.
string
Examples
{ "message": "Authorization header is missing."}{ "message": "Authorization header is malformed. It should look like `Bearer <string>`."}{ "message": "Authorization header contains an invalid Bearer token."}{ "message": "Domain with the provided secret key cannot be found."}The domain is disabled.
Media typeapplication/json
object
message
required
Human-readable error. Several validation errors are joined with a space.
string
Example
{ "message": "Domain is disabled. Please reach out to support@releva.ai to enable it."}Unexpected server error.
Media typeapplication/json
object
message
required
Human-readable error. Several validation errors are joined with a space.
string
Example
{ "message": "An internal error occurred."}