Get the brand registration

Returns the rooftop's brand registration, if any, and the rooftop address on file.

GEThttps://api.spyne.ai/user-management/v1/twilio/customer-profiles
AuthBearer token (console user)Rate limitNot documentedProcessingSynchronous. Waits for the registration lookup and the address read.

Looks up the rooftop's registration with the phone carrier's registration service, and reads the rooftop address from the rooftop record. Returns customer_profiles (empty if nothing has been saved, otherwise one entry) and address. Registration status is reported as:

  • pending for drafts and anything not yet decided
  • approved when active
  • rejected when failed

state tells a draft (draft) apart from a real submission (submitted). Nothing is written.

Before you call it

  • You need enterpriseId and teamId. Pass them as enterprise_id and team_id (snake_case).

  • Authentication: Bearer token of a signed-in console user. The token is checked; the route does not check that the caller belongs to the rooftop.

  • Rate limit: Not documented

  • Processing: Synchronous. Waits for the registration lookup and the address read.


Request

Requiredalways send
Request checklist
  1. Send Authorization: Bearer YOUR_TOKEN.
  2. If customer_profiles is empty, show a blank form.
  3. If state is draft or status is rejected, let the user edit and resubmit. Otherwise treat the form as read-only.
ParameterTypeRequiredDescription
Query parameters——Sent in the query string.
enterprise_idstringRequiredDealer group ID.
team_idstringRequiredRooftop ID.
Headers——Sent as HTTP headers.
AuthorizationstringRequiredBearer YOUR_TOKEN

Sample request

curl -X GET "https://api.spyne.ai/user-management/v1/twilio/customer-profiles?enterprise_id=<enterpriseId>&team_id=<teamId>" \
  -H "Authorization: Bearer YOUR_TOKEN"
import requests

res = requests.get(
    "https://api.spyne.ai/user-management/v1/twilio/customer-profiles",
    params={"enterprise_id": "<enterpriseId>", "team_id": "<teamId>"},
    headers={"Authorization": "Bearer YOUR_TOKEN"},
)
print(res.status_code, res.json())
const qs = new URLSearchParams({ enterprise_id: "<enterpriseId>", team_id: "<teamId>" });
const res = await fetch(`https://api.spyne.ai/user-management/v1/twilio/customer-profiles?${qs}`, {
  headers: { Authorization: "Bearer YOUR_TOKEN" },
});
console.log(res.status, await res.json());

Sample response

{
  "message": "Customer profiles fetched successfully",
  "error": false,
  "code": "",
  "details": null,
  "data": {
    "address": {
      "addressLine1": "100 Example Ave",
      "city": "Austin",
      "state": "TX",
      "country": "United States",
      "zipcode": "78701",
      "address_line": "100 Example Ave",
      "pin_code": "78701"
    },
    "customer_profiles": [
      {
        "customer_profile_id": "<providerResourceId>",
        "business_details": {
          "name": "Example Motors LLC",
          "display_name": "Example Motors",
          "address": { "street": "100 Example Ave", "city": "Austin", "state": "TX", "zip": "78701", "country": "US" },
          "type": "private_profit",
          "industry": "AUTOMOTIVE",
          "registration_id_type": "EIN",
          "registration_id_value": "12-3456789",
          "website": "https://www.example.com",
          "email": "[email protected]",
          "isd_code": "+1",
          "phone": "5550100000",
          "privacy_policy_url": "https://www.example.com/privacy",
          "terms_and_conditions_url": "https://www.example.com/terms"
        },
        "authorized_representatives": [
          {
            "first_name": "Jane",
            "last_name": "Doe",
            "email": "[email protected]",
            "isd_code": "+1",
            "phone_number": "5550100000",
            "title": "General Manager",
            "position": "GM",
            "employee_id": "101"
          }
        ],
        "enterprise_id": "<enterpriseId>",
        "team_id": "<teamId>",
        "state": "submitted",
        "status": "pending",
        "failure_reason": null
      }
    ]
  }
}
{ "message": "enterprise_id and team_id are required", "error": true, "code": "ERROR_BAD_REQ_400", "details": null, "data": null }
{ "message": "Invalid Token", "error": true, "code": "ERROR_AUTH_401", "details": "", "data": null }
{ "message": "...", "error": true, "code": "ERROR_SERVER_500", "details": "", "data": null }

200 OK. With no registration yet, customer_profiles is []. With no address on file, address is null.

400 Bad Request (missing input). The response body is the framework's default input-validation error. Its shape is not defined in the code. An empty value instead returns the body in the 400 Bad Request (missing input) tab.

Response fields

ParameterTypeDescription
data.addressobject or nullRooftop address as saved by Save rooftop details.
data.customer_profiles[]arrayZero or one registration.
...customer_profile_idstring or nullCarrier-side registration ID.
...business_detailsobjectLegal name, display name (caller ID name), address, entity type, industry, EIN, website, email, phone, privacy and terms URLs.
...authorized_representatives[]arrayOne representative: name, email, phone, title (job title), position (job position category), employee_id (directory contact ID).
...statestringdraft or submitted.
...statusstringpending, approved or rejected.
...failure_reasonstring or nullWhy it was rejected.

Errors

StatusReasonWhen it happens
400Invalid inputenterprise_id or team_id is missing or empty.
401ERROR_AUTH_401Missing or invalid token.
500ERROR_SERVER_500The registration lookup failed for a reason other than "not found", or the address read failed.

Next

Pre-fill the form. Offer directory contacts from List the employee directory as the authorized representative. Save with Submit or save the brand registration. The checklist also reads this endpoint to show a rejected registration as needing attention.


Did this page help you?