# "Insights" Endpoints - POST Export project profitability insights

**URL:** <https://community.toggl.com/t/insights-endpoints-post-export-project-profitability-insights/414>\
**Category:** Reports API\
**Tags:** export, api, post, insights, profitability\
**Created:** [December 2, 2024, 6:13pm UTC](https://community.toggl.com/t/insights-endpoints-post-export-project-profitability-insights/414 "2024-12-02T18:13:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Support](https://yyz2.discourse-cdn.com/flex012/user_avatar/community.toggl.com/support/32/1577_2.png) [@Support](https://community.toggl.com/u/Support)\
**Post date:** [December 2, 2024, 6:13pm UTC](https://community.toggl.com/t/insights-endpoints-post-export-project-profitability-insights/414/1 "2024-12-02T18:13:30Z")

</div>

```auto
https://api.track.toggl.com/insights/api/v1/workspace/{workspace_id}/profitability/projects.{extension}

```

Downloads profitability project insights in the specified format: csv or xlsx.

- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust

```auto
extern crate tokio;extern crate serde_json;use reqwest::{Client};use reqwest::header::{CONTENT_TYPE};#[tokio::main]async fn main() -> Result<(), reqwest::Error> { let client = Client::new().basic_auth("<email>", "<password>"); let json = client.request(Method::POST, "https://api.track.toggl.com/insights/api/v1/workspace/{workspace_id}/profitability/projects.{extension}".to_string()).json(&serde_json::json!(\{"billable":"boolean","client_ids":[\{\}],"currency":"string","end_date":"string","project_ids":[\{\}],"resolution":"string","rounding":"integer","rounding_minutes":"integer","start_date":"string"\})) .header(CONTENT_TYPE, "application/json") .send() .await? .json() .await?; println!("{:#?}", json); Ok(())}

```

### Parameters[​](https://engineering.toggl.com/docs/reports/insights/#parameters-2)

#### Path[​](https://engineering.toggl.com/docs/reports/insights/#path-1)

| name | type | required | description |
| --- | --- | --- | --- |
| extension | string | true | csv,xlsx |

#### Body[​](https://engineering.toggl.com/docs/reports/insights/#body-2)

| Name | Type | Description |
| --- | --- | --- |
| billable | boolean | Whether the project is set as billable, optional, premium feature. |
| client\_ids | Array of integer | Client IDs, optional. A nil entry on this list means that only projects without client will be selected. |
| currency | string | Currency, example: “usd”. |
| end\_date | string | End date, optional, example: time.DateOnly. Should be greater than Start date. |
| project\_ids | Array of integer | Project IDS, optional. |
| resolution | string | Resolution, optional. Can be “day”, “week” or “month”. |
| rounding | integer | Rounding, optional, duration rounding settings, premium feature. |
| rounding\_minutes | integer | RoundingMinutes, optional, duration rounding minutes settings, premium feature. |
| start\_date | string | Start date, optional, example: time.DateOnly. Should be less than End date. |

### Response[​](https://engineering.toggl.com/docs/reports/insights/#response-2)

#### 200[​](https://engineering.toggl.com/docs/reports/insights/#200-2)

A stream with the csv or xlsx for the report being exported

#### 400[​](https://engineering.toggl.com/docs/reports/insights/#400-2)

Possible error messages:

- Invalid parameters
- Invalid workspace ID

#### 403[​](https://engineering.toggl.com/docs/reports/insights/#403-2)

User has no access to workspace or is not admin

#### 500[​](https://engineering.toggl.com/docs/reports/insights/#500-2)

Internal Server Error
