# How do I create an Agentline NZ API key?

**Short answer:** Create a key under Dashboard → API keys in your Agentline NZ dashboard, then send it as Authorization: Bearer al_live_… with every request. The same key works for the REST API at https://agentline.nz/api/v1 and for the MCP server at https://agentline.nz/mcp, and you can have up to 10 keys.

## Steps

1. **Open API keys.** Sign in to your Agentline NZ dashboard and go to API keys.

2. **Create a key.** Create a new key, give it a name that says where it's used, and copy it. Store it in an environment variable such as AGENTLINE_KEY.

3. **Test it.** Call the /me endpoint to check the key works.

   ```bash
   curl https://agentline.nz/api/v1/me -H "Authorization: Bearer $AGENTLINE_KEY"
   ```

## Good to know

- Anyone with the key can act as your account, so keep it out of code you commit.
- Revoke keys you no longer use. You're responsible for anything done with them.

## FAQ

### Is there an OpenAPI spec?

Yes, at https://agentline.nz/api/v1/openapi.json.

## Related

- [Connect the OpenAI Agents SDK to a NZ phone number, SMS and email](/integrations/openai-agents-sdk)
- [Connect LangChain and LangGraph agents to a NZ phone number, SMS and email](/integrations/langchain)
- [How does wait_for_code get one-time codes for my agent?](/help/how-wait-for-code-works)

[Start free](https://agentline.nz/signup) · Start free with an email inbox (no card), or take a 7-day trial of Starter or Pro to get a number.
