Create contact

Add a customer or supplier with name, email and organisation number.

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

write

Adds one contact to Fiken and returns its contact_id and, for a customer, the customer number Fiken assigns. Run list_contacts first so you do not create a duplicate. create_contact runs without asking first: it sends nothing to anyone, books nothing, and the contact can be edited in Fiken afterwards.

Parameters

Parameters: create_contact
NameTypeDescription
name string required string Contact name, up to 200 characters.
role enum enum customer or supplier. Default: customer.
email string string Email address for invoices.
organisation_number string string Organisation number from Brønnøysundregistrene.
phone_number string string Phone number, needed to send invoices by SMS.

Request

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

Example response

JSON

{
  "contact_id": 4021190,
  "name": "Fjord Studio AS",
  "organisation_number": "987654321",
  "email": "faktura@fjord.example",
  "customer_number": 10004,
  "supplier_number": null
}

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.