Create Organization
curl --request POST \
--url https://omnicommerce.sg/api/v1/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Team"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Team'})
};
fetch('https://omnicommerce.sg/api/v1/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/organizations"
payload = { "name": "Acme Team" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"organizationId": "<string>",
"organization": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
},
"redirectUrl": "<string>"
}Organizations
Create Organization
Create a new organization for the signed-in user. This endpoint uses first-party session authentication because API keys are scoped to an existing organization.
POST
/
api
/
v1
/
organizations
Create Organization
curl --request POST \
--url https://omnicommerce.sg/api/v1/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Team"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Team'})
};
fetch('https://omnicommerce.sg/api/v1/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/organizations"
payload = { "name": "Acme Team" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"organizationId": "<string>",
"organization": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
},
"redirectUrl": "<string>"
}Authorizations
Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.
Body
application/json