POST
/
cms
/
v3
/
source-code
/
{environment}
/
content
/
{path}
Créer un fichier
curl --request POST \
  --url https://api.hubapi.com/cms/v3/source-code/{environment}/content/{path} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file=@example-file
{
  "createdAt": 123,
  "archivedAt": 123,
  "folder": true,
  "children": [
    "<string>"
  ],
  "name": "<string>",
  "id": "<string>",
  "hash": "<string>",
  "updatedAt": 123
}
Produits pris en charge
Exige l'un des produits suivants ou un produit supérieur.
Marketing HubMarketing HubGratuit
Sales HubSales HubGratuit
Service HubService HubGratuit
Content HubContent HubGratuit

Portées requises

Cette API requiert l’une des portées suivantes :
  • content

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

environment
string
required

L'environnement du fichier (« brouillon » ou « publié »).

path
string
required

L'emplacement du fichier dans le système de fichiers.

Body

multipart/form-data

Response

200
application/json

successful operation

The response is of type object.