Company Management
Add Company
Changed onAdd a new company to the authenticated user's account. The request must include the company name and at least one initial asset value across domains, apks, and/or external_domains.
If the authenticated user belongs to an organization with synced_data: true, only the user with organization.role: "owner" can call this endpoint. Other members receive 403 Forbidden.
post/companies
Request
- Base URLhttps://api.hudsonrock.com/json/v3
- AuthAPI key in header api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"name": "AcmeCorp",
"domains": [
"acme.com"
],
"apks": [
"com.acme.app"
],
"external_domains": [
"vendor.com"
],
"webhook": {
"url": "https://example.com/webhooks/acme",
"token": "11111111-2222-3333-4444-555555555555",
"auth_header": "Authorization",
"data_alert": true
}
}Response
Updated list of companies for the authenticated user
Example response
{
"companies": [
{
"_id": "65f0a1b2c3d4e5f6a7b8c9d0",
"name": "Acme Corp",
"alerts": true,
"data": {
"domains": [
"acme.com"
],
"apks": [
"com.acme.app"
],
"external_domains": [
"vendor.com"
],
"webhook": {
"url": "https://example.com/webhooks/acme",
"token": "11111111-2222-3333-4444-555555555555",
"auth_header": "Authorization",
"data_alert": true
}
}
}
]
}Changes
- info
added the new optional request property
/ - info
added the non-success response with the status
- info
added the optional property
//to the response with the status - info
added the optional property
////to the response with the status
- info