---
title: request-access-to-a-team
product: vercel
url: /docs/rest-api/teams/request-access-to-a-team
canonical_url: "https://vercel.com/docs/rest-api/teams/request-access-to-a-team"
last_updated: 2026-09-16
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about request-access-to-a-team on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Request access to a team

```http
POST /v1/teams/{teamId}/request
```

Request access to a team as a member. An owner has to approve the request. Only 100 users can request access to a team at the same time.

## Authentication

**bearerToken**: HTTP bearer

## Path parameters

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


## Request body

Required: Yes

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "joinedFrom"
  ],
  "properties": {
    "joinedFrom": {
      "type": "object",
      "required": [
        "origin"
      ],
      "properties": {
        "origin": {
          "type": "string",
          "description": "The origin of the request.",
          "enum": [
            "import",
            "teams",
            "github",
            "gitlab",
            "bitbucket",
            "feedback",
            "organization-teams"
          ]
        },
        "commitId": {
          "type": "string",
          "description": "The commit sha if the origin is a git provider."
        },
        "repoId": {
          "type": "string",
          "description": "The ID of the repository for the given Git provider."
        },
        "repoPath": {
          "type": "string",
          "description": "The path to the repository for the given Git provider."
        },
        "gitUserId": {
          "description": "The ID of the Git account of the user who requests access.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            }
          ]
        },
        "gitUserLogin": {
          "type": "string",
          "description": "The login name for the Git account of the user who requests access."
        }
      }
    }
  }
}
```

## Example request

### TypeScript

```typescript
const response = await fetch('https://api.vercel.com/v1/teams/teamId/request', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "joinedFrom": {
      "origin": "github",
      "commitId": "f498d25d8bd654b578716203be73084b31130cd7",
      "repoId": "67753070",
      "repoPath": "jane-doe/example",
      "gitUserId": "example_id",
      "gitUserLogin": "jane-doe"
    }
  }),
});

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/teams/teamId/request', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.VERCEL_ACCESS_TOKEN}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      "joinedFrom": {
        "origin": "github",
        "commitId": "f498d25d8bd654b578716203be73084b31130cd7",
        "repoId": "67753070",
        "repoPath": "jane-doe/example",
        "gitUserId": "example_id",
        "gitUserLogin": "jane-doe"
      }
    }),
    next: { revalidate: 3600 }
  });

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

  return response.json();
}
```

### cURL

```bash
curl -X POST 'https://api.vercel.com/v1/teams/teamId/request' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d "{
    \"joinedFrom\": {
      \"origin\": \"github\",
      \"commitId\": \"f498d25d8bd654b578716203be73084b31130cd7\",
      \"repoId\": \"67753070\",
      \"repoPath\": \"jane-doe/example\",
      \"gitUserId\": \"example_id\",
      \"gitUserLogin\": \"jane-doe\"
    }
  }"
```

## Example response

```json
{
  "accessRequestedAt": "123",
  "bitbucket": {
    "login": "string"
  },
  "confirmed": "false",
  "github": {
    "login": "string"
  },
  "gitlab": {
    "login": "string"
  },
  "joinedFrom": {
    "commitId": "example_id",
    "dsyncConnectedAt": "123",
    "dsyncUserId": "example_id",
    "gitUserId": "example_id",
    "gitUserLogin": "string",
    "idpUserId": "example_id",
    "origin": "account-update",
    "repoId": "example_id",
    "repoPath": "string",
    "ssoConnectedAt": "123",
    "ssoUserId": "example_id"
  },
  "teamName": "Example Name",
  "teamSlug": "string"
}
```

## Responses

### 200: Successfuly requested access to the team.

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "bitbucket",
    "github",
    "gitlab",
    "teamName",
    "teamSlug"
  ],
  "properties": {
    "accessRequestedAt": {
      "type": "number"
    },
    "bitbucket": {
      "type": "object",
      "nullable": true,
      "properties": {
        "login": {
          "type": "string"
        }
      }
    },
    "confirmed": {
      "type": "boolean",
      "enum": [
        false,
        true
      ]
    },
    "github": {
      "type": "object",
      "nullable": true,
      "properties": {
        "login": {
          "type": "string"
        }
      }
    },
    "gitlab": {
      "type": "object",
      "nullable": true,
      "properties": {
        "login": {
          "type": "string"
        }
      }
    },
    "joinedFrom": {
      "type": "object",
      "required": [
        "origin"
      ],
      "properties": {
        "commitId": {
          "type": "string"
        },
        "dsyncConnectedAt": {
          "type": "number"
        },
        "dsyncUserId": {
          "type": "string"
        },
        "gitUserId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            }
          ]
        },
        "gitUserLogin": {
          "type": "string"
        },
        "idpUserId": {
          "type": "string"
        },
        "origin": {
          "type": "string",
          "enum": [
            "account-update",
            "bitbucket",
            "dsync",
            "feedback",
            "github",
            "gitlab",
            "import",
            "link",
            "mail",
            "nsnb-auto-approve",
            "nsnb-hobby-upgrade",
            "nsnb-invite",
            "nsnb-redeploy",
            "nsnb-redeploy-attribution-card",
            "nsnb-request-access",
            "nsnb-viewer-upgrade",
            "organization-teams",
            "saml",
            "teams"
          ]
        },
        "repoId": {
          "type": "string"
        },
        "repoPath": {
          "type": "string"
        },
        "ssoConnectedAt": {
          "type": "number"
        },
        "ssoUserId": {
          "type": "string"
        }
      }
    },
    "teamName": {
      "type": "string"
    },
    "teamSlug": {
      "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: No description

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

### 404: The team was not found.

### 410: No description

### 429: No description

### 503: No description

---

## Related

- [teams endpoints](/docs/rest-api#teams)

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

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

---

[View full sitemap](/docs/sitemap)
