> 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.

## 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**

```typescript
import { BrevoClient } from "@getbrevo/brevo";

async function main() {
    const client = new BrevoClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.tasks.getATask({
        id: "id",
    });
}
main();

```

```python
from brevo import Brevo

client = Brevo(
    api_key="YOUR_API_KEY_HERE",
)

client.tasks.get_a_task(
    id="id",
)

```

```php
<?php

namespace Example;

use Brevo\Brevo;

$client = new Brevo(
    apiKey: 'YOUR_API_KEY_HERE',
);
$client->tasks->getATask(
    'id',
);

```

```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", "<apiKey>")

	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"] = '<apiKey>'

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", "<apiKey>")
  .asString();
```

```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", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

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()
```