Create contact

Add a client, a supplier or both to Contactos.

POST https://cotlet.dev/api/v1/alegra/contacts

write Confirm

Creates a contact the way + Nuevo Contacto does and returns its contact_id. It sends nothing to the person. Call list_contacts first: Alegra does not stop two contacts with the same name, and a duplicate has to be deleted by hand in Contactos. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: create_contact
NameTypeDescription
name string required string Full name or company name.
identification string string Tax or identification number.
kind enum enum client, supplier or both. Default: client.
email string string Address invoices are emailed to.
mobile string string Mobile number.
city string string City.
address string string Street address.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/alegra/contacts \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane Doe"}'
Python
result = client.call("alegra", "create_contact", {"name":"Jane Doe"})
Node.js
const result = await cotlet.call('alegra', 'create_contact', {"name":"Jane Doe"});
CLI
cotlet call alegra create_contact --data '{"name":"Jane Doe"}'

Example response

JSON

{
  "contact_id": "41",
  "name": "Harbor Cafe",
  "identification": "900765432",
  "kind": "client",
  "email": "billing@harborcafe.example",
  "created": true
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.