account
Manage Brevo account details, senders, domains, and folders to configure marketing automation settings.
Instructions
Account management - get account info, manage senders, domains, folders
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Account operation to perform | |
| senderId | No | Sender ID for sender operations | |
| senderData | No | Sender information | |
| domain | No | Domain name for domain operations | |
| folderId | No | Folder ID for folder operations | |
| folderData | No | Folder information |
Implementation Reference
- The handler function for getting account information, matching the 'get_account' operation called in the test.public async getAccount (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetAccount; }> { const localVarPath = this.basePath + '/account'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; (<any>Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'GET', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; let authenticationPromise = Promise.resolve(); if (this.authentications.apiKey.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); } if (this.authentications.partnerKey.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (<any>localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.IncomingMessage; body: GetAccount; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { body = ObjectSerializer.deserialize(body, "GetAccount"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); }
- Input/output schema for the account information response./** * Brevo API * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * The version of the OpenAPI document: 3.0.0 * Contact: contact@brevo.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { RequestFile } from './models'; import { GetAccountAllOfMarketingAutomation } from './getAccountAllOfMarketingAutomation'; import { GetAccountAllOfPlan } from './getAccountAllOfPlan'; import { GetAccountAllOfRelay } from './getAccountAllOfRelay'; import { GetExtendedClientAllOfAddress } from './getExtendedClientAllOfAddress'; export class GetAccount { /** * Login Email */ 'email': string; /** * First Name */ 'firstName': string; /** * Last Name */ 'lastName': string; /** * Name of the company */ 'companyName': string; 'address': GetExtendedClientAllOfAddress; /** * Information about your plans and credits */ 'plan': Array<GetAccountAllOfPlan>;
- Additional handler for account activity logs.public async getAccountActivity (startDate?: string, endDate?: string, limit?: number, offset?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GetAccountActivity; }> { const localVarPath = this.basePath + '/organization/activities'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { localVarHeaderParams.Accept = 'application/json'; } else { localVarHeaderParams.Accept = produces.join(','); } let localVarFormParams: any = {}; if (startDate !== undefined) { localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string"); } if (endDate !== undefined) { localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string"); } if (limit !== undefined) { localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); } if (offset !== undefined) { localVarQueryParameters['offset'] = ObjectSerializer.serialize(offset, "number"); } (<any>Object).assign(localVarHeaderParams, options.headers); let localVarUseFormData = false; let localVarRequestOptions: localVarRequest.Options = { method: 'GET', qs: localVarQueryParameters, headers: localVarHeaderParams, uri: localVarPath, useQuerystring: this._useQuerystring, json: true, }; let authenticationPromise = Promise.resolve(); if (this.authentications.apiKey.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.apiKey.applyToRequest(localVarRequestOptions)); } if (this.authentications.partnerKey.apiKey) { authenticationPromise = authenticationPromise.then(() => this.authentications.partnerKey.applyToRequest(localVarRequestOptions)); } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; for (const interceptor of this.interceptors) { interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); } return interceptorPromise.then(() => { if (Object.keys(localVarFormParams).length) { if (localVarUseFormData) { (<any>localVarRequestOptions).formData = localVarFormParams; } else { localVarRequestOptions.form = localVarFormParams; } } return new Promise<{ response: http.IncomingMessage; body: GetAccountActivity; }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { body = ObjectSerializer.deserialize(body, "GetAccountActivity"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); } } }); }); }); }
- Schema for account activity response./** * Brevo API * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * The version of the OpenAPI document: 3.0.0 * Contact: contact@brevo.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { RequestFile } from './models'; import { GetAccountActivityLogsInner } from './getAccountActivityLogsInner'; export class GetAccountActivity { /** * Get user activity logs */ 'logs'?: Array<GetAccountActivityLogsInner>; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { "name": "logs", "baseName": "logs", "type": "Array<GetAccountActivityLogsInner>" } ];
- node_modules/@getbrevo/brevo/api/apis.ts:1-66 (registration)Exports all API classes including AccountApi, likely used for tool registration.export * from './accountApi'; import { AccountApi } from './accountApi'; export * from './companiesApi'; import { CompaniesApi } from './companiesApi'; export * from './contactsApi'; import { ContactsApi } from './contactsApi'; export * from './conversationsApi'; import { ConversationsApi } from './conversationsApi'; export * from './couponsApi'; import { CouponsApi } from './couponsApi'; export * from './dealsApi'; import { DealsApi } from './dealsApi'; export * from './domainsApi'; import { DomainsApi } from './domainsApi'; export * from './ecommerceApi'; import { EcommerceApi } from './ecommerceApi'; export * from './emailCampaignsApi'; import { EmailCampaignsApi } from './emailCampaignsApi'; export * from './eventsApi'; import { EventsApi } from './eventsApi'; export * from './externalFeedsApi'; import { ExternalFeedsApi } from './externalFeedsApi'; export * from './filesApi'; import { FilesApi } from './filesApi'; export * from './inboundParsingApi'; import { InboundParsingApi } from './inboundParsingApi'; export * from './masterAccountApi'; import { MasterAccountApi } from './masterAccountApi'; export * from './notesApi'; import { NotesApi } from './notesApi'; export * from './paymentsApi'; import { PaymentsApi } from './paymentsApi'; export * from './processApi'; import { ProcessApi } from './processApi'; export * from './resellerApi'; import { ResellerApi } from './resellerApi'; export * from './sMSCampaignsApi'; import { SMSCampaignsApi } from './sMSCampaignsApi'; export * from './sendersApi'; import { SendersApi } from './sendersApi'; export * from './tasksApi'; import { TasksApi } from './tasksApi'; export * from './transactionalEmailsApi'; import { TransactionalEmailsApi } from './transactionalEmailsApi'; export * from './transactionalSMSApi'; import { TransactionalSMSApi } from './transactionalSMSApi'; export * from './transactionalWhatsAppApi'; import { TransactionalWhatsAppApi } from './transactionalWhatsAppApi'; export * from './userApi'; import { UserApi } from './userApi'; export * from './webhooksApi'; import { WebhooksApi } from './webhooksApi'; export * from './whatsAppCampaignsApi'; import { WhatsAppCampaignsApi } from './whatsAppCampaignsApi'; import * as http from 'http'; export class HttpError extends Error { constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) { super('HTTP request failed'); this.name = 'HttpError'; } } export { RequestFile } from '../model/models'; export const APIS = [AccountApi, CompaniesApi, ContactsApi, ConversationsApi, CouponsApi, DealsApi, DomainsApi, EcommerceApi, EmailCampaignsApi, EventsApi, ExternalFeedsApi, FilesApi, InboundParsingApi, MasterAccountApi, NotesApi, PaymentsApi, ProcessApi, ResellerApi, SMSCampaignsApi, SendersApi, TasksApi, TransactionalEmailsApi, TransactionalSMSApi, TransactionalWhatsAppApi, UserApi, WebhooksApi, WhatsAppCampaignsApi];