> ## Documentation Index
> Fetch the complete documentation index at: https://docs.isometric.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Uploading sources

Sources are required to provide supporting evidence for the datapoints submitted for your project's MRV, fine grained calculations or inventories of materials. The process below outlines how to upload a source file and attach it to a datapoint:

<Steps>
  <Step title="Create Source">
    First call the [POST Source](/api-reference/certify/post-source) endpoint to create a source reference object. In the request, make sure to:

    * Set the `__typename` parameter to `CreateDocumentSourceRequest`
    * Include the `content_length` parameter (i.e. file size in bytes): this value is checked during the file upload step
    * Choose a display name: this name will be shown in the registry
    * Provide the file name of the upload: this value will be checked in the upload step

    <Tip>
      You should also decide whether the source should be publicly visible in the registry when credits are issued. Sources are hidden by default but can be made public by setting `is_public` to `true`.
    </Tip>
  </Step>

  <Step title="Upload source file">
    The response to the above request will include a `signed_upload_url` field for a Google Cloud Storage bucket. To upload the source file, make a `PUT` request to the URL as follows:

    ```bash curl theme={null}
    curl --request PUT \
      --url 'https://storage.googleapis.com/...' \
      --header 'Content-Type: xxx/yyy' \
      --data-binary 'local/file/path'
    ```

    <Info>
      If you are making the `PUT` request via an API client that implements chunked transfers, you may also need to prevent chunking by explicitly setting the `Content-Length` header in addition to the `Content-Type`.
    </Info>
  </Step>

  <Step title="Attach to a datapoint">
    When [creating a datapoint](/api-reference/certify/post-datapoint), sources can be attached by passing the source ID (`src_xxxx`) in the `source_ids` array.
  </Step>
</Steps>

## Supported filetypes

The following filetypes are currently supported as evidence sources:

| File type                    | Extension       | Content-Type header                                                       |
| ---------------------------- | --------------- | ------------------------------------------------------------------------- |
| Plain text file              | `.txt`          | `text/plain`                                                              |
| PDF document                 | `.pdf`          | `application/pdf`                                                         |
| MS Word OpenXML document     | `.docx`         | `application/vnd.openxmlformats-officedocument.wordprocessingml.document` |
| MS Word document             | `.doc`          | `application/msword`                                                      |
| JPEG image                   | `.jpeg`, `.jpg` | `image/jpeg`                                                              |
| PNG image                    | `.png`          | `image/png`                                                               |
| HEIC image                   | `.heic`         | `image/heic`                                                              |
| CSV file                     | `.csv`          | `text/csv`                                                                |
| Parquet data file            | `.parquet`      | `application/vnd.apache.parquet`                                          |
| MS Excel OpenXML spreadsheet | `.xlsx`         | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`       |
| MS Excel spreadsheet         | `.xls`          | `application/vnd.ms-excel`                                                |
| JSON                         | `.json`         | `application/json`                                                        |
| GeoJSON                      | `.geojson`      | `application/geo+json`                                                    |
| Interactive Python notebook  | `.ipynb`        | `application/x-ipynb+json`                                                |
| TIFF image                   | `.tif`, `.tiff` | `image/tiff`                                                              |
| KML file                     | `.kml`          | `application/vnd.google-earth.kml+xml`                                    |
| GeoPackage                   | `.gpkg`         | `application/geopackage+sqlite3`                                          |
| Shapefile                    | `.shp`          | `application/x-esri-shape`                                                |
| Shapefile index              | `.shx`          | `application/x-esri-shape`                                                |
| dBASE table                  | `.dbf`          | `application/x-dbf`                                                       |
| Shapefile projection         | `.prj`          | `application/x-esri-prj`                                                  |
| Shapefile code page          | `.cpg`          | `application/x-esri-cpg`                                                  |
