Start Timer
curl --request POST \
--url https://api.everhour.com/timers \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"task": "ev:9876543210",
"userDate": "2018-01-16",
"comment": "some notes"
}
'import requests
url = "https://api.everhour.com/timers"
payload = {
"task": "ev:9876543210",
"userDate": "2018-01-16",
"comment": "some notes"
}
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({task: 'ev:9876543210', userDate: '2018-01-16', comment: 'some notes'})
};
fetch('https://api.everhour.com/timers', 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/timers",
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([
'task' => 'ev:9876543210',
'userDate' => '2018-01-16',
'comment' => 'some notes'
]),
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/timers"
payload := strings.NewReader("{\n \"task\": \"ev:9876543210\",\n \"userDate\": \"2018-01-16\",\n \"comment\": \"some notes\"\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/timers")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"task\": \"ev:9876543210\",\n \"userDate\": \"2018-01-16\",\n \"comment\": \"some notes\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.everhour.com/timers")
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 \"task\": \"ev:9876543210\",\n \"userDate\": \"2018-01-16\",\n \"comment\": \"some notes\"\n}"
response = http.request(request)
puts response.read_body{
"status": "active",
"duration": 16,
"today": 7200,
"startedAt": "2018-01-16 12:42:59",
"userDate": "2018-01-16",
"comment": "<string>",
"task": {
"id": "ev:9876543210",
"name": "Task Name",
"projects": [
"ev:1234567890"
],
"section": 1234,
"labels": [
"high",
"bug"
],
"position": 1,
"description": "<string>",
"dueAt": "2018-03-05 16:00:00",
"status": "open",
"time": {
"total": 7200,
"users": {
"1304": 3600,
"1543": 3600
}
},
"estimate": {
"total": 7200,
"type": "overall",
"users": {
"1304": 3600,
"1543": 3600
}
},
"attributes": {
"Client": "Everhour",
"Priority": "high"
},
"metrics": {
"efforts": 42,
"expenses": 199
},
"unbillable": true
},
"user": {
"id": 1304,
"name": "User Name",
"role": "admin",
"status": "active",
"headline": "CEO",
"avatarUrl": "<string>",
"phone": "<string>",
"capacity": 123,
"avatarUrlLarge": "<string>"
},
"currentTaskTime": {
"id": 2660155,
"time": 3600,
"user": 1304,
"date": "2018-01-20",
"task": {
"id": "ev:9876543210",
"name": "Task Name",
"projects": [
"ev:1234567890"
],
"section": 1234,
"labels": [
"high",
"bug"
],
"position": 1,
"description": "<string>",
"dueAt": "2018-03-05 16:00:00",
"status": "open",
"time": {
"total": 7200,
"users": {
"1304": 3600,
"1543": 3600
}
},
"estimate": {
"total": 7200,
"type": "overall",
"users": {
"1304": 3600,
"1543": 3600
}
},
"attributes": {
"Client": "Everhour",
"Priority": "high"
},
"metrics": {
"efforts": 42,
"expenses": 199
},
"unbillable": true
},
"isLocked": false,
"isInvoiced": false,
"comment": "some notes"
},
"website": {
"url": "<string>",
"title": "<string>"
}
}Timers
Start Timer
Start a timer for the authenticated user on a given task.
Only one timer can run per user at a time. If the user already has a timer running on another task, that timer is stopped automatically before the new one starts; the stopped run is committed to a time record on its own date (the date the timer was started, which may not be today for cross-midnight runs).
See Concepts for timer semantics.
POST
/
timers
Start Timer
curl --request POST \
--url https://api.everhour.com/timers \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"task": "ev:9876543210",
"userDate": "2018-01-16",
"comment": "some notes"
}
'import requests
url = "https://api.everhour.com/timers"
payload = {
"task": "ev:9876543210",
"userDate": "2018-01-16",
"comment": "some notes"
}
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({task: 'ev:9876543210', userDate: '2018-01-16', comment: 'some notes'})
};
fetch('https://api.everhour.com/timers', 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/timers",
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([
'task' => 'ev:9876543210',
'userDate' => '2018-01-16',
'comment' => 'some notes'
]),
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/timers"
payload := strings.NewReader("{\n \"task\": \"ev:9876543210\",\n \"userDate\": \"2018-01-16\",\n \"comment\": \"some notes\"\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/timers")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"task\": \"ev:9876543210\",\n \"userDate\": \"2018-01-16\",\n \"comment\": \"some notes\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.everhour.com/timers")
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 \"task\": \"ev:9876543210\",\n \"userDate\": \"2018-01-16\",\n \"comment\": \"some notes\"\n}"
response = http.request(request)
puts response.read_body{
"status": "active",
"duration": 16,
"today": 7200,
"startedAt": "2018-01-16 12:42:59",
"userDate": "2018-01-16",
"comment": "<string>",
"task": {
"id": "ev:9876543210",
"name": "Task Name",
"projects": [
"ev:1234567890"
],
"section": 1234,
"labels": [
"high",
"bug"
],
"position": 1,
"description": "<string>",
"dueAt": "2018-03-05 16:00:00",
"status": "open",
"time": {
"total": 7200,
"users": {
"1304": 3600,
"1543": 3600
}
},
"estimate": {
"total": 7200,
"type": "overall",
"users": {
"1304": 3600,
"1543": 3600
}
},
"attributes": {
"Client": "Everhour",
"Priority": "high"
},
"metrics": {
"efforts": 42,
"expenses": 199
},
"unbillable": true
},
"user": {
"id": 1304,
"name": "User Name",
"role": "admin",
"status": "active",
"headline": "CEO",
"avatarUrl": "<string>",
"phone": "<string>",
"capacity": 123,
"avatarUrlLarge": "<string>"
},
"currentTaskTime": {
"id": 2660155,
"time": 3600,
"user": 1304,
"date": "2018-01-20",
"task": {
"id": "ev:9876543210",
"name": "Task Name",
"projects": [
"ev:1234567890"
],
"section": 1234,
"labels": [
"high",
"bug"
],
"position": 1,
"description": "<string>",
"dueAt": "2018-03-05 16:00:00",
"status": "open",
"time": {
"total": 7200,
"users": {
"1304": 3600,
"1543": 3600
}
},
"estimate": {
"total": 7200,
"type": "overall",
"users": {
"1304": 3600,
"1543": 3600
}
},
"attributes": {
"Client": "Everhour",
"Priority": "high"
},
"metrics": {
"efforts": 42,
"expenses": 199
},
"unbillable": true
},
"isLocked": false,
"isInvoiced": false,
"comment": "some notes"
},
"website": {
"url": "<string>",
"title": "<string>"
}
}Authorizations
Body
application/json
Response
Created
Available options:
active, stopped Example:
"active"
Timer duration in seconds
Example:
16
Today time by user in the timer task
Example:
7200
Example:
"2018-01-16 12:42:59"
Example:
"2018-01-16"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
