Create a Conversive Account
Use createConversiveAccount() during onboarding when the org is not yet linked to an existing Conversive account.
What this API does
If successful, this method:
- provisions a new Conversive account
- returns a response wrapper with status information
- includes a detailed
valuepayload - sends an email to the logged-in user’s email address with the API key
That API key is then used in upsertEnvironmentSettings().
Method signature
Inputs
This API takes no input parameters.
Response type
Response fields
value payload structure
The Confluence page documents the value field as serialized JSON with these fields:
Example
Example success response
Example value payload
Example error response
Error handling guidance
Documented error behavior
The page documents the following error pattern:
response = 'ERROR'responseMessageexplains the failurevaluemay still contain diagnostic fields such as:statusCoderesponseCodemessagerawBody
What a developer should do
- inspect both
responseMessageandvalue - log the raw
valuepayload during troubleshooting - confirm the logged-in user has a valid email address
- check the inbox of the logged-in user for the API key email after success
Recommended onboarding flow
Call createConversiveAccount()
Run this only if the org is not already linked to a Conversive account.
Best practices
- call this method once per org onboarding flow
- do not call it repeatedly if the account already exists
- keep the returned
valuepayload for diagnostics - configure the environment immediately after receiving the API key
