curl --request POST \
--url https://api.creem.io/v1/meters/{id}/unarchive \
--header 'x-api-key: <api-key>'import requests
url = "https://api.creem.io/v1/meters/{id}/unarchive"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.creem.io/v1/meters/{id}/unarchive', 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.creem.io/v1/meters/{id}/unarchive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.creem.io/v1/meters/{id}/unarchive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.creem.io/v1/meters/{id}/unarchive")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creem.io/v1/meters/{id}/unarchive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "mtr_abc123",
"store_id": "sto_abc123",
"name": "Image generations",
"event_name": "image.generated",
"aggregation": "sum",
"aggregation_property": "tokens",
"filter": {
"conjunction": "and",
"clauses": [
{
"property": "tier",
"operator": "equals",
"value": "pro"
}
]
},
"unit_label": "images",
"status": "active",
"created_at": "<string>",
"updated_at": "<string>"
}Unarchive a meter
Restore an archived meter: it returns to the default listing and resumes accruing usage from the next matching event. Idempotent — unarchiving an active meter returns it unchanged. No gate applies and none is needed: archiving never released the meter’s name, because per-store name uniqueness counts archived meters (which is why creating a meter with an archived meter’s name returns 409 meter_name_taken with details.archived_holder), and it never altered the definition. Usage ingested while the meter was archived is retained as raw events and IS folded back in for any period still inside the late-event window, since a period is recomputed in full rather than incrementally — so units for an open period can increase by more than the usage seen since the unarchive. Finalized periods are not moved.
curl --request POST \
--url https://api.creem.io/v1/meters/{id}/unarchive \
--header 'x-api-key: <api-key>'import requests
url = "https://api.creem.io/v1/meters/{id}/unarchive"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.creem.io/v1/meters/{id}/unarchive', 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.creem.io/v1/meters/{id}/unarchive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.creem.io/v1/meters/{id}/unarchive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.creem.io/v1/meters/{id}/unarchive")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creem.io/v1/meters/{id}/unarchive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "mtr_abc123",
"store_id": "sto_abc123",
"name": "Image generations",
"event_name": "image.generated",
"aggregation": "sum",
"aggregation_property": "tokens",
"filter": {
"conjunction": "and",
"clauses": [
{
"property": "tier",
"operator": "equals",
"value": "pro"
}
]
},
"unit_label": "images",
"status": "active",
"created_at": "<string>",
"updated_at": "<string>"
}Authorizations
API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.
Path Parameters
Response
Meter unarchived (or already active)
Meter ID
"mtr_abc123"
Store ID
"sto_abc123"
Meter name
"Image generations"
Usage event name the meter consumes
"image.generated"
Aggregation applied to matching events
count, sum, average, min, max, unique "sum"
Property the aggregation reduces; null for "count"
"tokens"
The meter filter; always present (empty clauses = match all)
Show child attributes
Show child attributes
Display unit
"images"
Whether the meter is active or archived
active, archived "active"
Creation timestamp (ISO 8601)
Last update timestamp (ISO 8601)