pylon_create_contact
Add new customer contacts to Pylon for support requests and portal access by providing email, name, and role details.
Instructions
Create a new customer contact in Pylon. Use this when adding a new customer who will submit support requests or access your customer portal.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | Contact email address. Must be valid email format. Example: "sarah@company.com" | ||
| name | Yes | Full name of the contact. Example: "Sarah Johnson" | |
| portal_role | No | Role in customer portal: "admin", "member", "viewer". Determines access level. Example: "member" |
Implementation Reference
- src/index.ts:394-405 (handler)Handler for the 'pylon_create_contact' tool - validates arguments are provided and calls pylonClient.createContact(), returning the created contact as JSON
case 'pylon_create_contact': { if (!args) throw new Error('Arguments required for creating contact'); const contact = await pylonClient.createContact(args as any); return { content: [ { type: 'text', text: JSON.stringify(contact, null, 2), }, ], }; } - src/index.ts:55-67 (schema)Tool registration and schema definition for 'pylon_create_contact' - defines the tool name, description, and input schema with email (required), name (required), and portal_role (optional) parameters
{ name: 'pylon_create_contact', description: 'Create a new customer contact in Pylon. Use this when adding a new customer who will submit support requests or access your customer portal.', inputSchema: { type: 'object', properties: { email: { type: 'string', description: 'Contact email address. Must be valid email format. Example: "sarah@company.com"' }, name: { type: 'string', description: 'Full name of the contact. Example: "Sarah Johnson"' }, portal_role: { type: 'string', description: 'Role in customer portal: "admin", "member", "viewer". Determines access level. Example: "member"' }, }, required: ['email', 'name'], }, }, - src/pylon-client.ts:109-112 (helper)PylonClient method that makes the actual API POST request to /contacts endpoint to create a new contact in the Pylon API
async createContact(contact: Omit<PylonContact, 'id'>): Promise<PylonContact> { const response: AxiosResponse<PylonContact> = await this.client.post('/contacts', contact); return response.data; } - src/pylon-client.ts:15-20 (schema)TypeScript interface defining the PylonContact data structure with id, email, name, and optional portal_role fields
export interface PylonContact { id: string; email: string; name: string; portal_role?: string; }