> For the complete documentation index, see [llms.txt](https://docs.goodfit.io/goodfit-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goodfit.io/goodfit-docs/apis/dataset-api/exports.md).

# Exports

## GET /dataset/exports/{exportId}

> Get an export

```json
{"openapi":"3.1.0","info":{"title":"Goodfit Dataset API","version":"1.0.0"},"servers":[{"url":"https://api.goodfit.io"}],"security":[{"apiKey":["CLIENT_DATA_API"]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Goodfit API key, sent as the bare header value"}}},"paths":{"/dataset/exports/{exportId}":{"get":{"operationId":"dataset:getExport","summary":"Get an export","tags":["Exports"],"parameters":[{"name":"exportId","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The id returned by POST /exports","type":"string"}}],"responses":{"200":{"description":"Get an export","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"export":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"status":{"type":"string","enum":["WAITING","PROCESSING","COMPLETE","FAILED"]},"type":{"type":"string"},"exportName":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedByUserEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"exportConfig":{"anyOf":[{"type":"object","properties":{"filters":{"description":"Restricts the company rows exported. Contacts follow those companies"},"columns":{"description":"fieldNames of the company data points in companies.csv. Defaults to all of them","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"parts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"}},"required":["filename"],"additionalProperties":false}},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"isExpired":{"description":"Exports older than 30 days have had their files deleted","type":"boolean"}},"required":["id","status","type","exportName","requestedByUserEmail","exportConfig","parts","completedAt","createdAt","updatedAt","isExpired"],"additionalProperties":false}},"required":["export"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INVALID_REQUEST"]}},"required":["error","code"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["UNAUTHENTICATED"]}},"required":["error","code"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["FORBIDDEN"]}},"required":["error","code"],"additionalProperties":false}}}},"404":{"description":"No export with this id exists for your account","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["NOT_FOUND"]}},"required":["error","code"],"additionalProperties":false}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["RATE_LIMITED"]}},"required":["error","code"],"additionalProperties":false}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INTERNAL_ERROR"]}},"required":["error","code"],"additionalProperties":false}}}}}}}}}
```

## Get download URLs for an export

> Each URL is valid for 5 minutes. Call again for a fresh set.

```json
{"openapi":"3.1.0","info":{"title":"Goodfit Dataset API","version":"1.0.0"},"servers":[{"url":"https://api.goodfit.io"}],"security":[{"apiKey":["CLIENT_DATA_API"]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Goodfit API key, sent as the bare header value"}}},"paths":{"/dataset/exports/{exportId}/download":{"post":{"operationId":"dataset:getExportDownload","summary":"Get download URLs for an export","description":"Each URL is valid for 5 minutes. Call again for a fresh set.","tags":["Exports"],"parameters":[{"name":"exportId","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The id returned by POST /exports","type":"string"}}],"responses":{"200":{"description":"Get download URLs for an export","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"export":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"status":{"type":"string","enum":["WAITING","PROCESSING","COMPLETE","FAILED"]},"type":{"type":"string"},"exportName":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedByUserEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"exportConfig":{"anyOf":[{"type":"object","properties":{"filters":{"description":"Restricts the company rows exported. Contacts follow those companies"},"columns":{"description":"fieldNames of the company data points in companies.csv. Defaults to all of them","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"parts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"}},"required":["filename"],"additionalProperties":false}},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"isExpired":{"description":"Exports older than 30 days have had their files deleted","type":"boolean"}},"required":["id","status","type","exportName","requestedByUserEmail","exportConfig","parts","completedAt","createdAt","updatedAt","isExpired"],"additionalProperties":false},"partDownloads":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"downloadUrl":{"description":"Pre-signed S3 URL, valid for 5 minutes","type":"string","format":"uri"}},"required":["filename","downloadUrl"],"additionalProperties":false}}},"required":["export","partDownloads"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INVALID_REQUEST"]}},"required":["error","code"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["UNAUTHENTICATED"]}},"required":["error","code"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["FORBIDDEN"]}},"required":["error","code"],"additionalProperties":false}}}},"404":{"description":"No export with this id exists for your account","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["NOT_FOUND"]}},"required":["error","code"],"additionalProperties":false}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["RATE_LIMITED"]}},"required":["error","code"],"additionalProperties":false}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INTERNAL_ERROR"]}},"required":["error","code"],"additionalProperties":false}}}}}}}}}
```

## List recent exports

> The 25 most recent exports, newest first. Exports older than 30 days are omitted.

```json
{"openapi":"3.1.0","info":{"title":"Goodfit Dataset API","version":"1.0.0"},"servers":[{"url":"https://api.goodfit.io"}],"security":[{"apiKey":["CLIENT_DATA_API"]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Goodfit API key, sent as the bare header value"}}},"paths":{"/dataset/exports":{"get":{"operationId":"dataset:listExports","summary":"List recent exports","description":"The 25 most recent exports, newest first. Exports older than 30 days are omitted.","tags":["Exports"],"responses":{"200":{"description":"List recent exports","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"exports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"status":{"type":"string","enum":["WAITING","PROCESSING","COMPLETE","FAILED"]},"type":{"type":"string"},"exportName":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedByUserEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"exportConfig":{"anyOf":[{"type":"object","properties":{"filters":{"description":"Restricts the company rows exported. Contacts follow those companies"},"columns":{"description":"fieldNames of the company data points in companies.csv. Defaults to all of them","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"parts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"}},"required":["filename"],"additionalProperties":false}},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"isExpired":{"description":"Exports older than 30 days have had their files deleted","type":"boolean"}},"required":["id","status","type","exportName","requestedByUserEmail","exportConfig","parts","completedAt","createdAt","updatedAt","isExpired"],"additionalProperties":false}}},"required":["exports"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["UNAUTHENTICATED"]}},"required":["error","code"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["FORBIDDEN"]}},"required":["error","code"],"additionalProperties":false}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["RATE_LIMITED"]}},"required":["error","code"],"additionalProperties":false}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INTERNAL_ERROR"]}},"required":["error","code"],"additionalProperties":false}}}}}}}}}
```

## Start an export

> Exports run asynchronously. Poll GET /exports/{exportId} until the status is COMPLETE.

```json
{"openapi":"3.1.0","info":{"title":"Goodfit Dataset API","version":"1.0.0"},"servers":[{"url":"https://api.goodfit.io"}],"security":[{"apiKey":["CLIENT_DATA_API"]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Goodfit API key, sent as the bare header value"}}},"paths":{"/dataset/exports":{"post":{"operationId":"dataset:startExport","summary":"Start an export","description":"Exports run asynchronously. Poll GET /exports/{exportId} until the status is COMPLETE.","tags":["Exports"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requestedByUserEmail":{"description":"Shown in the Goodfit web app against this export","type":"string"},"exportConfig":{"default":{},"type":"object","properties":{"filters":{"description":"Restricts the company rows exported. Contacts follow those companies"},"columns":{"description":"fieldNames of the company data points in companies.csv. Defaults to all of them","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}}},"exportName":{"type":"string"}}}}}},"responses":{"200":{"description":"Start an export","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"status":{"type":"string","enum":["WAITING","PROCESSING","COMPLETE","FAILED"]},"type":{"type":"string"},"exportName":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedByUserEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"exportConfig":{"anyOf":[{"type":"object","properties":{"filters":{"description":"Restricts the company rows exported. Contacts follow those companies"},"columns":{"description":"fieldNames of the company data points in companies.csv. Defaults to all of them","anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"parts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"}},"required":["filename"],"additionalProperties":false}},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"isExpired":{"description":"Exports older than 30 days have had their files deleted","type":"boolean"}},"required":["id","status","type","exportName","requestedByUserEmail","exportConfig","parts","completedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INVALID_REQUEST"]}},"required":["error","code"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["UNAUTHENTICATED"]}},"required":["error","code"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["FORBIDDEN"]}},"required":["error","code"],"additionalProperties":false}}}},"429":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["RATE_LIMITED"]}},"required":["error","code"],"additionalProperties":false}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"description":"Human readable. Wording may change between releases","type":"string"},"code":{"description":"Stable identifier. Match on this rather than on `error`","type":"string","enum":["INTERNAL_ERROR"]}},"required":["error","code"],"additionalProperties":false}}}}}}}}}
```
