Get account details
const url = 'https://api.gopromptless.ai/v1/account';const options = {method: 'GET', 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 GET \ --url https://api.gopromptless.ai/v1/account \ --header 'Authorization: Bearer <token>'Return the organization associated with your API key. Use it to test a connection and label the account. org_name is null for an organization created before names were recorded.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The organization associated with the API key.
The organization associated with the API key.
object
Identifier of the organization the API key belongs to.
Display name of the organization, or null if none was recorded.
Example
{ "org_id": "org_2b5f9c1e", "org_name": "Acme, Inc."}The API key is missing, invalid, or revoked.
Error body returned when an API trigger request is rejected.
object
Stable machine-readable error code.
Human-readable explanation of the error.
Example
{ "error": "authentication_failed", "message": "Authentication failed."}The read store is temporarily unavailable (runtime_store_unavailable).
Error body returned when an API trigger request is rejected.
object
Stable machine-readable error code.
Human-readable explanation of the error.
Example
{ "error": "authentication_failed", "message": "Authentication failed."}