The main provider component that wraps your application and provides context for all other components.

import { SimpuProvider } from "@simpu/mail-sdk";

function App() {
  return (
    <SimpuProvider
      apiUrl="https://api.simpu.co"
      accessToken="your-access-token"
      organisationID="your-organisation-id"
    >
      {/* Your app components */}
    </SimpuProvider>
  );
}

Always wrap your app with the SimpuProvider - This ensures all components and hooks have access to the necessary Simpu API context.

Props

apiUrl
string
required

The base URL for the Simpu API

accessToken
string
required

Your authentication token

organisationID
string
required

Your organisation ID