> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.brevo.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.brevo.com/_mcp/server.

# Get a task

GET https://api.brevo.com/v3/crm/tasks/{id}

Retrieve the full details of a single CRM task by its identifier. The response includes the task''s name, type, status, due date, duration, notes, assignee, reminder settings, and linked contacts, companies, or deals.

Reference: https://developers.brevo.com/reference/get-a-task

## Authentication

- `api-key` header (required) — The API key should be passed in the request headers as `api-key` for authentication.
- `Authorization` header (bearer token, required) — OAuth 2.0 client_credentials (machine-to-machine) grant. Exchange your app's client_id/client_secret for a short-lived Bearer token.

## Request

### Path parameters

- `id` (string, required)

## Response

### 200

Returns the Task by id

- `taskTypeId` (string, required) — Id for type of task e.g Call / Email / Meeting etc.
- `name` (string, required) — Name of task
- `date` (datetime, required) — Task due date and time
- `id` (string, optional) — Unique task id
- `companiesIds` (list of string, optional) — Companies ids for companies a task is linked to
- `dealsIds` (list of string, optional) — Deal ids for deals a task is linked to
- `contactsIds` (list of integer, optional) — Contact ids for contacts linked to this task
- `assignToId` (string, optional) — Account id of the user assigned to this task
- `notes` (string, optional) — Notes added to a task
- `done` (boolean, optional) — Whether the task is marked as done
- `createdAt` (datetime, optional) — Task creation date/time
- `updatedAt` (datetime, optional) — Task last update date/time

## Errors

### 400 Bad Request Error

Returned when task id is invalid

- `message` (string, required) — Readable message associated to the failure
- `code` (string, optional) — Error code displayed in case of a failure

### 404 Not Found Error

Returned when item not found

- `message` (string, required) — Readable message associated to the failure
- `code` (string, optional) — Error code displayed in case of a failure

## Examples

**Response**

```json
{
  "taskTypeId": "61a5cd07ca1347c82306ad09",
  "name": "Task: Connect with client",
  "date": "2021-11-01T17:44:54.668Z",
  "id": "61a5cd07ca1347c82306ad06",
  "companiesIds": [
    "61a5ce58c5d4795761045990",
    "61a5ce58c5d4795761045991",
    "61a5ce58c5d4795761045992"
  ],
  "dealsIds": [
    "61a5ce58c5d4795761045990",
    "61a5ce58c5d4795761045991",
    "61a5ce58c5d4795761045992"
  ],
  "contactsIds": [
    1,
    2,
    3
  ],
  "assignToId": "5faab4b7f195bb3c4c31e62a",
  "notes": "In communication with client for resolution of queries.",
  "done": false,
  "createdAt": "2021-11-01T17:44:54.668Z",
  "updatedAt": "2021-11-01T17:44:54.668Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.brevo.com/v3/crm/tasks/id"

headers = {"api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.brevo.com/v3/crm/tasks/id';
const options = {method: 'GET', headers: {'api-key': '<api-key>'}};

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

```go
package main

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

func main() {

	url := "https://api.brevo.com/v3/crm/tasks/id"

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

	req.Header.Add("api-key", "<api-key>")

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.brevo.com/v3/crm/tasks/id")

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

request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'

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

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

HttpResponse<String> response = Unirest.get("https://api.brevo.com/v3/crm/tasks/id")
  .header("api-key", "<api-key>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.brevo.com/v3/crm/tasks/id', [
  'headers' => [
    'api-key' => '<api-key>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.brevo.com/v3/crm/tasks/id");
var request = new RestRequest(Method.GET);
request.AddHeader("api-key", "<api-key>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["api-key": "<api-key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.brevo.com/v3/crm/tasks/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```