aventra.Developers
API referenceContacts

Link a contact to a company

Connect an existing contact and company in your workspace, with an optional role.

Permissions: Contacts AND companies: read and write.

Behavior and retry rules

Use the company's CRM UUID, not its organisation number. Each request creates a link. After a timeout, use GET companies for the contact before retrying. There is no duplicate protection across concurrent requests.

POST/contacts/{id}/companies

Authorization

bearerAuth
AuthorizationBearer <token>

Create a key in Aventra → Innstillinger → API-nøkler.

In: header

Path Parameters

id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/contacts/4d73dca4-7537-4f9c-924e-8bccd354663f/companies" \  -H "Authorization: Bearer $AVENTRA_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "company_id": "4d73dca4-7537-4f9c-924e-8bccd354663f",    "role": "Daglig leder"  }'
{  "data": {    "id": 43,    "company_id": "4d73dca4-7537-4f9c-924e-8bccd354663f",    "role": "Daglig leder"  }}

See authentication, errors and retry guidance.