# プロジェクトの作成

プロジェクトを作成するには、以下のエンドポイントを使用します。

**エンドポイント**

```
/v2/CreateProject
```

まず、プロジェクトのリクエストボディを定義してください。

ポリシーロック日、価格リスト、ホワイトリストなど、プロジェクトの詳細はすでにリクエスト本文で指定することができます。不要な項目は削除し、重要な項目は適宜詳細を記入してください。

**リクエストボディ**

```json
{
  "projectname": "string",
  "description": "string",
  "projecturl": "string",
  "tokennamePrefix": "string",
  "twitterHandle": "string",
  "policyExpires": true,
  "policyLocksDateTime": "2022-12-06T12:40:50.306Z",
  "payoutWalletaddress": "string",
  "payoutWalletaddressUsdc": "string",
  "maxNftSupply": 0,
  "policy": {
    "policyId": "string",
    "privateVerifykey": "string",
    "privateSigningkey": "string",
    "policyScript": "string"
  },
  "metadataTemplate": "string",
  "addressExpiretime": 0,
  "pricelist": [
    {
      "countNft": 0,
      "priceInLovelace": 0,
      "isActive": true,
      "validFrom": "2022-12-06T12:40:50.306Z",
      "validTo": "2022-12-06T12:40:50.306Z"
    }
  ],
  "additionalPayoutWallets": [
    {
      "payoutWallet": "string",
      "valuePercent": 0,
      "valueFixInLovelace": 0
    }
  ],
  "saleConditions": [
    {
      "condition": "walletcontainspolicyid",
      "policyId1": "string",
      "policyId2": "string",
      "policyId3": "string",
      "policyId4": "string",
      "policyId5": "string",
      "minOrMaxValue": 0,
      "description": "string",
      "isActive": true,
      "policyProjectname": "string",
      "whitelistedAddresses": [
        "string"
      ],
      "blacklistedAddresses": [
        "string"
      ],
      "onlyOneSalePerWhitelistAddress": true
    }
  ],
  "enableFiat": true,
  "enableDecentralPayments": true,
  "enableCrossSaleOnPaymentgateway": true,
  "activatePayinAddress": true,
  "paymentgatewaysalestart": "2022-12-06T12:40:50.306Z"
}
```

任意項目が多いため、プロジェクトの作成には以下の項目が必須となります：

```
  "projectname": "string",
```

```
  "policyExpires": true,
  "policyLocksDateTime": "2023-12-06T12:46:19.695Z",

or you import a policy ID with:

  "policy": {
    "policyId": "string",
    "privateVerifykey": "string",
    "privateSigningkey": "string",
    "policyScript": "string"
  },
```

<pre><code><strong>  "maxNftSupply": 0,
</strong></code></pre>

```
  "addressExpiretime": 0,
```

{% hint style="info" %}
ペイロードにメタデータをアップロードする場合は、メタデータをエスケープする必要があることに留意してください。

[オンラインJSONエスケープ/Unescapeツール\
https://www.freeformatter.com/json-escape.html#before-output](https://www.freeformatter.com/json-escape.html#before-output)
{% endhint %}

**Curl　（カール）**

自分にとって重要な成分を身体に特定したら。

Curlを送信できます。以下は、指定されたポリシーのロック時間1の最大供給、つまり、そこにあるすべてのトークンは一度だけミント（NFT）に利用可能であることを意味する例です。さらに、ペイアウトのウォレットアドレスと1つの価格、および販売開始が指定されています。

```
curl -X 'POST' \
  'https://studio-api.nmkr.io/v2/CreateProject' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer 0858c944c6ddxyzxyz1726da25' \
  -H 'Content-Type: application/json' \
  -d '{
  "projectname": "New Project",
  "description": "test",
  "projecturl": "string",
  "tokennamePrefix": "string",
  "twitterHandle": "string",
  "policyExpires": true,
  "policyLocksDateTime": "2023-12-06T12:46:19.695Z",
  "payoutWalletaddress": "addr1qxmrwr0sra35xjjdtugkasqqp2gsj969n6fdwt0fa6vxa5d98nu7s4l35sdwl6088e9f23ju7apk9hss7s9sgn3k9upqt2gwa8",
  "maxNftSupply": 1,
  "addressExpiretime": 20,
  "pricelist": [
    {
      "countNft": 1,
      "priceInLovelace": 10000000,
      "isActive": true,
      "validFrom": "2022-12-06T12:46:19.695Z",
      "validTo": "2023-12-06T12:46:19.695Z"
    }
  ],
  "enableDecentralPayments": true,
  "enableCrossSaleOnPaymentgateway": true,
  "activatePayinAddress": true,
  "paymentgatewaysalestart": "2022-12-08T12:46:19.695Z"
}'
```

**応答**

Curl が成功すると、次のような応答が返されます。この応答には、新しく作成されたプロジェクトのプロジェクト ID も含まれています。リクエスト ボディにメタデータ テンプレートがなかったため、レスポンスには[ 標準のメタデータ テンプレートが](https://docs.nmkr.io/nmkr-studio/project/metadata-template)含まれています。また、既存のポリシーをインポートするためのポリシー キーが指定されていないため、新しいポリシーが作成されました。

```
{
  "projectId": 41845,
  "metadata": "{\n  \"721\": {\n    \"<policy_id>\": {\n      \"<asset_name>\": {\n        \"name\": \"<display_name>\",\n        \"image\": \"<ipfs_link>\",\n        \"mediaType\": \"<mime_type>\",\n        \"description\": \"<description>\",\n        \"files\": [\n          {\n            \"name\": \"<display_name>\",\n            \"mediaType\": \"<mime_type>\",\n            \"src\": \"<ipfs_link>\"\n          }\n        ]\n      }\n    },\n    \"version\": \"1.0\"\n  }\n}",
  "policyId": "93c09ec87047f3309621fd4d48f9c5dfbxyz6d4b6a3fd015066eebe7",
  "policyScript": "{\n  \"type\": \"all\",\n  \"scripts\": [\n    {\n      \"type\": \"sig\",\n      \"keyHash\": \"ac636184a369b69d80xyzc5bxyz1a85c317bcc80f26bd4dfbfe60607\"\n    },\n    {\n      \"slot\": 110340895,\n      \"type\": \"before\"\n    }\n  ]\n}",
  "policyExpiration": "2023-12-06T12:46:19.695Z",
  "uid": "ef28ec63-3af1-4751-8b4f-b6a3373a6519"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nmkr.io/jp/nmkr-studio-api/apino/purojekuto/purojekutono.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
