Skip to main content
PATCH
/
projects
/
{project_id}
/
archive
Archive/Unarchive Project
curl --request PATCH \
  --url https://api.everhour.com/projects/{project_id}/archive \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "archived": true
}
'
import requests

url = "https://api.everhour.com/projects/{project_id}/archive"

payload = { "archived": True }
headers = {
    "X-Api-Key": "<api-key>",
    "Content-Type": "application/json"
}

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

print(response.text)
const options = {
  method: 'PATCH',
  headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({archived: true})
};

fetch('https://api.everhour.com/projects/{project_id}/archive', 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/projects/{project_id}/archive",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'archived' => true
  ]),
  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/projects/{project_id}/archive"

	payload := strings.NewReader("{\n  \"archived\": true\n}")

	req, _ := http.NewRequest("PATCH", 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.patch("https://api.everhour.com/projects/{project_id}/archive")
  .header("X-Api-Key", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"archived\": true\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.everhour.com/projects/{project_id}/archive")

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

request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"archived\": true\n}"

response = http.request(request)
puts response.read_body
{
  "id": "as:1234567890",
  "name": "Project Name",
  "users": [
    1304,
    1543
  ],
  "workspaceId": "<string>",
  "workspaceName": "<string>",
  "client": 123,
  "type": "board",
  "favorite": false,
  "billing": {
    "fee": 123
  },
  "rate": {
    "rate": 123,
    "userRateOverrides": {
      "1304": 10000,
      "1543": 5000
    }
  },
  "budget": {
    "type": "money",
    "budget": 100000,
    "period": "general",
    "progress": 0,
    "timeProgress": 0,
    "expenseProgress": 0,
    "appliedFrom": "<string>",
    "disallowOverbudget": true,
    "excludeUnbillableTime": true,
    "excludeExpenses": true,
    "showToUsers": true,
    "threshold": 123
  }
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

project_id
string
required

Project ID

Example:

"ev:1234567789001"

Body

application/json
archived
boolean
required
Example:

true

Response

OK

id
string
required
Example:

"as:1234567890"

name
string
required
Example:

"Project Name"

users
number[]
required

List of assigned user IDs

Example:
[1304, 1543]
workspaceId
string | null
workspaceName
string | null
client
number | null

Client ID

type
enum<string>

Project Type

Available options:
board,
list
Example:

"board"

favorite
boolean
Example:

false

billing
object
rate
object
budget
object