> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whaapy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Obtener Contacto

> Obtiene los detalles completos de un contacto por su ID

Obtén toda la información de un contacto específico, incluyendo sus conversaciones activas.

***

## Path Parameters

<ParamField path="id" type="string" required>
  UUID del contacto
</ParamField>

***

## Ejemplos

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.whaapy.com/contacts/v1/550e8400-e29b-41d4-a716-446655440000" \
    -H "Authorization: Bearer wha_TU_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const contactId = '550e8400-e29b-41d4-a716-446655440000';
  const response = await fetch(
    `https://api.whaapy.com/contacts/v1/${contactId}`,
    {
      headers: { 'Authorization': 'Bearer wha_TU_API_KEY' }
    }
  );
  const data = await response.json();
  console.log(data.contact);
  ```

  ```python Python theme={null}
  import requests

  contact_id = '550e8400-e29b-41d4-a716-446655440000'
  response = requests.get(
      f'https://api.whaapy.com/contacts/v1/{contact_id}',
      headers={'Authorization': 'Bearer wha_TU_API_KEY'}
  )
  print(response.json())
  ```

  ```php PHP theme={null}
  $contactId = '550e8400-e29b-41d4-a716-446655440000';
  $ch = curl_init("https://api.whaapy.com/contacts/v1/{$contactId}");
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Bearer wha_TU_API_KEY'
  ]);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($ch);
  echo $response;
  ```
</RequestExample>

***

## Respuesta Exitosa

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "contact": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "phone_number": "+5215512345678",
      "name": "Juan Pérez",
      "email": "juan@email.com",
      "avatar_url": "https://example.com/avatar.jpg",
      "tags": ["cliente", "premium"],
      "custom_fields": { 
        "company": "Acme Inc", 
        "role": "CEO",
        "contract_value": 50000
      },
      "external_ids": { 
        "hubspot": "abc123", 
        "salesforce": "xyz789" 
      },
      "notes": "Cliente desde 2024. Prefiere contacto por WhatsApp.",
      "funnel_stage": { 
        "id": "stage-uuid", 
        "name": "Qualified" 
      },
      "source": "whaapy",
      "company": "Acme Inc",
      "address": "Av. Reforma 123",
      "city": "Ciudad de México",
      "state": "CDMX",
      "postal_code": "06600",
      "country": "MX",
      "last_contact_at": "2026-01-28T10:00:00Z",
      "created_at": "2026-01-01T00:00:00Z",
      "updated_at": "2026-01-28T10:00:00Z"
    },
    "conversations": [
      {
        "id": "conv-uuid-1",
        "status": "active",
        "last_message_at": "2026-01-28T10:00:00Z"
      },
      {
        "id": "conv-uuid-2",
        "status": "closed",
        "last_message_at": "2026-01-15T14:30:00Z"
      }
    ]
  }
  ```
</ResponseExample>

### Campos del Contacto

| Campo             | Tipo      | Descripción                         |
| ----------------- | --------- | ----------------------------------- |
| `id`              | string    | UUID único del contacto             |
| `phone_number`    | string    | Número en formato E.164             |
| `name`            | string    | Nombre completo                     |
| `email`           | string    | Email de contacto                   |
| `avatar_url`      | string    | URL de imagen de perfil             |
| `tags`            | string\[] | Array de tags asignados             |
| `custom_fields`   | object    | Campos personalizados (clave-valor) |
| `external_ids`    | object    | IDs de CRMs externos                |
| `notes`           | string    | Notas internas                      |
| `funnel_stage`    | object    | Etapa actual del funnel             |
| `source`          | string    | Origen del contacto                 |
| `company`         | string    | Nombre de empresa                   |
| `last_contact_at` | string    | Fecha de última interacción         |
| `created_at`      | string    | Fecha de creación                   |
| `updated_at`      | string    | Fecha de última actualización       |

***

## Errores

<ResponseExample>
  ```json 404 Not Found theme={null}
  {
    "error": "not_found",
    "message": "Contacto no encontrado"
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json 400 Bad Request theme={null}
  {
    "error": "validation_error",
    "message": "ID de contacto inválido"
  }
  ```
</ResponseExample>

***

## Próximos Pasos

<CardGroup cols={2}>
  <Card title="Actualizar Contacto" icon="pen" href="/api-reference/contacts/update">
    Modificar datos del contacto
  </Card>

  <Card title="Eliminar Contacto" icon="trash" href="/api-reference/contacts/delete">
    Eliminar contacto (soft delete)
  </Card>

  <Card title="Fusionar Contactos" icon="code-merge" href="/api-reference/contacts/merge">
    Combinar duplicados
  </Card>

  <Card title="Enviar Mensaje" icon="paper-plane" href="/api-reference/messages/send">
    Enviar mensaje al contacto
  </Card>
</CardGroup>
