> ## Documentation Index
> Fetch the complete documentation index at: https://docs.briq.tz/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with BRIQ SMS API integration in minutes

Get started in three steps. Set up the BRIQ SMS API and send your first message.

## Step 1: Set up your local environment

<AccordionGroup>
  <Accordion icon="key" title="Obtain and store your API key">
    Log into your [BRIQ dashboard](https://karibu.briq.tz) and navigate to Settings → API Keys → Generate New Key to get your API key. Store it securely in environment variables:

    ```bash theme={null}
    export BRIQ_API_KEY="your_api_key_here"
    ```

    <Tip>Never hardcode your API key in source code. Use environment variables for security.</Tip>
  </Accordion>

  <Accordion icon="rectangle-terminal" title="Set up your development environment">
    Ensure you have an HTTP client installed (e.g., axios for Node.js, requests for Python, or PHP cURL). Configure the BRIQ API base URL:

    ```plaintext theme={null}
    Base URL: https://karibu.briq.tz
    ```
  </Accordion>
</AccordionGroup>

## Step 2: Integrate the API

<AccordionGroup>
  <Accordion icon="code" title="Choose your programming language">
    Install the required HTTP client for your language:

    * Node.js: `npm install axios`
    * Python: `pip install requests`
    * PHP: Ensure the cURL extension is enabled (`php -m | grep curl`)

    Create a simple BRIQ client. For example, in Node.js:

    ```javascript theme={null}
    const axios = require('axios');
    class BriqClient {
      constructor(apiKey) {
        this.apiKey = apiKey;
        this.baseURL = 'https://briq.tz';
        this.headers = { 'X-API-Key': apiKey, 'Content-Type': 'application/json' };
      }
      async sendSMS(content, recipients, senderId = 'BRIQ') {
        const response = await axios.post(`${this.baseURL}/v1/message/send-instant`, {
          content, recipients, sender_id: senderId
        }, { headers: this.headers });
        return response.data;
      }
    }
    ```

    <Tip>Explore similar examples for Python and PHP in the <a href="https://docs.briq.tz">BRIQ documentation</a>.</Tip>
  </Accordion>

  <Accordion icon="message" title="Send a test message">
    Use your client to send a test SMS:

    ```javascript theme={null}
    const briq = new BriqClient(process.env.BRIQ_API_KEY);
    briq.sendSMS('Hello from BRIQ!', ['255788344348'])
      .then(result => console.log('Success:', result))
      .catch(error => console.error('Error:', error));
    ```

    Or with cURL:

    ```bash theme={null}
    curl -X POST https://karibu.briq.tz/v1/message/send-instant \
      -H "Content-Type: application/json" \
      -H "X-API-Key: your_api_key_here" \
      -d '{"content": "BRIQ API test message", "recipients": ["255788344348"], "sender_id": "BRIQ"}'
    ```

    <Tip>Check the response to confirm the message was sent successfully.</Tip>
  </Accordion>
</AccordionGroup>

## Step 3: Go live

<Accordion icon="rocket" title="Deploy and monitor your integration">
  1. Save your code and environment variables (e.g., in a `.env` file):

     ```bash theme={null}
     BRIQ_API_KEY=your_production_api_key
     BRIQ_BASE_URL=https://karibu.briq.tz
     BRIQ_DEFAULT_SENDER=YOURCOMPANY
     ```

  2. Deploy your application to your production environment.

  3. Monitor message delivery using the BRIQ dashboard, or configure an **SMS webhook** on your developer app in the console so Briq can POST events to your HTTPS URL. See the [Webhooks](/guides/webhooks) guide for the request format, headers, and signature verification.
</Accordion>

## Next steps

Now that your BRIQ SMS API is integrated, explore these key features:

<CardGroup cols={2}>
  <Card title="Create Workspaces" icon="folder" href="/guides/workspaces">
    Organize your SMS projects with workspaces.
  </Card>

  <Card title="Set Up Campaigns" icon="bullhorn" href="/guides/campaigns">
    Plan and structure your messaging initiatives.
  </Card>

  <Card title="Import Recipients" icon="users" href="/guides/messaging">
    Add and manage contact lists for SMS campaigns.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/guides/webhooks">
    Receive SMS delivery and submit events on your HTTPS endpoint.
  </Card>

  <Card title="API Reference" icon="code" href="/Karibu-Health/index">
    Explore the full OpenAPI specification and endpoint documentation.
  </Card>
</CardGroup>

<Note>
  Need help? Visit the <a href="https://docs.briq.tz">BRIQ documentation</a> or contact <a href="mailto:support@briq.tz">[support@briq.tz](mailto:support@briq.tz)</a>.
</Note>
