> For a complete page index, fetch https://developer.close.com/llms.txt # Fetch a task's details GET https://api.close.com/api/v1/task/{id}/ Reference: https://developer.close.com/api/resources/tasks/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 `, 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 ## Errors ### 400 Bad Request Error Bad request - `any` ### 401 Unauthorized Error Unauthorized - `any` ### 404 Not Found Error Not found - `any` ## Examples **Response** ```json { "_type": "lead", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "assigned_to_name": "John Doe", "contact_id": null, "contact_name": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "John Doe", "date": "2015-02-08T00:00:00+00:00", "date_created": "2015-02-08T20:30:54.314000+00:00", "date_updated": "2015-02-26T19:11:36.128000+00:00", "id": "task_aRUZXCm9lMb2LwipTPhfFoFbCsUnaoQh1ncQ7WLnjlI", "is_complete": false, "is_dateless": false, "lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc", "lead_name": "Close", "object_id": null, "object_type": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "text": "Connect with Account Manager", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "John Doe" } ``` **SDK Code** ```python tasks_get_example import requests url = "https://api.close.com/api/v1/task/id/" response = requests.get(url, auth=("", "")) print(response.json()) ``` ```javascript tasks_get_example const url = 'https://api.close.com/api/v1/task/id/'; const credentials = btoa(":"); 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 tasks_get_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.close.com/api/v1/task/id/" req, _ := http.NewRequest("GET", url, nil) req.SetBasicAuth("", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby tasks_get_example require 'uri' require 'net/http' url = URI("https://api.close.com/api/v1/task/id/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request.basic_auth("", "") response = http.request(request) puts response.read_body ``` ```java tasks_get_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.close.com/api/v1/task/id/") .basicAuth("", "") .asString(); ``` ```php tasks_get_example request('GET', 'https://api.close.com/api/v1/task/id/', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp tasks_get_example using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://api.close.com/api/v1/task/id/"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ```