Create
curl --request POST \
--url https://{defaultHost}/v1/public/activations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activation": {
"name": "My Site",
"fingerprint": "mysite.com",
"license_id": "bedb6006-e6cf-4620-aa02-2e0d905e312d"
}
}
'import requests
url = "https://{defaultHost}/v1/public/activations"
payload = { "activation": {
"name": "My Site",
"fingerprint": "mysite.com",
"license_id": "bedb6006-e6cf-4620-aa02-2e0d905e312d"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
activation: {
name: 'My Site',
fingerprint: 'mysite.com',
license_id: 'bedb6006-e6cf-4620-aa02-2e0d905e312d'
}
})
};
fetch('https://{defaultHost}/v1/public/activations', 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://{defaultHost}/v1/public/activations",
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([
'activation' => [
'name' => 'My Site',
'fingerprint' => 'mysite.com',
'license_id' => 'bedb6006-e6cf-4620-aa02-2e0d905e312d'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{defaultHost}/v1/public/activations"
payload := strings.NewReader("{\n \"activation\": {\n \"name\": \"My Site\",\n \"fingerprint\": \"mysite.com\",\n \"license_id\": \"bedb6006-e6cf-4620-aa02-2e0d905e312d\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{defaultHost}/v1/public/activations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activation\": {\n \"name\": \"My Site\",\n \"fingerprint\": \"mysite.com\",\n \"license_id\": \"bedb6006-e6cf-4620-aa02-2e0d905e312d\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/public/activations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"activation\": {\n \"name\": \"My Site\",\n \"fingerprint\": \"mysite.com\",\n \"license_id\": \"bedb6006-e6cf-4620-aa02-2e0d905e312d\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "db01dd87-8a8f-42ea-adbd-5304d308123c",
"object": "activation",
"counted": true,
"name": "My Site",
"fingerprint": "mysite.com",
"license": "bedb6006-e6cf-4620-aa02-2e0d905e312d",
"created_at": 1782485870,
"updated_at": 1782485870
}Activations
Create
Creates a new activation. If an activation already exists with the same fingerprint then it will be updated and returned.
POST
/
v1
/
public
/
activations
Create
curl --request POST \
--url https://{defaultHost}/v1/public/activations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activation": {
"name": "My Site",
"fingerprint": "mysite.com",
"license_id": "bedb6006-e6cf-4620-aa02-2e0d905e312d"
}
}
'import requests
url = "https://{defaultHost}/v1/public/activations"
payload = { "activation": {
"name": "My Site",
"fingerprint": "mysite.com",
"license_id": "bedb6006-e6cf-4620-aa02-2e0d905e312d"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
activation: {
name: 'My Site',
fingerprint: 'mysite.com',
license_id: 'bedb6006-e6cf-4620-aa02-2e0d905e312d'
}
})
};
fetch('https://{defaultHost}/v1/public/activations', 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://{defaultHost}/v1/public/activations",
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([
'activation' => [
'name' => 'My Site',
'fingerprint' => 'mysite.com',
'license_id' => 'bedb6006-e6cf-4620-aa02-2e0d905e312d'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{defaultHost}/v1/public/activations"
payload := strings.NewReader("{\n \"activation\": {\n \"name\": \"My Site\",\n \"fingerprint\": \"mysite.com\",\n \"license_id\": \"bedb6006-e6cf-4620-aa02-2e0d905e312d\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{defaultHost}/v1/public/activations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activation\": {\n \"name\": \"My Site\",\n \"fingerprint\": \"mysite.com\",\n \"license_id\": \"bedb6006-e6cf-4620-aa02-2e0d905e312d\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/public/activations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"activation\": {\n \"name\": \"My Site\",\n \"fingerprint\": \"mysite.com\",\n \"license_id\": \"bedb6006-e6cf-4620-aa02-2e0d905e312d\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "db01dd87-8a8f-42ea-adbd-5304d308123c",
"object": "activation",
"counted": true,
"name": "My Site",
"fingerprint": "mysite.com",
"license": "bedb6006-e6cf-4620-aa02-2e0d905e312d",
"created_at": 1782485870,
"updated_at": 1782485870
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
Response
200 - application/json
Success
The UUID of the specific object.
A string describing the object type returned.
The identifier for this activation. For example a URL, a machine fingerprint, etc.
The name of this activation.
Whether or not this activation counts towards the activation limit.
Expandable – The associated license ID.
Time at which the object was created. Measured in seconds since the Unix epoch.
Time at which the object was last updated. Measured in seconds since the Unix epoch.
Was this page helpful?
⌘I