# Retrieve media file handle - Step 1 : Create a Session

**POST** `/app/uploads`

Product: [WhatsApp](https://devdocs.pinnacle.in/docs/whatsapp.md)  
Version: [3.0](https://devdocs.pinnacle.in/docs/whatsapp/3-0.md)

This API is used to get the upload session ID that will be used in the next step to initiate the upload.

## Request

URL: `https://partnersv1.pinbot.ai/v3/app/uploads`

Authentication location: `header`

Authentication name: `apikey`

### Request schema


```json
{
  "type": "object",
  "properties": {
    "file_type": {
      "type": "string",
      "x-parameter-in": "query"
    },
    "file_length": {
      "type": "string",
      "x-parameter-in": "query"
    }
  }
}
```

### Request example


```json
{
  "file_type": "video/mp4",
  "file_length": "164313"
}
```

## Response schema


```json
{
  "type": "object",
  "properties": {
    "raw_example": {
      "type": "string"
    }
  }
}
```

## Response examples


```json
{
  "200": {
    "raw_example": "{\n\"id\":\n\"upload:MTphdHRhY2htZW50OjNlYTE1ZTkzLTZkZDktNGIwOS1iOTM3LWM4YWZmM\nTRkYTZkMz9maWxlX2xlbmd0aD0xNjQzMTMmZmlsZV90eXBlPXZpZGVvJTJGbXA0?s\nig=ARbUFIDlNcIbRnOalIY\"\n}"
  }
}
```

## Status codes


```json
[
  {
    "code": 200,
    "description": "The request was successful."
  },
  {
    "code": 400,
    "description": "Bad request or invalid parameters."
  },
  {
    "code": 401,
    "description": "API key is missing or invalid."
  },
  {
    "code": 403,
    "description": "The request is not authorized for this resource."
  },
  {
    "code": 404,
    "description": "The requested resource was not found."
  },
  {
    "code": 500,
    "description": "The server encountered an error."
  }
]
```
