> For a complete page index, fetch https://developer.close.com/llms.txt

# Get a single WhatsAppMessage activity

GET https://api.close.com/api/v1/activity/whatsapp_message/{id}/

Reference: https://developer.close.com/api/resources/activities/whatsapp/get

## Authentication

- `Authorization` header (basic auth, required) — Use your API key as the username and leave the password empty.
- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `id` (string, required)

### Query parameters

- `_fields` (string, optional) — Comma-separated list of fields to include in the response.

## Response

### 200

Successful response

- `_type` (string, required)
- `activity_at` (datetime, required, nullable)
- `contact_id` (string, required, nullable)
- `created_by` (string, required, nullable)
- `date_created` (datetime, required)
- `date_updated` (datetime, required)
- `direction` (enum, required) — Direction of communication. Outgoing means the communication flowing from the user to the lead/contact. Inbound means the opposite.
  - Allowed values: `incoming`, `outgoing`
- `external_whatsapp_message_id` (string, required)
- `id` (string, required)
- `integration_link` (string, required, nullable)
- `integration_name` (string, required, nullable)
- `lead_id` (string, required, nullable)
- `local_phone` (string, required)
- `local_phone_formatted` (string, required)
- `message_html` (string, required)
- `message_markdown` (string, required)
- `organization_id` (string, required)
- `remote_phone` (string, required)
- `remote_phone_formatted` (string, required)
- `response_to_id` (string, required, nullable)
- `source` (enum, required)
  - Allowed values: `ui`, `api`, `import`, `clipper`, `email`, `suggestion`, `segment-integration`, `customerio-integration`, `calendly-integration`, `ai`, `whatsapp`, `webform`
- `text` (string, required)
- `updated_by` (string, required, nullable)
- `user_id` (string, required, nullable)
- `users` (list of string, required)
- `attachments` (list of object, optional)
  - `content_type` (string, required, nullable)
  - `filename` (string, required, nullable)
  - `size` (integer, required, nullable)
  - `url` (string, required)
  - `thumbnail_url` (string, optional, nullable)
- `created_by_name` (string, optional, nullable)
- `sequence_id` (string, optional, nullable)
- `sequence_name` (string, optional, nullable)
- `sequence_subscription_id` (string, optional, nullable)
- `updated_by_name` (string, optional, nullable)
- `user_name` (string, optional, nullable)

## Errors

### 400 Bad Request Error

Bad request

- `any`

### 401 Unauthorized Error

Unauthorized

- `any`

### 404 Not Found Error

Not found

- `any`

## Examples

**Response**

```json
{
  "_type": "WhatsAppMessage",
  "activity_at": "2013-02-01T01:06:35.668000+00:00",
  "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk",
  "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
  "date_created": "2013-02-01T01:05:04.070000+00:00",
  "date_updated": "2013-02-01T01:06:35.668000+00:00",
  "direction": "outgoing",
  "external_whatsapp_message_id": "1234567890",
  "id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak",
  "integration_link": "https://example.com/messages/1234567890",
  "integration_name": "API",
  "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h",
  "local_phone": "+16503334444",
  "local_phone_formatted": "+1 650-333-444",
  "message_html": "<p>test</p>",
  "message_markdown": "test",
  "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
  "remote_phone": "+18183004000",
  "remote_phone_formatted": "+1 818-300-4000",
  "response_to_id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak",
  "source": "api",
  "text": "test",
  "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
  "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
  "users": [],
  "attachments": [],
  "created_by_name": "Stefan Wójcik",
  "updated_by_name": "Stefan Wójcik"
}
```

**SDK Code**

```python activities.whatsapp_messages_get_example
import requests

url = "https://api.close.com/api/v1/activity/whatsapp_message/id/"

response = requests.get(url, auth=("<CLOSE_API_KEY>", ""))

print(response.json())
```

```javascript activities.whatsapp_messages_get_example
const url = 'https://api.close.com/api/v1/activity/whatsapp_message/id/';
const credentials = btoa("<CLOSE_API_KEY>:");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go activities.whatsapp_messages_get_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.close.com/api/v1/activity/whatsapp_message/id/"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<CLOSE_API_KEY>", "")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby activities.whatsapp_messages_get_example
require 'uri'
require 'net/http'

url = URI("https://api.close.com/api/v1/activity/whatsapp_message/id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<CLOSE_API_KEY>", "")

response = http.request(request)
puts response.read_body
```

```java activities.whatsapp_messages_get_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.close.com/api/v1/activity/whatsapp_message/id/")
  .basicAuth("<CLOSE_API_KEY>", "")
  .asString();
```

```php activities.whatsapp_messages_get_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.close.com/api/v1/activity/whatsapp_message/id/', [
  'headers' => [
  ],
    'auth' => ['<CLOSE_API_KEY>', ''],
]);

echo $response->getBody();
```

```csharp activities.whatsapp_messages_get_example
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.close.com/api/v1/activity/whatsapp_message/id/");
client.Authenticator = new HttpBasicAuthenticator("<CLOSE_API_KEY>", "");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```