Create a kit

Create a brand kit with default branding.

POST /organizations/{org}/kits

Creates a kit from a name. Its branding starts from the defaults; set it with Update a kit.

Authorization

Org owner. Anyone else gets 403 forbidden.

Path parameters

NameTypeDescription
orgstringThe organization: its id (org_…) or its slug. It has to be an org your token can manage (see Who can call it)

Body

FieldTypeRequiredDescription
namestringyes1–120 characters, trimmed

No other field is accepted.

Response

201 Created with the created kit.

{
  "id": "kit_65f1c2a9e4b0d3f7a1c8e906",
  "name": "Acme brand",
  "branding": {
    "favicon": "https://ui-avatars.com/api/?name=Acme&size=32",
    "logo": "https://ui-avatars.com/api/?name=Acme&size=128",
    "og_image": "https://placehold.co/1200x630",
    "og_image_width": 1200,
    "og_image_height": 630,
    "primary_color_light": "#4f46e5",
    "primary_color_dark": "#818cf8",
    "tagline": "",
    "description": ""
  }
}

Errors

StatuserrorWhen
400invalid_requestAn unknown field, or a value that fails validation. The detail names it
403forbiddenYou are not an owner of the org
404not_foundThe org does not exist, or your token cannot manage it

Example

curl -X POST https://loginwith.loginwith.dev/organizations/acme/kits \
  -H "Authorization: Bearer $TOKEN" -H "content-type: application/json" \
  -d '{"name": "Acme brand"}'