VitrinaAPI

Empresas

Las organizaciones a las que pertenecen los contactos. Agrupan personas; la identidad legal vive en el contacto que representa a la empresa.

Beta
Puede cambiar en cualquier momento, con una entrada en el changelog y aviso a quienes la llamaron recientemente — ver versionado.

Descarga la proyección completa de la API pública: openapi.json.

Buscar, crear y fusionar contactos explica este recurso en prosa, con ejemplos ejecutables.

MétodoRutaQué hace
GET/companiesList the workspace’s companies
POST/companiesCreate a company
DELETE/companies/{id}Delete a company
GET/companies/{id}Get a company
PUT/companies/{id}Update a company

GET /companies

List the workspace’s companies

Every company in alphabetical order, each with a contact_count — how many LIVE contacts name it (an archived or merged contact is not counted). q narrows the LIST by name; it does not narrow the counts, which describe the company rather than the search.

This list does not page and carries no meta: a workspace has companies, not hundreds of thousands of them. If that stops being true for a customer, it is a real change here rather than a limit they can guess at.

ParámetroEnTipoObligatorioRestricciones
qquerystringnomáx. 200
curl https://api.vitrinadev.com/api/v1/companies \
  -H "Authorization: Bearer $VITRINA_KEY"

Ejemplo de respuesta (200)

{
  "data": [
    {
      "id": "15151515-0000-4000-8000-000000000001",
      "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
      "name": "Constructora Andes SpA",
      "domain": "andes.cl",
      "industry": "Construcción",
      "size": "51-200",
      "website": "https://andes.cl",
      "phone": "+56223456789",
      "notes": "Cuenta corporativa — factura a fin de mes.",
      "metadata": {},
      "created_at": "2026-09-20T09:12:00.000Z",
      "updated_at": "2026-09-20T09:12:00.000Z",
      "contact_count": 7
    }
  ]
}

Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429

POST /companies

Create a company

Only name is required. Nothing here is unique or validated against anything: two companies may share a domain, and creating the same name twice creates two rows — there is no dedup and no merge for companies, unlike contacts.

metadata is a free object an integration can use to keep its own ids and fields; it is stored verbatim and never interpreted.

Creating a company links nobody to it. Attach contacts afterwards with PATCH /contacts/\{id\} and company_id.

Cuerpo

CampoTipoObligatorioRestricciones
namestringmín. 1, máx. 300
domainstring | nullmáx. 255
industrystring | nullmáx. 200
sizestring | nullmáx. 100
websitestring | nullmáx. 500
phonestring | nullmáx. 100
notesstring | nullmáx. 5000
metadataobject
curl -X POST https://api.vitrinadev.com/api/v1/companies \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Constructora Andes SpA",
    "domain": "andes.cl",
    "industry": "Construcción",
    "size": "51-200",
    "website": "https://andes.cl",
    "phone": "+56223456789"
  }'

Ejemplo de respuesta (201)

{
  "data": {
    "id": "15151515-0000-4000-8000-000000000001",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "name": "Constructora Andes SpA",
    "domain": "andes.cl",
    "industry": "Construcción",
    "size": "51-200",
    "website": "https://andes.cl",
    "phone": "+56223456789",
    "notes": "Cuenta corporativa — factura a fin de mes.",
    "metadata": {},
    "created_at": "2026-09-20T09:12:00.000Z",
    "updated_at": "2026-09-20T09:12:00.000Z"
  }
}

Responde: 201 · 400 · 401 · 403 · 404 · 409 · 429

DELETE /companies/{id}

Delete a company

Permanent — there is no archive for a company. The contacts survive: contact.company_id is set to null, so the people stay and only the grouping is gone. Nothing else references a company, so nothing else breaks.

Deleting a company from another workspace is a 404.

ParámetroEnTipoObligatorioRestricciones
idpathuuid
curl -X DELETE https://api.vitrinadev.com/api/v1/companies/<id> \
  -H "Authorization: Bearer $VITRINA_KEY"

Responde: 204 · 400 · 401 · 403 · 404 · 409 · 429

GET /companies/{id}

Get a company

One company by uuid. A company from another workspace is a 404, never a 403 — the API does not confirm that an id it will not serve exists.

The single read does not carry contact_count; the list does. To get the people, ask GET /contacts/search?company_id=&lt;uuid&gt;.

ParámetroEnTipoObligatorioRestricciones
idpathuuid
curl https://api.vitrinadev.com/api/v1/companies/<id> \
  -H "Authorization: Bearer $VITRINA_KEY"

Ejemplo de respuesta (200)

{
  "data": {
    "id": "15151515-0000-4000-8000-000000000001",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "name": "Constructora Andes SpA",
    "domain": "andes.cl",
    "industry": "Construcción",
    "size": "51-200",
    "website": "https://andes.cl",
    "phone": "+56223456789",
    "notes": "Cuenta corporativa — factura a fin de mes.",
    "metadata": {},
    "created_at": "2026-09-20T09:12:00.000Z",
    "updated_at": "2026-09-20T09:12:00.000Z"
  }
}

Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429

PUT /companies/{id}

Update a company

A PUT that behaves as a PATCH: send only the fields you are changing — at least one is required, and everything you leave out is kept. null clears a nullable field.

metadata is REPLACED as a whole when you send it, not merged key by key. Read it, change what you need, and write the complete object back.

ParámetroEnTipoObligatorioRestricciones
idpathuuid

Cuerpo

CampoTipoObligatorioRestricciones
namestringmín. 1, máx. 300
domainstring | nullmáx. 255
industrystring | nullmáx. 200
sizestring | nullmáx. 100
websitestring | nullmáx. 500
phonestring | nullmáx. 100
notesstring | nullmáx. 5000
metadataobject
curl -X PUT https://api.vitrinadev.com/api/v1/companies/<id> \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "industry": "Construcción e inmobiliaria",
    "size": "201-500"
  }'

Ejemplo de respuesta (200)

{
  "data": {
    "id": "15151515-0000-4000-8000-000000000001",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "name": "Constructora Andes SpA",
    "domain": "andes.cl",
    "industry": "Construcción e inmobiliaria",
    "size": "201-500",
    "website": "https://andes.cl",
    "phone": "+56223456789",
    "notes": "Cuenta corporativa — factura a fin de mes.",
    "metadata": {},
    "created_at": "2026-09-20T09:12:00.000Z",
    "updated_at": "2026-09-22T11:30:18.000Z"
  }
}

Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429

En esta página