scriptmonitoring.comdocs
TeamsCreate a team

Create a team

POST /v1/teams creates a team in your organization and returns its ID. Needs an organization key with teams:create, on Pro or Enterprise.

Pro and EnterpriseUpdated

POST /v1/teams creates a team and returns its ID, ready for Register domains. Organization keys only (sm_org_…), with the teams:create scope; a team key gets 401. Creating teams with the API is included in Pro and Enterprise: on Free it answers 402 upgrade_required.

curl -X POST https://data.scriptmonitoring.com/v1/teams/ \
  -H "Authorization: Bearer sm_org_14829305716342_…" \
  -H "Content-Type: application/json" \
  -d '{"name": "Payments"}'

Which keys work?#

KeyAccepted
Organization key (sm_org_…)Yes, with teams:create, on Pro and Enterprise.
Team key (sm_team_…)No: 401.

A missing, mistyped or revoked key, a key whose prefix doesn't match its type, or a key created before the sm_org_ / sm_team_ format gets 401 with this body, and so does a team key:

{ "error": "unauthorized", "message": "Missing or invalid bearer token." }

Request body#

FieldTypeDescription
namestring3 to 32 characters, unique in the organization.

Response#

201 with:

{ "data": { "teamId": "14827391650423" } }

On an Enterprise organization the new team is on Enterprise. On a Pro organization it starts on Free and needs its own subscription.

Errors: 400, 401, 402 upgrade_required, 403 (insufficient_scope, organization_suspended), 409 team_name_exists (the body includes the existing teamId), 429, 503.

Questions? Ask in the chat, or in the dashboard.View as Markdown