Create Agent
agent_createCreate a new agent with optional metadata, and optionally attach an initial address. Use this when provisioning a new sending identity or automation actor. To add more addresses later, use agent_update. Pass idempotencyKey to make retries safe — same key + same body returns the original response, same key + different body returns IDEMPOTENCY_BODY_MISMATCH 409.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Agent display name | |
| slug | No | URL-friendly unique identifier (lowercase alphanumeric + hyphens, 2-64 chars). Auto-derived from name if omitted. | |
| No | Optional email address to provision for this agent | ||
| address | No | Optional initial postal address to attach to the agent on creation. To add more addresses later, use agent_update. | |
| metadata | No | Optional agent metadata as key-value string pairs | |
| idempotencyKey | No | Optional Idempotency-Key. Send the SAME key on retries of the SAME create payload to guarantee exactly-once provisioning even if the network drops mid-flight. Reuse with a different body returns IDEMPOTENCY_BODY_MISMATCH 409. Keys are scoped per-credential, ASCII-printable 1-255 chars (Stripe convention). Server caches the response for 24h. Note: the idempotency guarantee covers the agent record only — if a subsequent address attachment fails, the agent will still exist. | |
| provisionPhone | No | Whether to auto-provision a phone number for this agent |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||