---
title: create-a-github-pull-request-that-adds-vercel-ci-tags-for-the-completed-analysis
product: vercel
url: /docs/rest-api/vercel-ci/create-a-github-pull-request-that-adds-vercel-ci-tags-for-the-completed-analysis
canonical_url: "https://vercel.com/docs/rest-api/vercel-ci/create-a-github-pull-request-that-adds-vercel-ci-tags-for-the-completed-analysis"
last_updated: 2026-10-13
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about create-a-github-pull-request-that-adds-vercel-ci-tags-for-the-completed-analysis on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Create a GitHub pull request that adds Vercel CI tags for the completed analysis

```http
POST /v1/vercel-ci/task-analyses/{analysisId}/pull-request
```

Create task configuration pull request

## Authentication

**bearerToken**: HTTP bearer

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `analysisId` | string | Yes |  |


## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Request body

Required: No

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "tasks"
  ],
  "properties": {
    "tasks": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "configPath"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 500
          },
          "configPath": {
            "type": "string",
            "maxLength": 2000
          }
        }
      }
    }
  }
}
```

## Example request

### TypeScript

```typescript
const response = await fetch('https://api.vercel.com/v1/vercel-ci/task-analyses/analysisId/pull-request?teamId=string&slug=string', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "tasks": [
      {
        "name": "Example Name",
        "configPath": "string"
      }
    ]
  }),
});

const data = await response.json();
console.log(data);
```

### Next.js

```typescript
'use server';

export async function callEndpoint() {
  const response = await fetch('https://api.vercel.com/v1/vercel-ci/task-analyses/analysisId/pull-request?teamId=string&slug=string', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.VERCEL_ACCESS_TOKEN}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      "tasks": [
        {
          "name": "Example Name",
          "configPath": "string"
        }
      ]
    }),
    next: { revalidate: 3600 }
  });

  if (!response.ok) {
    throw new Error('Request failed');
  }

  return response.json();
}
```

### cURL

```bash
curl -X POST 'https://api.vercel.com/v1/vercel-ci/task-analyses/analysisId/pull-request?teamId=string&slug=string' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d "{
    \"tasks\": [
      {
        \"name\": \"Example Name\",
        \"configPath\": \"string\"
      }
    ]
  }"
```

## Example response

```json
{
  "url": "https://example.com",
  "changedTaskNames": []
}
```

## Responses

### 201: Task configuration pull request created.

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "url",
    "changedTaskNames"
  ],
  "properties": {
    "url": {
      "type": "string"
    },
    "changedTaskNames": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
```

### 400: One of the provided values in the request body is invalid.
One of the provided values in the request query is invalid.

### 401: The request is not authorized.

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}
```

### 403: You do not have permission to access this resource.

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}
```

### 404: No description

### 409: No description

### 410: No description

### 429: No description

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "code",
        "name",
        "message",
        "limit"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "limit": {
          "type": "number"
        }
      }
    }
  }
}
```

### 500: No description

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}
```

---

## Related

- [vercel-ci endpoints](/docs/rest-api#vercel-ci)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://vercel.com/openapi.json) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)
