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

# DialNexa API Key Rotation

> Rotate DialNexa API keys with immediate expiration or a 24 hour grace period, update external systems, and verify traffic before deleting old access.

DialNexa API key rotation creates a new key and lets users decide what happens to the previous key. When a workspace already has keys, the create flow asks whether to expire the previous key now or in 24 hours.

<Tip>
  The 24 hour option exists for migrations. The now option exists for confidence or emergencies.
</Tip>

## Rotation Choices

Pick the option that matches risk.

| Choice                          | Use when                                                      |
| ------------------------------- | ------------------------------------------------------------- |
| Expire previous key now         | The old key is compromised or no system should keep using it. |
| Expire previous key in 24 hours | You need time to update external systems safely.              |
| Cancel                          | You are not ready to store and deploy the new key.            |

## Rotate Without Breaking Integrations

<Steps>
  <Step title="Create the new key">
    Name it by system and date or environment.
  </Step>

  <Step title="Store it securely">
    Put the raw value in your secret manager while it is visible.
  </Step>

  <Step title="Update external systems">
    Replace the old key in services, jobs, or apps.
  </Step>

  <Step title="Verify calls succeed">
    Confirm API traffic works with the new key.
  </Step>

  <Step title="Remove old access">
    Use immediate expiration or wait for the grace period to end.
  </Step>
</Steps>

## Rotation Incidents

<AccordionGroup>
  <Accordion title="New key was not copied">
    Create another key and rotate again.
  </Accordion>

  <Accordion title="Old system still uses previous key">
    Use the 24 hour window for controlled migration.
  </Accordion>

  <Accordion title="Wrong workspace key">
    Check organization context before rotating.
  </Accordion>

  <Accordion title="Webhook verification broke">
    Webhook secrets rotate separately from API keys.
  </Accordion>
</AccordionGroup>

## Related Reading

<CardGroup cols={2}>
  <Card title="API Keys" icon="key" href="/api-access/api-keys">
    Create keys.
  </Card>

  <Card title="Webhook Secrets" icon="key-round" href="/api-access/webhook-secrets">
    Rotate event secrets separately.
  </Card>

  <Card title="Troubleshooting" icon="life-buoy" href="/reference/troubleshooting">
    Debug auth issues.
  </Card>
</CardGroup>
