Skip to main content
POST
/
api
/
partner
/
organization-setup
{
  "success": true,
  "action": "<string>",
  "profile": {},
  "profile.id": "<string>",
  "profile.organization_name": "<string>",
  "profile.partner_org_id": "<string>",
  "users_created": 123,
  "addresses_created": 123
}

Endpoint

POST https://api.staging.usesticker.com/v1/partner/organization-setup

Authentication

Authorization
string
required
Bearer token with your Partner API Key
Bearer sk_test_your_api_key

Request Body

organization
object
required
Organization details including name, contact info, and addresses
organization.name
string
required
Organization’s legal or display name
organization.email
string
required
Primary contact email (must be valid email format)
organization.phone
string
Primary phone number (E.164 format recommended)
organization.addresses
array
required
Array of shipping/billing addresses (minimum 1 required)
users
array
required
List of users in the organization (minimum 1 required)
users[].email
string
required
User’s email address (unique identifier)
users[].first_name
string
required
User’s first name
users[].last_name
string
required
User’s last name
users[].role
string
User role: admin or member (default: member)
partner_org_id
string
required
Your internal identifier for this organization
access_token
string
OAuth access token (for OAuth-based integrations)

Address Object

addresses[].line1
string
required
Street address
addresses[].line2
string
Apartment, suite, unit, etc.
addresses[].city
string
required
City name
addresses[].state
string
required
State/province code (2-letter abbreviation for US/CA)
addresses[].zip
string
required
ZIP or postal code
addresses[].country
string
required
Country code (ISO 3166-1 alpha-2)
addresses[].is_primary
boolean
required
Whether this is the default shipping address

Request Example

{
  "organization": {
    "name": "Acme Medical Practice",
    "email": "admin@acmemedical.com",
    "phone": "+1-555-123-4567",
    "addresses": [
      {
        "line1": "123 Medical Plaza",
        "line2": "Suite 200",
        "city": "San Francisco",
        "state": "CA",
        "zip": "94102",
        "country": "US",
        "is_primary": true
      }
    ]
  },
  "users": [
    {
      "email": "dr.smith@acmemedical.com",
      "first_name": "John",
      "last_name": "Smith",
      "role": "admin"
    }
  ],
  "partner_org_id": "acme_sf_001"
}

Response

success
boolean
Whether the operation succeeded
action
string
Action performed: created or updated
profile
object
Created organization profile
profile.id
string
Sticker’s unique identifier for this organization
profile.organization_name
string
Organization name
profile.partner_org_id
string
Your internal organization ID
users_created
number
Number of user accounts created
addresses_created
number
Number of addresses added

Response Examples

{
  "success": true,
  "action": "created",
  "profile": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "organization_name": "Acme Medical Practice",
    "partner_org_id": "acme_sf_001",
    "email": "admin@acmemedical.com",
    "created_at": "2024-12-11T10:30:00Z"
  },
  "users_created": 1,
  "addresses_created": 1
}

Error Codes

CodeDescriptionSolution
INVALID_REQUESTMalformed request or missing fieldsCheck required fields
INVALID_EMAILEmail format is invalidUse valid email format
INVALID_ADDRESSAddress validation failedCheck state/country codes
DUPLICATE_ORGANIZATIONOrg already existsUse existing profile ID
UNAUTHORIZEDInvalid API keyVerify API key
INTERNAL_ERRORServer errorRetry with backoff

Notes

Idempotency: If called multiple times with the same partner_org_id, the endpoint will update the existing organization rather than creating a duplicate.
Automatic Auth Users: The endpoint automatically creates Supabase authentication users for each profile member, enabling them to log in to the Sticker application.
Multiple Addresses: Organizations can have multiple shipping addresses. Users can select their preferred address during checkout.