Contacts

Los endpoints de Contacts te permiten gestionar un directorio CRM de contactos dentro de tu tenant. Puedes crear, buscar, actualizar y eliminar perfiles de contacto, así como consultar los documentos vinculados a cada contacto.


GET/v2/contacts

List contacts

Lista paginada de contactos con búsqueda y filtros.

Query parameters

  • Name
    page
    Type
    integer
    Description

    Número de página (default: 1).

  • Name
    pageSize
    Type
    integer
    Description

    Resultados por página (1-100, default: 25).

  • Name
    search
    Type
    string
    Description

    Buscar por nombre, email o empresa.

  • Name
    tag
    Type
    string
    Description

    Filtrar por etiqueta.

  • Name
    verified
    Type
    boolean
    Description

    Filtrar por estado de verificación de identidad.

  • Name
    source
    Type
    string
    Description

    Filtrar por origen: manual, api, invitation, onboarding.

Request

GET
/v2/contacts
curl "https://api.allsign.io/v2/contacts?search=juan&pageSize=10" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK"

Response (200)

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "email": "juan@empresa.com",
      "fullName": "Juan Pérez",
      "company": "Empresa SA",
      "identityVerified": true,
      "source": "invitation",
      "documentsCount": 5
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 10
}

GET/v2/contacts/autocomplete

Autocomplete

Typeahead ligero que devuelve hasta 5 contactos que coincidan con la búsqueda. Ideal para campos de autocompletado en el frontend.

Query parameters

  • Name
    q
    Type
    string
    Description

    Texto de búsqueda (mínimo 2 caracteres).

curl "https://api.allsign.io/v2/contacts/autocomplete?q=juan" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK"

Response (200)

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "juan@empresa.com",
    "fullName": "Juan Pérez"
  }
]

POST/v2/contacts

Create contact

Crea un nuevo contacto. Si ya existe un usuario con ese email, se vincula automáticamente al perfil del contacto.

Request body

  • Name
    email
    Type
    string
    Description

    Email del contacto.

  • Name
    full_name
    Type
    string
    Description

    Nombre completo.

  • Name
    phone
    Type
    string
    Description

    Teléfono con código de país.

  • Name
    company
    Type
    string
    Description

    Empresa u organización.

  • Name
    job_title
    Type
    string
    Description

    Cargo o puesto.

  • Name
    notes
    Type
    string
    Description

    Notas internas.

  • Name
    tags
    Type
    array
    Description

    Lista de etiquetas para organizar contactos.

Request

POST
/v2/contacts
curl -X POST "https://api.allsign.io/v2/contacts" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "nuevo@empresa.com",
    "full_name": "Ana García",
    "company": "Tech Corp",
    "tags": ["cliente", "vip"]
  }'

Response (201)

{
  "id": "550e8400-e29b-41d4-a716-446655440099",
  "email": "nuevo@empresa.com",
  "fullName": "Ana García",
  "company": "Tech Corp",
  "identityVerified": false,
  "tags": ["cliente", "vip"],
  "documents": []
}

GET/v2/contacts/{contact_id}

Get contact

Obtén el perfil completo de un contacto, incluyendo documentos vinculados y estado de verificación de identidad.

Path parameters

  • Name
    contact_id
    Type
    string
    Description

    ID del contacto (UUID).

curl "https://api.allsign.io/v2/contacts/CONTACT_UUID" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK"

PUT/v2/contacts/{contact_id}

Update contact

Actualiza los campos CRM de un contacto (empresa, cargo, notas, etiquetas).

Request body

  • Name
    full_name
    Type
    string
    Description

    Nombre completo actualizado.

  • Name
    phone
    Type
    string
    Description

    Teléfono actualizado.

  • Name
    company
    Type
    string
    Description

    Empresa actualizada.

  • Name
    job_title
    Type
    string
    Description

    Cargo actualizado.

  • Name
    notes
    Type
    string
    Description

    Notas internas actualizadas.

  • Name
    tags
    Type
    array
    Description

    Etiquetas actualizadas (reemplaza las anteriores).

curl -X PUT "https://api.allsign.io/v2/contacts/CONTACT_UUID" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK" \
  -H "Content-Type: application/json" \
  -d '{
    "company": "Nueva Empresa SA",
    "tags": ["cliente", "premium"]
  }'

PATCH/v2/contacts/{contact_id}/custom-fields

Patch custom fields

Operación atómica sobre customFields del contacto: upsert de un conjunto de claves y borrado de otras en una sola llamada. Preferir este endpoint sobre PUT /v2/contacts/{id} cuando solo necesitas tocar algunas claves — es race-safe (un cliente concurrente que modifique claves distintas ya no pisa las tuyas) y soporta borrado en lote.

Semántica:

  • set → upsert: se mergea con el dict existente (las claves nuevas se agregan, las existentes se sobreescriben).
  • remove → elimina las claves listadas si existen (no-op si no).
  • Ambos pueden ir en la misma request; remove se aplica después de set, de forma que puedes "renombrar" una clave en un solo round-trip.

Request body

  • Name
    set
    Type
    object
    Description

    Dict { clave: valor } para upsert.

  • Name
    remove
    Type
    array
    Description

    Lista de claves a borrar.

cURL — borrar 3 claves y renombrar una

curl -X PATCH "https://api.allsign.io/v2/contacts/CONTACT_UUID/custom-fields" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK" \
  -H "Content-Type: application/json" \
  -d '{
    "set":    { "RFC": "NEW123" },
    "remove": ["OldRFC", "TempNote", "LegacyKey"]
  }'

Devuelve el ContactDetailResponse completo con customFields ya actualizado.


DELETE/v2/contacts/{contact_id}

Delete contact

Elimina el perfil CRM de un contacto. La cuenta de usuario subyacente no se elimina.

curl -X DELETE "https://api.allsign.io/v2/contacts/CONTACT_UUID" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK"

Response (200)

{
  "success": true,
  "message": "Contact deleted"
}

Bulk endpoints

Los tres endpoints bulk procesan hasta 100 contactos por request. Cada item se ejecuta de forma independiente — un fallo individual no aborta el batch. La respuesta incluye un array details[] con el resultado por item para que tu UI de importación pueda mostrar errores fila por fila.

Todos comparten el mismo envelope de respuesta:

{
  "success": true,
  "message": "3 succeeded, 1 failed",
  "succeededCount": 3,
  "failedCount": 1,
  "details": [
    { "contactId": "uuid-1", "email": "ana@x.com",   "success": true  },
    { "contactId": null,     "email": "bad@email",   "success": false, "error": "Invalid email" }
  ]
}

POST/v2/contacts/bulk

Bulk create

Crea hasta 100 contactos en una sola llamada. Los perfiles existentes (mismo email dentro del tenant) se devuelven como success: true con su contactId actual — idempotente para importaciones repetidas.

Request body

  • Name
    contacts
    Type
    array
    Description

    Lista de items con el mismo shape que POST /v2/contacts (min 1, max 100).

cURL

curl -X POST "https://api.allsign.io/v2/contacts/bulk" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      { "email": "ana@x.com",  "fullName": "Ana García",  "tags": ["cliente"] },
      { "email": "beto@x.com", "fullName": "Beto López",  "company": "Acme" }
    ]
  }'

PATCH/v2/contacts/bulk

Bulk update

Update parcial de hasta 100 contactos. Cada item requiere su propio id y la semántica por-item es idéntica a PUT /v2/contacts/{id} — solo las claves presentes se tocan.

Request body

  • Name
    contacts
    Type
    array
    Description

    Lista de items { id, ...camposEditables } (min 1, max 100).

cURL

curl -X PATCH "https://api.allsign.io/v2/contacts/bulk" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      { "id": "uuid-1", "company": "Acme Corp" },
      { "id": "uuid-2", "tags": ["premium"] }
    ]
  }'

DELETE/v2/contacts/bulk

Bulk delete

Borra hasta 100 perfiles de contacto. Mantiene aislamiento por tenant: un contacto de otro tenant reporta Contact not found en su item. Las filas User subyacentes no se eliminan — solo el perfil CRM, igual que DELETE /v2/contacts/{id}.

Request body

  • Name
    contactIds
    Type
    array
    Description

    Lista de UUIDs a borrar (min 1, max 100).

cURL

curl -X DELETE "https://api.allsign.io/v2/contacts/bulk" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK" \
  -H "Content-Type: application/json" \
  -d '{
    "contactIds": ["uuid-1", "uuid-2", "uuid-3"]
  }'

GET/v2/contacts/{contact_id}/documents

Contact documents

Lista todos los documentos donde este contacto es firmante.

curl "https://api.allsign.io/v2/contacts/CONTACT_UUID/documents" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK"

Response (200)

{
  "items": [
    {
      "documentId": "550e8400-e29b-41d4-a716-446655440000",
      "documentName": "Contrato de servicios",
      "status": "SIGNED",
      "signedAt": "2024-11-23T15:30:00Z"
    }
  ],
  "total": 1
}

Was this page helpful?