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

# API Keys

> Generate and manage API keys to connect external systems with Valuez AI.

API keys allow external applications, automation tools, and custom integrations to communicate securely with Valuez AI. Every API request must include a valid key to be authorized.

***

## Generating an API Key

<Steps>
  <Step title="Open Settings">
    In your Valuez AI dashboard, click **Settings** in the left sidebar.
  </Step>

  <Step title="Go to API Keys">
    Select **API Keys** from the settings menu.
  </Step>

  <Step title="Create a new key">
    Click **"Generate New Key"** or **"Create API Key"** (exact button name may vary).
  </Step>

  <Step title="Name your key">
    Give it a descriptive label so you know what it's used for - e.g. `CRM Integration`, `Zapier Automation`, or `Production App`.
  </Step>

  <Step title="Copy and store it securely">
    Copy the key immediately. For security reasons, **the full key is only shown once**. Store it in a secure location before closing the window.
  </Step>
</Steps>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/wayofworshipinfotechpvtltd/images/api-keys.png" alt="API Keys Screen" />
</Frame>

<Warning>
  Once you close the key creation dialog, you cannot view the full key again. If you lose it, you'll need to revoke it and generate a new one.
</Warning>

***

## Using Your API Key

Include your API key in the `Authorization` header of every API request:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.valuez.ai/v1/agents" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.valuez.ai/v1/agents",
      headers={"Authorization": "Bearer YOUR_API_KEY"}
  )

  print(response.json())
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.valuez.ai/v1/agents", {
    headers: {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  });

  const data = await response.json();
  ```
</CodeGroup>

***

## Managing Existing Keys

From the **Settings → API Keys** screen you can:

| Action               | How                                                                                  |
| -------------------- | ------------------------------------------------------------------------------------ |
| **Rename a key**     | Click the edit icon next to the key name                                             |
| **Revoke a key**     | Click **Delete** or **Revoke** - this immediately blocks all requests using that key |
| **Regenerate a key** | Revoke the old one and create a new key with the same label                          |

<Warning>
  Revoking a key is immediate and cannot be undone. Any system using that key will lose access instantly. Update your integration with the new key before revoking the old one.
</Warning>

***

## Security Best Practices

<AccordionGroup>
  <Accordion title="Never expose keys in frontend code">
    API keys must only be used server-side. Never include them in JavaScript that runs in a browser - they can be extracted and misused.
  </Accordion>

  <Accordion title="Use environment variables">
    Store keys in environment variables, not hardcoded in your codebase:

    ```bash theme={null}
        export VALUEZ_API_KEY="your-key-here"
    ```
  </Accordion>

  <Accordion title="Create one key per integration">
    Use a separate key for each system - CRM, automation tool, production app. This way, if one is compromised, you revoke only that key without breaking everything else.
  </Accordion>

  <Accordion title="Revoke unused keys">
    Regularly audit your API Keys list and revoke any keys that are no longer in use.
  </Accordion>
</AccordionGroup>

***

## Common Integration Use Cases

| Integration               | What It Does                                              |
| ------------------------- | --------------------------------------------------------- |
| **CRM**                   | Auto-create or update leads after every call completes    |
| **Calendar / Scheduling** | Sync appointment bookings made by your AI agent           |
| **Zapier / Make**         | Trigger no-code automation workflows on call events       |
| **Custom Application**    | Build internal tools that read call logs or manage agents |
| **Analytics Platform**    | Push call data into your BI or reporting tools            |

For step-by-step integration guides, see [Integrations](/guides/platform/integrations).

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="lock" href="/guides/getting-started/authentication">
    Understand how API authentication works and security best practices.
  </Card>

  <Card title="Integrations" icon="plug" href="/guides/platform/integrations">
    Connect Valuez AI with your CRM, calendar, and automation tools.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/guides/core-concepts/webhooks">
    Receive real-time event notifications when calls complete or agents take action.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference">
    Full endpoint documentation once your API is published.
  </Card>
</CardGroup>
