POST : Create company
This endpoint lets you create one company for a given media.
Last updated
This endpoint lets you create one company for a given media.
Last updated
[
"data":{
"id": "6295debf398f8985f09dc99d",
"name": "Trusty",
"public_id": "trusty",
"size": "62cc627cf40fc5d45819d8f8",
"sectors": [
"630f96baa4ef90ff2a51ee34"
],
"content": {
"visual": {
"logo": "https://piloty-public-staging.s3.amazonaws.com/companiesDocuments/6295debf398f8985f09dc99d/6295debf398f8985f09dc99d_logo_1710944607812"
},
"description":"Lorem Ipsum ...",
"language": "fr"
},
"is_published": true,
"is_vme_page_published" : false
}
]{
"status": 401,
"error": "unauthorized-limitation",
"errorMessage": "Unauthorized"
}{
"status": 409,
"error": "company-already-existed",
"errorMessage":"Company already exists; Please contact [email protected] if you want to add this company"
}curl -X POST -G "https://api-piloty.fr/companies
-H "Authorization: Bearer PILOTY_TOKEN" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d @- <<EOF
{
"media_public_id":"acme_media",
"name": "Acme Company",
"domain_url": "acme-company.com",
"sector_id": "querty1234",
"size_id": "querty1234",
}
EOF
curl -X POST -G "https://api-piloty.fr/companies
-H 'Authorization: Bearer PILOTY_TOKEN' \
-H 'Content-Type: multipart/form-data'
-F 'media_public_id=acme_media'
-F 'name=ACME Company'
-F 'domain_url=company.com'
-F 'size_id=size_123' \
-F 'sector_id=sector_123' \
-F 'description=Company description'
-F 'logo=@/path/to/logo.png'
-F 'logo_url=https://example.com/logo.png'