Share a service with a team
curl --request POST \
--url https://my.server.express/api/v1/user/teams/{id}/services \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serviceId": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({serviceId: '<string>'})
};
fetch('https://my.server.express/api/v1/user/teams/{id}/services', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/user/teams/{id}/services"
payload = { "serviceId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"label": "<string>",
"type": "DEDICATED",
"status": "ACTIVE",
"ownedByYou": true,
"createdAt": "2023-11-07T05:31:56Z",
"movedFromAnotherTeam": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Teams
Share a service with a team
Any member of the team may call it, but only the account that owns the service can share it (403 otherwise). A service
belongs to at most one team, so sharing it here moves it from any previous team (movedFromAnotherTeam). Already
shared with this team → 409. Writes a TEAM_SERVICE_SHARED audit entry and sends a team.service_shared webhook to the
team owner.
POST
/
v1
/
user
/
teams
/
{id}
/
services
Share a service with a team
curl --request POST \
--url https://my.server.express/api/v1/user/teams/{id}/services \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serviceId": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({serviceId: '<string>'})
};
fetch('https://my.server.express/api/v1/user/teams/{id}/services', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/user/teams/{id}/services"
payload = { "serviceId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"label": "<string>",
"type": "DEDICATED",
"status": "ACTIVE",
"ownedByYou": true,
"createdAt": "2023-11-07T05:31:56Z",
"movedFromAnotherTeam": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Path Parameters
Team id.
Body
application/json
Minimum string length:
1