Account

Embed
Preview of the card
<a href="https://forumulate.com/p/trackified/docs/ref-account"><img src="https://forumulate.com/api/public/orgs/trackified/spaces/docs/pages/e926269f-9a19-42b8-b076-6f4ee3f878b5/social-card.svg?v=3e7ae33eec8b" alt="Account" width="600" height="315"></a>
GEThttps://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys
List API keys
Parameters
limitintegerquery
= 50
offsetintegerquery
= 0
Code samples
cURL
curl -X GET "https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys?limit=&offset="
TypeScript
const res = await fetch('https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys?limit=&offset=', {
  method: 'GET',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys?limit=&offset=",
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys?limit=&offset=", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys?limit=&offset=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys?limit=&offset=')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys?limit=&offset="))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 Keys
Example
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "prefix": "string",
      "mode": "test",
      "scopes": [
        "string"
      ],
      "token": "string",
      "created_at": "2024-01-01T00:00:00Z",
      "last_used_at": "2024-01-01T00:00:00Z",
      "revoked_at": "2024-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "limit": 0,
    "offset": 0,
    "total": 0
  }
}
Schema
dataApiKey[]required
Show child parameters
idstring
namestring
prefixstring
modestring
test | live
scopesstring[]
tokenstring
Only present in the create response.
created_atstring
last_used_atstring
revoked_atstring
paginationobjectrequired
Show child parameters
limitinteger
offsetinteger
totalinteger
401 Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string"
  }
}
Schema
errorobject
Show child parameters
codestring
messagestring
request_idstring
POSThttps://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys
Create an API key
Request body application/json
namestring
modestring
test | live
scopesstring[]
{
  "name": "string",
  "mode": "test",
  "scopes": [
    "string"
  ]
}
Code samples
cURL
curl -X POST "https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","mode":"test","scopes":["string"]}'
TypeScript
const res = await fetch('https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"name":"string","mode":"test","scopes":["string"]}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys",
    headers={
    "Content-Type": "application/json",
    },
    json={"name": "string", "mode": "test", "scopes": ["string"]},
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("POST", "https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys", strings.NewReader(`{"name":"string","mode":"test","scopes":["string"]}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"name":"string","mode":"test","scopes":["string"]}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"name":"string","mode":"test","scopes":["string"]}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys"))
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"name\":\"string\",\"mode\":\"test\",\"scopes\":[\"string\"]}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
201 Created. The token is returned only here.
Example
{
  "id": "string",
  "name": "string",
  "prefix": "string",
  "mode": "test",
  "scopes": [
    "string"
  ],
  "token": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "last_used_at": "2024-01-01T00:00:00Z",
  "revoked_at": "2024-01-01T00:00:00Z"
}
Schema
idstring
namestring
prefixstring
modestring
test | live
scopesstring[]
tokenstring
Only present in the create response.
created_atstring
last_used_atstring
revoked_atstring
401 Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string"
  }
}
Schema
errorobject
Show child parameters
codestring
messagestring
request_idstring
DELETEhttps://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys/{id}
Revoke an API key
Parameters
idstringpathrequired
Code samples
cURL
curl -X DELETE "https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys/{id}"
TypeScript
const res = await fetch('https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys/{id}', {
  method: 'DELETE',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "DELETE",
    "https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys/{id}",
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("DELETE", "https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys/{id}", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys/{id}')
req = Net::HTTP::Delete.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.trackified.15-204-158-166.sslip.io/v1/account/api-keys/{id}"))
    .method("DELETE", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 Revoked
401 Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string"
  }
}
Schema
errorobject
Show child parameters
codestring
messagestring
request_idstring
404 Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string"
  }
}
Schema
errorobject
Show child parameters
codestring
messagestring
request_idstring
GEThttps://api.trackified.15-204-158-166.sslip.io/v1/account/usage
This month's usage and limits

Poll this to see quota before a create fails with 402 quota_exceeded. The period is the calendar month in UTC.

Code samples
cURL
curl -X GET "https://api.trackified.15-204-158-166.sslip.io/v1/account/usage"
TypeScript
const res = await fetch('https://api.trackified.15-204-158-166.sslip.io/v1/account/usage', {
  method: 'GET',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.trackified.15-204-158-166.sslip.io/v1/account/usage",
)
data = res.json()
Go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://api.trackified.15-204-158-166.sslip.io/v1/account/usage", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.trackified.15-204-158-166.sslip.io/v1/account/usage');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.trackified.15-204-158-166.sslip.io/v1/account/usage')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.trackified.15-204-158-166.sslip.io/v1/account/usage"))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 Usage
Example
{
  "period_start": "2024-01-01T00:00:00Z",
  "period_end": "2024-01-01T00:00:00Z",
  "plan": "string",
  "trackings_used": 0,
  "trackings_limit": 0,
  "trackings_remaining": 0,
  "rate_limit_per_minute": 0,
  "webhook_deliveries": 0,
  "carrier_volume": [
    {
      "carrier": "string",
      "count": 0
    }
  ]
}
Schema
period_startstringrequired
Start of the billing month (UTC).
period_endstringrequired
When the count resets (UTC).
planstringrequired
free, starter, pro or scale.
trackings_usedintegerrequired
Trackings added this period.
trackings_limitintegerrequired
trackings_remainingintegerrequired
trackings_limit minus trackings_used, never below 0.
rate_limit_per_minuteintegerrequired
webhook_deliveriesintegerrequired
Webhook delivery attempts this period.
carrier_volumeobject[]required
Show child parameters
carrierstringrequired
countintegerrequired
401 Error
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string"
  }
}
Schema
errorobject
Show child parameters
codestring
messagestring
request_idstring
Updated