Create an organization
How to create an organization via API
To create a new organization, send a POST
request to the /api/organizations
endpoint, passing the resource arguments in the request body.
Request
POST https://provisioning.commercelayer.io/api/organizations
Arguments
type
string
Required
attributes.name
string
Required
attributes.support_phone
string
Optional
attributes.support_email
string
Optional
attributes.logo_url
string
Optional
attributes.favicon_url
string
Optional
attributes.primary_color
string
Optional
attributes.contrast_color
string
Optional
attributes.gtm_id
string
Optional
attributes.gtm_id_test
string
Optional
attributes.region
string
Optional
attributes.config
object
Optional
attributes.reference
string
Optional
attributes.reference_origin
string
Optional
attributes.metadata
object
Optional
Example
The following request creates a new organization:
curl -g -X POST \
'https://provisioning.commercelayer.io/api/organizations' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer {{your_access_token}}' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"data": {
"type": "organizations",
"attributes": {
"name": "The Blue Brand"
}
}
}'
Last updated