Skip to main content
POST
/
clients
Create Client
curl --request POST \
  --url https://api.everhour.com/clients \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "name": "Client Name",
  "projects": [
    "<string>"
  ],
  "lineItemMask": "<string>",
  "defaultTax": {
    "id": 123,
    "rate": 123
  },
  "defaultDiscount": 123,
  "paymentDueDays": 123,
  "reference": "<string>",
  "invoicePublicNotes": "<string>",
  "businessDetails": "<string>",
  "billingDetails": {
    "companyName": "<string>",
    "vatNumber": "<string>",
    "addressLine1": "<string>",
    "addressLine2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postcode": "<string>",
    "country": "<string>",
    "contactName": "<string>",
    "contactPhone": "<string>",
    "contactEmail": "<string>",
    "peppolEndpointId": "<string>",
    "peppolEndpointScheme": "<string>",
    "peppolMeansCode": "<string>",
    "bankAccountNumber": "<string>",
    "bankAccountRoutingNumber": "<string>",
    "bankAccountHolderName": "<string>"
  },
  "excludedLabels": [
    "<string>"
  ],
  "email": [
    "<string>"
  ]
}
'
import requests

url = "https://api.everhour.com/clients"

payload = {
"name": "Client Name",
"projects": ["<string>"],
"lineItemMask": "<string>",
"defaultTax": {
"id": 123,
"rate": 123
},
"defaultDiscount": 123,
"paymentDueDays": 123,
"reference": "<string>",
"invoicePublicNotes": "<string>",
"businessDetails": "<string>",
"billingDetails": {
"companyName": "<string>",
"vatNumber": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"country": "<string>",
"contactName": "<string>",
"contactPhone": "<string>",
"contactEmail": "<string>",
"peppolEndpointId": "<string>",
"peppolEndpointScheme": "<string>",
"peppolMeansCode": "<string>",
"bankAccountNumber": "<string>",
"bankAccountRoutingNumber": "<string>",
"bankAccountHolderName": "<string>"
},
"excludedLabels": ["<string>"],
"email": ["<string>"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Client Name',
projects: ['<string>'],
lineItemMask: '<string>',
defaultTax: {id: 123, rate: 123},
defaultDiscount: 123,
paymentDueDays: 123,
reference: '<string>',
invoicePublicNotes: '<string>',
businessDetails: '<string>',
billingDetails: {
companyName: '<string>',
vatNumber: '<string>',
addressLine1: '<string>',
addressLine2: '<string>',
city: '<string>',
state: '<string>',
postcode: '<string>',
country: '<string>',
contactName: '<string>',
contactPhone: '<string>',
contactEmail: '<string>',
peppolEndpointId: '<string>',
peppolEndpointScheme: '<string>',
peppolMeansCode: '<string>',
bankAccountNumber: '<string>',
bankAccountRoutingNumber: '<string>',
bankAccountHolderName: '<string>'
},
excludedLabels: ['<string>'],
email: ['<string>']
})
};

fetch('https://api.everhour.com/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.everhour.com/clients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Client Name',
'projects' => [
'<string>'
],
'lineItemMask' => '<string>',
'defaultTax' => [
'id' => 123,
'rate' => 123
],
'defaultDiscount' => 123,
'paymentDueDays' => 123,
'reference' => '<string>',
'invoicePublicNotes' => '<string>',
'businessDetails' => '<string>',
'billingDetails' => [
'companyName' => '<string>',
'vatNumber' => '<string>',
'addressLine1' => '<string>',
'addressLine2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'postcode' => '<string>',
'country' => '<string>',
'contactName' => '<string>',
'contactPhone' => '<string>',
'contactEmail' => '<string>',
'peppolEndpointId' => '<string>',
'peppolEndpointScheme' => '<string>',
'peppolMeansCode' => '<string>',
'bankAccountNumber' => '<string>',
'bankAccountRoutingNumber' => '<string>',
'bankAccountHolderName' => '<string>'
],
'excludedLabels' => [
'<string>'
],
'email' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.everhour.com/clients"

payload := strings.NewReader("{\n \"name\": \"Client Name\",\n \"projects\": [\n \"<string>\"\n ],\n \"lineItemMask\": \"<string>\",\n \"defaultTax\": {\n \"id\": 123,\n \"rate\": 123\n },\n \"defaultDiscount\": 123,\n \"paymentDueDays\": 123,\n \"reference\": \"<string>\",\n \"invoicePublicNotes\": \"<string>\",\n \"businessDetails\": \"<string>\",\n \"billingDetails\": {\n \"companyName\": \"<string>\",\n \"vatNumber\": \"<string>\",\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postcode\": \"<string>\",\n \"country\": \"<string>\",\n \"contactName\": \"<string>\",\n \"contactPhone\": \"<string>\",\n \"contactEmail\": \"<string>\",\n \"peppolEndpointId\": \"<string>\",\n \"peppolEndpointScheme\": \"<string>\",\n \"peppolMeansCode\": \"<string>\",\n \"bankAccountNumber\": \"<string>\",\n \"bankAccountRoutingNumber\": \"<string>\",\n \"bankAccountHolderName\": \"<string>\"\n },\n \"excludedLabels\": [\n \"<string>\"\n ],\n \"email\": [\n \"<string>\"\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.everhour.com/clients")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Client Name\",\n \"projects\": [\n \"<string>\"\n ],\n \"lineItemMask\": \"<string>\",\n \"defaultTax\": {\n \"id\": 123,\n \"rate\": 123\n },\n \"defaultDiscount\": 123,\n \"paymentDueDays\": 123,\n \"reference\": \"<string>\",\n \"invoicePublicNotes\": \"<string>\",\n \"businessDetails\": \"<string>\",\n \"billingDetails\": {\n \"companyName\": \"<string>\",\n \"vatNumber\": \"<string>\",\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postcode\": \"<string>\",\n \"country\": \"<string>\",\n \"contactName\": \"<string>\",\n \"contactPhone\": \"<string>\",\n \"contactEmail\": \"<string>\",\n \"peppolEndpointId\": \"<string>\",\n \"peppolEndpointScheme\": \"<string>\",\n \"peppolMeansCode\": \"<string>\",\n \"bankAccountNumber\": \"<string>\",\n \"bankAccountRoutingNumber\": \"<string>\",\n \"bankAccountHolderName\": \"<string>\"\n },\n \"excludedLabels\": [\n \"<string>\"\n ],\n \"email\": [\n \"<string>\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.everhour.com/clients")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Client Name\",\n \"projects\": [\n \"<string>\"\n ],\n \"lineItemMask\": \"<string>\",\n \"defaultTax\": {\n \"id\": 123,\n \"rate\": 123\n },\n \"defaultDiscount\": 123,\n \"paymentDueDays\": 123,\n \"reference\": \"<string>\",\n \"invoicePublicNotes\": \"<string>\",\n \"businessDetails\": \"<string>\",\n \"billingDetails\": {\n \"companyName\": \"<string>\",\n \"vatNumber\": \"<string>\",\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postcode\": \"<string>\",\n \"country\": \"<string>\",\n \"contactName\": \"<string>\",\n \"contactPhone\": \"<string>\",\n \"contactEmail\": \"<string>\",\n \"peppolEndpointId\": \"<string>\",\n \"peppolEndpointScheme\": \"<string>\",\n \"peppolMeansCode\": \"<string>\",\n \"bankAccountNumber\": \"<string>\",\n \"bankAccountRoutingNumber\": \"<string>\",\n \"bankAccountHolderName\": \"<string>\"\n },\n \"excludedLabels\": [\n \"<string>\"\n ],\n \"email\": [\n \"<string>\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": 4567,
  "name": "Client Name",
  "projects": [
    "ev:1234567890"
  ],
  "businessDetails": "<string>",
  "budget": {
    "type": "money",
    "budget": 100000,
    "period": "general",
    "appliedFrom": "<string>",
    "disallowOverbudget": true,
    "excludeUnbillableTime": true,
    "excludeExpenses": true,
    "threshold": 123,
    "progress": 0
  }
}

Authorizations

X-Api-Key
string
header
required

Body

application/json
name
string
required
Example:

"Client Name"

projects
string[]

Project encoded IDs to assign to the client.

lineItemMask
string

Template for generated invoice line-item names.

defaultTax
object

Default tax for the client's invoices.

defaultDiscount
number

Default discount rate as a percentage (0-100).

paymentDueDays
integer

Default invoice payment term in days (0-365).

reference
string
invoicePublicNotes
string
businessDetails
string
billingDetails
object

Client billing details (all fields optional).

excludedLabels
string[]

Labels excluded from invoicing (max 8).

email
string[]

Invoice recipient email addresses (max 10).

Response

Created

id
number
required
Example:

4567

name
string
required
Example:

"Client Name"

projects
string[]
required

List of projects ID

Example:
["ev:1234567890"]
businessDetails
string | null
budget
object