Skip to content

API reference

Add a company to your workspace

Other routes API

POST/v1/session/workspaces/{workspaceId}/companies

Adds a company to the signed-in person’s own workspace, in the environment the request is for (Certinvo-Environment), as the console’s Add company does.

Only an owner, or an admin with access to every company, may add one. The company is not marked as set up: the console opens its setup. Nothing is copied from another company.

Send an Idempotency-Key. The same key with the same body answers the company it already made (200). The same key with another body is refused with 409 idempotency_key_reused.

Only a signed-in person can add one. An API key is refused with 401 session_required; a workspace key adds companies with POST /v1/companies.

Path parameters

  • workspaceIdstring (uuid)Required

Headers

  • Idempotency-KeystringRequired

Request body

application/json, required

  • namestringRequired
  • countrystring

    The two-letter country code, in capitals. Without it, the home country.

  • referencestring or null

    Your own id for the company.

Response

A 200 answer carries these fields.

  • idstring (uuid)Required
  • namestringRequired
  • environmentstringRequired
    One of live, sandbox.
  • countrystringRequired
  • referencestring or nullRequired

    The platform's own id for this customer, or null.

  • createdAtstring (date-time)Required

Status codes

Status Meaning
200 This key already made this company; it is answered again.
201 The company was made.
400 No Idempotency-Key (idempotency_key_required), or the body is not a company (invalid_company).
401 No usable credential was sent (invalid_credentials), or an API key was used (session_required).
403 This person may not add a company (role_required).
404 The workspace is not this person’s (not_found).
409 The key was used for another company (idempotency_key_reused), or the reference names another company (company_reference_conflict).
POST/v1/session/workspaces/{workspaceId}/companies
Example
curl -X POST https://api.certinvo.com/v1/session/workspaces/$WORKSPACE_WORKSPACE_ID/companies \
  -H "Authorization: Bearer $CERTINVO_API_KEY" \
  -H "Idempotency-Key: string" \
  -H "Content-Type: application/json" \
  --data-binary @body.json
import { readFile } from 'node:fs/promises'

const workspaceWorkspaceId = 'value'

const response = await fetch(`https://api.certinvo.com/v1/session/workspaces/${workspaceWorkspaceId}/companies`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
    'Idempotency-Key': 'string',
    'Content-Type': 'application/json',
  },
  body: await readFile('body.json'),
})
console.log(response.status, await response.json())
import os

import requests

workspace_workspace_id = "value"

response = requests.post(
    f"https://api.certinvo.com/v1/session/workspaces/{workspace_workspace_id}/companies",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Idempotency-Key": "string", "Content-Type": "application/json"},
    data=open("body.json", "rb"),
)
print(response.status_code, response.text)
200
application/json
{
  "id": "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a",
  "name": "string",
  "environment": "live",
  "country": "string",
  "reference": "string",
  "createdAt": "2026-09-17T09:30:00Z"
}
Success response
POST
/v1/session/workspaces/{workspaceId}/companies
Add a company to your workspace
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Variables1
›Headers2
›Bodyapplication/json
›Code Snippet
curl -X POST "https://api.certinvo.com/v1/session/workspaces/{workspaceId}/companies" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "country": "string",
  "reference": "string"
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close