Create Business
POST
/v1/businessesCreate a new business listing in the directory.
businesses.write
Requires the businesses.write permission scope on your API key.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Business name |
description_en | string | Yes* | Description in English. *At least one of description_en or description_id is required. |
description_id | string | Yes* | Description in Indonesian. *At least one is required. |
category_id | uuid | No | Primary business category ID |
region_id | uuid | No | Region location ID |
country_id | uuid | No | Country ID |
address | string | No | Physical address |
phone | string | No | Phone number |
email | string | No | Contact email address |
website | string | No | Website URL |
whatsapp_number | string | No | WhatsApp contact number |
can_fulfill_orders | boolean | No | Whether the business can fulfill procurement orders (default: false) |
visibility | string | No | Visibility level: public, internal, or draft (default: public) |
Behavior
- Auto-generates a URL-friendly
slugfrom the business name - If the slug already exists, appends a unique suffix
- Sets
data_sourceto"api"to track the origin - Fires the
business.createdwebhook event
Example Request
cURLbash
curl -X POST "https://rjpxllsycikfabazvkdh.supabase.co/functions/v1/directory-api/v1/businesses" \
-H "X-API-Key: your-key" \
-H "Content-Type: application/json" \
-d '{
"name": "PT Furniture Jaya",
"description_en": "Premium office furniture manufacturer in Bali",
"category_id": "cat-uuid-here",
"region_id": "region-uuid-here",
"address": "Jl. Raya Denpasar No. 42",
"phone": "+62812345678",
"email": "info@furniturejaya.com",
"can_fulfill_orders": true
}'Response (201 Created)
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "PT Furniture Jaya",
"slug": "pt-furniture-jaya",
"description_en": "Premium office furniture manufacturer in Bali",
"data_source": "api",
"visibility": "public",
"can_fulfill_orders": true,
"created_at": "2026-03-15T08:00:00Z",
"updated_at": "2026-03-15T08:00:00Z"
}
}Last updated on March 15, 2026