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
| Name | Type | Description |
|---|---|---|
| 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 -X POST https://cotlet.dev/api/v1/fiken/contacts \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe"}' result = client.call("fiken", "create_contact", {"name":"Jane Doe"}) const result = await cotlet.call('fiken', 'create_contact', {"name":"Jane Doe"}); cotlet call fiken create_contact --data '{"name":"Jane Doe"}' Example response
{
"contact_id": 4021190,
"name": "Fjord Studio AS",
"organisation_number": "987654321",
"email": "faktura@fjord.example",
"customer_number": 10004,
"supplier_number": null
}