Teams

Endpoints for viewing and updating API-token team details.

Get team details

GET /teams/{team_id}

Retrieve details for the team associated with your API token.

Scope: teams.read

Description: Returns the team's public API details. The team_id in the path must match the token's team.

Use GET /auth/token to retrieve the team_id for the current API token.

Path parameters

ParameterTypeDescription
team_idstringUUID of the team

Request

curl "https://api.presscart.com/teams/11111111-1111-1111-1111-111111111111" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN"

Response

{
  "name": "Acme Team",
  "slug": "acme-team",
  "referral_code": "ACME123",
  "contact_email": "contact@acme.com",
  "billing_email": "billing@acme.com"
}

Update team details

PUT /teams/{team_id}

Update the team's API-editable details.

Scope: teams.update

Description: API tokens can update only name, contact_email, and billing_email. Changing name also updates the team's slug. referral_code is read-only.

Use GET /auth/token to retrieve the team_id for the current API token.

Path parameters

ParameterTypeDescription
team_idstringUUID of the team

Body

FieldTypeRequiredDescription
namestringNoTeam display name
contact_emailstring | nullNoTeam contact email
billing_emailstring | nullNoTeam billing email

Request

curl -X PUT "https://api.presscart.com/teams/11111111-1111-1111-1111-111111111111" \
  -H "Authorization: Bearer $PRESSCART_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Team",
    "contact_email": "contact@acme.com",
    "billing_email": "billing@acme.com"
  }'

Response

{
  "name": "Acme Team",
  "slug": "acme-team",
  "referral_code": "ACME123",
  "contact_email": "contact@acme.com",
  "billing_email": "billing@acme.com"
}

On this page