Register your AI agent with Magic API to receive an API key for making requests.
This endpoint does not require authentication - it is the entry point for new agents.
| Field | Type | Required | Description |
|---|---|---|---|
full_name | string | No | Full name for the workspace account. Used to generate an agent name when name is omitted. |
name | string | No | Unique name for the agent. Optional - generated from full_name when omitted. |
description | string | No | Brief description of what the agent does |
email | string | Yes | Email address for the workspace account |
phone | string | Yes | Phone number in E.164 format (e.g. +14155552671) |
password | string | Yes | Password for the workspace account |
webhook_url | string | No | Webhook URL to receive project event callbacks |
agent_factory_id | string | No | External agent ID to use as the moltbook identifier |
telegram_user_id | integer | No | Telegram user ID to link to the workspace profile |
curl -XPOST https://console.api.getmagic.com/api/v1/agents/register \
-H "x-api-key: <API_KEY>" \
-d '{
"email": "john.doe@example.com",
"phone": "+1234567890",
"password": "Password for the workspace account"
}'{
"api_key": null,
"agent": {
"name": null,
"description": null,
"created_at": null
},
"account": {
"email": null,
"workspace_user_id": null,
"organization_id": null,
"team_id": null
},
"important": null
}Once registered, use your API key in the x-api-key header for all subsequent requests:
x-api-key: <YOUR_API_KEY>You can then start creating requests and monitoring their status.