Authorizations
Skip to main content
Introduction
Webhooks in PlanetScale
General API endpoints
Postgres API endpoints
Vitess API endpoints
Add a member to a team
curl --request POST \
--url https://api.planetscale.com/v1/organizations/{organization}/teams/{team}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "<string>"
}
'{
"id": "<string>",
"user": {
"id": "<string>",
"display_name": "<string>",
"name": "<string>",
"email": "<string>",
"avatar_url": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"two_factor_auth_configured": true,
"default_organization": {
"id": "<string>",
"name": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"deleted_at": "<string>"
},
"sso": true,
"managed": true,
"directory_managed": true,
"email_verified": true
},
"actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>",
"passwords": [
{
"id": "<string>",
"name": "<string>",
"role": "reader",
"cidrs": [
"<string>"
],
"created_at": "<string>",
"deleted_at": "<string>",
"expires_at": "<string>",
"last_used_at": "<string>",
"expired": true,
"direct_vtgate": true,
"direct_vtgate_addresses": [
"<string>"
],
"ttl_seconds": 123,
"access_host_url": "<string>",
"access_host_regional_url": "<string>",
"access_host_regional_urls": [
"<string>"
],
"actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"region": {
"id": "<string>",
"provider": "<string>",
"enabled": true,
"public_ip_addresses": [
"<string>"
],
"display_name": "<string>",
"location": "<string>",
"slug": "<string>",
"current_default": true
},
"username": "<string>",
"plain_text": "<string>",
"replica": true,
"renewable": true,
"database_branch": {
"name": "<string>",
"id": "<string>",
"production": true,
"mysql_edge_address": "<string>",
"private_edge_connectivity": true
}
}
]
}POST
/
organizations
/
{organization}
/
teams
/
{team}
/
members
Add a member to a team
curl --request POST \
--url https://api.planetscale.com/v1/organizations/{organization}/teams/{team}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "<string>"
}
'{
"id": "<string>",
"user": {
"id": "<string>",
"display_name": "<string>",
"name": "<string>",
"email": "<string>",
"avatar_url": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"two_factor_auth_configured": true,
"default_organization": {
"id": "<string>",
"name": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"deleted_at": "<string>"
},
"sso": true,
"managed": true,
"directory_managed": true,
"email_verified": true
},
"actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>",
"passwords": [
{
"id": "<string>",
"name": "<string>",
"role": "reader",
"cidrs": [
"<string>"
],
"created_at": "<string>",
"deleted_at": "<string>",
"expires_at": "<string>",
"last_used_at": "<string>",
"expired": true,
"direct_vtgate": true,
"direct_vtgate_addresses": [
"<string>"
],
"ttl_seconds": 123,
"access_host_url": "<string>",
"access_host_regional_url": "<string>",
"access_host_regional_urls": [
"<string>"
],
"actor": {
"id": "<string>",
"display_name": "<string>",
"avatar_url": "<string>"
},
"region": {
"id": "<string>",
"provider": "<string>",
"enabled": true,
"public_ip_addresses": [
"<string>"
],
"display_name": "<string>",
"location": "<string>",
"slug": "<string>",
"current_default": true
},
"username": "<string>",
"plain_text": "<string>",
"replica": true,
"renewable": true,
"database_branch": {
"name": "<string>",
"id": "<string>",
"production": true,
"mysql_edge_address": "<string>",
"private_edge_connectivity": true
}
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The name of the organization
The slug of the team
Body
application/json
The ID of the organization member to add to the team
Response
Returns the created team membership
Ctrl+I
Assistant
Responses are generated using AI and may contain mistakes.