Create a new license for a user
curl --request POST \
--url https://api.withorb.com/v1/licenses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription_id": "<string>",
"license_type_id": "<string>",
"external_license_id": "<string>",
"start_date": "2026-01-27",
"end_date": "2026-01-27"
}
'import requests
url = "https://api.withorb.com/v1/licenses"
payload = {
"subscription_id": "<string>",
"license_type_id": "<string>",
"external_license_id": "<string>",
"start_date": "2026-01-27",
"end_date": "2026-01-27"
}
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({
subscription_id: '<string>',
license_type_id: '<string>',
external_license_id: '<string>',
start_date: '2026-01-27',
end_date: '2026-01-27'
})
};
fetch('https://api.withorb.com/v1/licenses', 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.withorb.com/v1/licenses",
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([
'subscription_id' => '<string>',
'license_type_id' => '<string>',
'external_license_id' => '<string>',
'start_date' => '2026-01-27',
'end_date' => '2026-01-27'
]),
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://api.withorb.com/v1/licenses"
payload := strings.NewReader("{\n \"subscription_id\": \"<string>\",\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"start_date\": \"2026-01-27\",\n \"end_date\": \"2026-01-27\"\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://api.withorb.com/v1/licenses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscription_id\": \"<string>\",\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"start_date\": \"2026-01-27\",\n \"end_date\": \"2026-01-27\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withorb.com/v1/licenses")
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 \"subscription_id\": \"<string>\",\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"start_date\": \"2026-01-27\",\n \"end_date\": \"2026-01-27\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"subscription_id": "<string>",
"license_type_id": "<string>",
"external_license_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z"
}{
"type": "https://docs.withorb.com/reference/error-responses#400-constraint-violation",
"status": 400,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#401-authentication-error",
"status": 401,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#404-feature-not-available",
"status": 400,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#409-resource-conflict",
"status": 409,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#413-request-too-large",
"status": 413,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#429-too-many-requests",
"status": 429,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#500-internal-server-error",
"status": 123,
"detail": "<string>",
"title": "<string>"
}License
Create a new license for a user
This endpoint is used to create a new license for a user.
If a start date is provided, the license will be activated at the start of the specified date in the customer’s timezone. Otherwise, the activation time will default to the start of the current day in the customer’s timezone.
POST
/
licenses
Create a new license for a user
curl --request POST \
--url https://api.withorb.com/v1/licenses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subscription_id": "<string>",
"license_type_id": "<string>",
"external_license_id": "<string>",
"start_date": "2026-01-27",
"end_date": "2026-01-27"
}
'import requests
url = "https://api.withorb.com/v1/licenses"
payload = {
"subscription_id": "<string>",
"license_type_id": "<string>",
"external_license_id": "<string>",
"start_date": "2026-01-27",
"end_date": "2026-01-27"
}
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({
subscription_id: '<string>',
license_type_id: '<string>',
external_license_id: '<string>',
start_date: '2026-01-27',
end_date: '2026-01-27'
})
};
fetch('https://api.withorb.com/v1/licenses', 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.withorb.com/v1/licenses",
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([
'subscription_id' => '<string>',
'license_type_id' => '<string>',
'external_license_id' => '<string>',
'start_date' => '2026-01-27',
'end_date' => '2026-01-27'
]),
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://api.withorb.com/v1/licenses"
payload := strings.NewReader("{\n \"subscription_id\": \"<string>\",\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"start_date\": \"2026-01-27\",\n \"end_date\": \"2026-01-27\"\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://api.withorb.com/v1/licenses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subscription_id\": \"<string>\",\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"start_date\": \"2026-01-27\",\n \"end_date\": \"2026-01-27\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withorb.com/v1/licenses")
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 \"subscription_id\": \"<string>\",\n \"license_type_id\": \"<string>\",\n \"external_license_id\": \"<string>\",\n \"start_date\": \"2026-01-27\",\n \"end_date\": \"2026-01-27\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"subscription_id": "<string>",
"license_type_id": "<string>",
"external_license_id": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z"
}{
"type": "https://docs.withorb.com/reference/error-responses#400-constraint-violation",
"status": 400,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#401-authentication-error",
"status": 401,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#404-feature-not-available",
"status": 400,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#409-resource-conflict",
"status": 409,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#413-request-too-large",
"status": 413,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#429-too-many-requests",
"status": 429,
"detail": "<string>",
"title": "<string>"
}{
"type": "https://docs.withorb.com/reference/error-responses#500-internal-server-error",
"status": 123,
"detail": "<string>",
"title": "<string>"
}Authorizations
API Keys can be issued in the Orb's web application.
Body
application/json
The external identifier for the license.
The start date of the license. If not provided, defaults to start of day today in the customer's timezone.
Example:
"2026-01-27"
The end date of the license. If not provided, the license will remain active until deactivated.
Example:
"2026-01-27"
Was this page helpful?
⌘I