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

# Get a single OpportunityStatusChange activity

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

Reference: https://developer.close.com/api/resources/activities/opportunity-status-changes/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)
- `id` (string, required)
- `lead_id` (string, required, nullable)
- `new_status_id` (string, required)
- `old_status_id` (string, required)
- `opportunity_id` (string, required, nullable)
- `organization_id` (string, required)
- `updated_by` (string, required, nullable)
- `user_id` (string, required, nullable)
- `users` (list of string, required)
- `created_by_name` (string, optional, nullable)
- `new_pipeline_id` (string, optional)
- `new_pipeline_name` (string, optional)
- `new_status_label` (string, optional)
- `new_status_type` (enum, optional)
  - Allowed values: `won`, `lost`, `active`
- `old_pipeline_id` (string, optional)
- `old_pipeline_name` (string, optional)
- `old_status_label` (string, optional)
- `old_status_type` (enum, optional)
  - Allowed values: `won`, `lost`, `active`
- `opportunity_confidence` (integer, optional, nullable)
- `opportunity_date_won` (datetime, optional, nullable)
- `opportunity_value` (integer, optional, nullable)
- `opportunity_value_currency` (string, optional, nullable)
- `opportunity_value_formatted` (string, optional, nullable)
- `opportunity_value_period` (enum, optional, nullable)
  - Allowed values: `one_time`, `monthly`, `annual`
- `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": "OpportunityStatusChange",
  "activity_at": "2013-08-23T21:21:11.862000+00:00",
  "contact_id": null,
  "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
  "date_created": "2013-08-23T21:21:11.862000+00:00",
  "date_updated": "2013-08-23T21:21:11.862000+00:00",
  "id": "acti_CAI2lO44gRLMIvgsKfPZghRyuv1h8S3l7c4cDznXukd",
  "lead_id": "lead_0VaTsortzKpCv1ik6hbNoudduuD0m2Itevet0fKX39G",
  "new_status_id": "stat_DetsqwxFOOHx2JnhqtovutN3zeuARGfzB21x5t1W88G",
  "old_status_id": "stat_ue534UFRaocoMJJA9CYCwnMsRJP2qt6YGnpZOAx7ckK",
  "opportunity_id": "oppo_fn2kSFXS06akJ7XisR7vQQeObyK4upCc43RiAx1Vyz6",
  "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH",
  "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
  "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA",
  "users": [],
  "created_by_name": "Anthony Nemitz",
  "new_pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j",
  "new_pipeline_name": "Sales",
  "new_status_label": "Won",
  "new_status_type": "won",
  "old_pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j",
  "old_pipeline_name": "Sales",
  "old_status_label": "Active",
  "old_status_type": "active",
  "opportunity_confidence": 100,
  "opportunity_date_won": "2013-08-23T00:00:00+00:00",
  "opportunity_value": 0,
  "opportunity_value_currency": "USD",
  "opportunity_value_formatted": null,
  "opportunity_value_period": "one_time",
  "updated_by_name": "Anthony Nemitz",
  "user_name": "Anthony Nemitz"
}
```

**SDK Code**

```python activities.opportunity_status_changes_get_example
import requests

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

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

print(response.json())
```

```javascript activities.opportunity_status_changes_get_example
const url = 'https://api.close.com/api/v1/activity/status_change/opportunity/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.opportunity_status_changes_get_example
package main

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

func main() {

	url := "https://api.close.com/api/v1/activity/status_change/opportunity/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.opportunity_status_changes_get_example
require 'uri'
require 'net/http'

url = URI("https://api.close.com/api/v1/activity/status_change/opportunity/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.opportunity_status_changes_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/status_change/opportunity/id/")
  .basicAuth("<CLOSE_API_KEY>", "")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

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

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

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