Create Rooftop

Adds one or more rooftops (teams) to an existing dealer. The reseller is resolved from your token, so reseller_id is never sent in the request.

POSThttps://api.spyne.ai/api/pv1/enterprise/create-team
AuthBearer token

Body parameters

  • enterprise_id (string, required) — Dealer to add rooftops to.
  • rooftops (array, required) — One or more rooftops to add (see Rooftop object).

Rooftop object

  • teamName (string, required) — Rooftop name.
  • productLines (array, required): the products to turn on for this rooftop, as a list of product names from the table below, for example ["Image", "360 Spin", "Sales Inbound"]. Names are not case-sensitive.
  • address (object, optional): the rooftop's address. Any of address_line, city, state, country, pin_code, all strings.
  • email (string, optional) — Makes this email the rooftop admin (invited if new).

Product names

Product nameTurns on
ImageStudio images
360 Spin360° spins
VideoVideos
Sales InboundSales inbound agent
Sales OutboundSales outbound agent
Service InboundService inbound agent
Service OutboundService outbound agent

Sample request

curl --request POST \
  --url 'https://api.spyne.ai/api/pv1/enterprise/create-team' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "enterprise_id": "<enterprise_id>",
    "rooftops": [
      {
        "teamName": "Second Rooftop",
        "productLines": ["Image", "360 Spin", "Video", "Sales Inbound"],
        "address": { "address_line": "1200 Main St", "city": "Austin", "state": "TX", "pin_code": "78701" }
      }
    ]
  }'

Sample response

{
  "message": "Rooftop added",
  "error": false,
  "data": {
    "enterpriseId": "<enterprise_id>",
    "teamId": "<team_id>",
    "teams": [
      { "teamId": "<team_id>", "teamName": "Second Rooftop", "productLines": [] }
    ]
  }
}

Response parameters

ParameterTypeDescription
messagestringConfirmation message.
errorbooleanfalse on success.
data.enterpriseIdstringThe dealer the rooftops were added to.
data.teamIdstringThe first created rooftop's id.
data.teamsarrayCreated rooftops, each with teamId, teamName and productLines.

Errors

Status codeDescription
400Invalid or missing parameters, or rooftops was empty.
401Missing or invalid token.
403The token's user lacks permission on the target reseller.
404No dealer matches the given enterprise_id.
500Unexpected server error.

Did this page help you?