POST
/api/v1/compliance/licencesRegister a licence, registration or permit
Creates a register entry. Requires the `compliance:create` permission and an admin role — recording an instrument is an assertion about the organisation's regulatory standing. A `granted` status requires `effectiveFrom`, and `expiresAt` may not precede it. One entry per (org, jurisdiction, kind, name); a duplicate returns 409.
Authentication
Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/settings/api-keys.
Request body required
Example
{
"orgId": "00000000-0000-0000-0000-000000000000",
"kind": "licence",
"name": "string",
"jurisdiction": "string",
"authority": "string",
"frameworkId": "string",
"reference": "string",
"status": "not_started",
"ownerUserId": "00000000-0000-0000-0000-000000000000",
"effectiveFrom": "2026-01-01",
"expiresAt": "2026-01-01",
"renewalLeadDays": 0,
"notes": "string"
}Schema
{
"application/json": {
"schema": {
"type": "object",
"required": [
"orgId",
"kind",
"name",
"jurisdiction"
],
"properties": {
"orgId": {
"type": "string",
"format": "uuid"
},
"kind": {
"type": "string",
"enum": [
"licence",
"registration",
"permit",
"certification",
"notification",
"conformity_assessment",
"authorisation"
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"jurisdiction": {
"type": "string",
"minLength": 2,
"maxLength": 12
},
"authority": {
"type": "string",
"maxLength": 300
},
"frameworkId": {
"type": "string",
"maxLength": 120
},
"reference": {
"type": "string",
"maxLength": 300
},
"status": {
"type": "string",
"enum": [
"not_started",
"preparing",
"submitted",
"granted",
"rejected",
"expired",
"withdrawn",
"not_applicable"
]
},
"ownerUserId": {
"type": "string",
"format": "uuid"
},
"effectiveFrom": {
"type": "string",
"format": "date"
},
"expiresAt": {
"type": "string",
"format": "date"
},
"renewalLeadDays": {
"type": "integer",
"minimum": 0,
"maximum": 730
},
"notes": {
"type": "string",
"maxLength": 4000
}
}
}
}
}Response
200 example
{
"licence": {
"id": "00000000-0000-0000-0000-000000000000",
"orgId": "00000000-0000-0000-0000-000000000000",
"kind": "licence",
"name": "string",
"jurisdiction": "<'EU', ISO-3166 alpha-2, or a subdivision>",
"authority": "string",
"frameworkId": "string",
"reference": "string",
"status": "not_started",
"ownerUserId": "00000000-0000-0000-0000-000000000000",
"effectiveFrom": "2026-01-01",
"expiresAt": "2026-01-01",
"renewalLeadDays": 0,
"notes": "string",
"standing": "in_force",
"daysUntilExpiry": 0
}
}All status codes
200The created entry.
400Validation failed — e.g. 'granted' without effectiveFrom, or expiry before start
401Unauthenticated
403Insufficient role or permission
409This org already tracks that instrument in that jurisdiction
429Too Many Requests — the per-key or per-organization rate limit was exceeded. Honour the Retry-After header.
500Internal Server Error — DB_ERROR, INSERT_RETURNED_NOTHING.
503Schema behind code
Code samples
cURL
curl -X POST \
https://evalguard.ai/api/v1/compliance/licences \
-H "Authorization: Bearer $EVALGUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "orgId": "00000000-0000-0000-0000-000000000000", "kind": "licence", "name": "string", "jurisdiction": "string", "authority": "string", "frameworkId": "string", "reference": "string", "status": "not_started", "ownerUserId": "00000000-0000-0000-0000-000000000000", "effectiveFrom": "2026-01-01", "expiresAt": "2026-01-01", "renewalLeadDays": 0, "notes": "string" }'TypeScript
// The TypeScript SDK (@evalguard/sdk) exposes TYPED methods — runEval,
// getEval, runSecurityScan, checkFirewall, … — not a generic request().
// For an arbitrary endpoint, call it directly:
const res = await fetch("https://evalguard.ai/api/v1/compliance/licences", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.EVALGUARD_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"orgId": "00000000-0000-0000-0000-000000000000",
"kind": "licence",
"name": "string",
"jurisdiction": "string",
"authority": "string",
"frameworkId": "string",
"reference": "string",
"status": "not_started",
"ownerUserId": "00000000-0000-0000-0000-000000000000",
"effectiveFrom": "2026-01-01",
"expiresAt": "2026-01-01",
"renewalLeadDays": 0,
"notes": "string"
}),
});
console.log(res.status, await res.json());Python
# The Python SDK (pip install evalguardai) exposes TYPED methods on
# EvalGuardClient — run_eval, get_eval, … — not a generic request().
# For an arbitrary endpoint, call it directly:
import os
import requests
headers = {"Authorization": f"Bearer {os.environ['EVALGUARD_API_KEY']}"}
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://evalguard.ai/api/v1/compliance/licences",
headers=headers,
json={
"orgId": "00000000-0000-0000-0000-000000000000",
"kind": "licence",
"name": "string",
"jurisdiction": "string",
"authority": "string",
"frameworkId": "string",
"reference": "string",
"status": "not_started",
"ownerUserId": "00000000-0000-0000-0000-000000000000",
"effectiveFrom": "2026-01-01",
"expiresAt": "2026-01-01",
"renewalLeadDays": 0,
"notes": "string"
},
)
print(response.status_code, response.json())Go
package main
import (
"context"
"fmt"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{"orgId":"00000000-0000-0000-0000-000000000000","kind":"licence","name":"string","jurisdiction":"string","authority":"string","frameworkId":"string","reference":"string","status":"not_started","ownerUserId":"00000000-0000-0000-0000-000000000000","effectiveFrom":"2026-01-01","expiresAt":"2026-01-01","renewalLeadDays":0,"notes":"string"}`)
req, _ := http.NewRequestWithContext(context.Background(), "POST", "https://evalguard.ai/api/v1/compliance/licences", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
fmt.Println(resp.Status)
}Errors
400401403409429500503