# YouTube upload status

> Poll a YouTube upload until processing finishes.

Canonical: <https://www.tryadeli.com/docs/api/posts/get-youtube-upload-status>

`GET https://app.tryadeli.com/api/v1/posts/youtube/status`

Authorization: `Bearer <API key>` — see [Authentication](https://www.tryadeli.com/docs/authentication)

Polls a video uploaded with [Publish to YouTube](https://www.tryadeli.com/docs/api/posts/publish-youtube)
or [Upload YouTube file](https://www.tryadeli.com/docs/api/posts/upload-youtube-video-file).

**Query parameters**

| Name        | Type     | Required | Description                                                                       |
| ----------- | -------- | -------- | --------------------------------------------------------------------------------- |
| `accountId` | `uuid`   | Yes      |                                                                                   |
| `videoId`   | `string` | Yes      | The publishId from the upload response.                                           |
| `profileId` | `uuid`   |          | Optional, because accountId names its profile. If you pass both, they must agree. |

`status` is `processing` until YouTube finishes, then `published` (live,
scheduled, unlisted, or private — see `privacyStatus`) or `failed`, with
YouTube's `failureReason`. `published` and `failed` are final.

## Request examples

**cURL**

```bash
curl --fail-with-body "https://app.tryadeli.com/api/v1/posts/youtube/status?accountId=00000000-0000-0000-0000-000000000000&videoId=dQw4w9WgXcQ" \
  -H "Authorization: Bearer $ADELI_API_KEY"
```

**JavaScript**

```javascript
const response = await fetch("https://app.tryadeli.com/api/v1/posts/youtube/status?accountId=00000000-0000-0000-0000-000000000000&videoId=dQw4w9WgXcQ", {
  headers: {
    Authorization: `Bearer ${process.env.ADELI_API_KEY}`,
  },
});
console.log(await response.json());
```

**Python**

```python
import os

import requests

response = requests.get(
    "https://app.tryadeli.com/api/v1/posts/youtube/status",
    headers={"Authorization": f"Bearer {os.environ['ADELI_API_KEY']}"},
    params={
        "accountId": "00000000-0000-0000-0000-000000000000",
        "videoId": "dQw4w9WgXcQ",
    },
)
print(response.json())
```

## Responses

### 200

```json
{
  "platform": "youtube",
  "accountId": "00000000-0000-0000-0000-000000000000",
  "profileId": "00000000-0000-4000-8000-000000000001",
  "videoId": "dQw4w9WgXcQ",
  "status": "published",
  "uploadStatus": "processed",
  "processingStatus": "succeeded",
  "failureReason": null,
  "privacyStatus": "private",
  "publishAt": null,
  "permalink": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
```

### 404

```json
{
  "error": {
    "code": "post_not_found",
    "message": "Video not found on this channel"
  }
}
```
