> ## Documentation Index
> Fetch the complete documentation index at: https://dev.chargily.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 1. Your first API request - create a new Product

> It's time to send your first API request!

Enough talking, let's get to action!

## Sending your first API request - create a new [Product](/pay-v2/api-reference/products/product-object "Product").

Let's create a new product called **Super Product**.

<Note>Don't forget to replace `<YOUR_SECRET_KEY_HERE>` with your [API Secret Key](/pay-v2/api-keys "API Secret Key")</Note>

<Tip>
  For more details about the Product Create endpoint, refer to its [API
  Reference.](/pay-v2/api-reference/products/create "API Reference.")
</Tip>

<CodeGroup>
  ```curl cURL theme={null}
  curl --request POST \
    --url https://pay.chargily.net/test/api/v2/products \
    --header 'Authorization: Bearer <YOUR_SECRET_KEY_HERE>' \
    --header 'Content-Type: application/json' \
    --data '{
    "name": "Super Product"
  }'
  ```

  ```python Python theme={null}
  import requests

  url = "https://pay.chargily.net/test/api/v2/products"

  payload = {"name": "Super Product"}
  headers = {
      "Authorization": "Bearer <YOUR_SECRET_KEY_HERE>",
      "Content-Type": "application/json"
  }

  response = requests.request("POST", url, json=payload, headers=headers)

  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const options = {
    method: "POST",
    headers: {
      Authorization: "Bearer <YOUR_SECRET_KEY_HERE>",
      "Content-Type": "application/json",
    },
    body: '{"name":"Super Product"}',
  };

  fetch("https://pay.chargily.net/test/api/v2/products", options)
    .then((response) => response.json())
    .then((response) => console.log(response))
    .catch((err) => console.error(err));
  ```

  ```php PHP theme={null}
  <?php

  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://pay.chargily.net/test/api/v2/products",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "{\n  \"name\": \"Super Product\"\n}",
    CURLOPT_HTTPHEADER => [
      "Authorization: Bearer <YOUR_SECRET_KEY_HERE>",
      "Content-Type: application/json"
    ],
  ]);

  $response = curl_exec($curl);
  $err = curl_error($curl);

  curl_close($curl);

  if ($err) {
    echo "cURL Error #:" . $err;
  } else {
    echo $response;
  }
  ```

  ```go GO theme={null}
  package main

  import (
  	"fmt"
  	"strings"
  	"net/http"
  	"io/ioutil"
  )

  func main() {

  	url := "https://pay.chargily.net/test/api/v2/products"

  	payload := strings.NewReader("{\n  \"name\": \"Super Product\"\n}")

  	req, _ := http.NewRequest("POST", url, payload)

  	req.Header.Add("Authorization", "Bearer <YOUR_SECRET_KEY_HERE>")
  	req.Header.Add("Content-Type", "application/json")

  	res, _ := http.DefaultClient.Do(req)

  	defer res.Body.Close()
  	body, _ := ioutil.ReadAll(res.Body)

  	fmt.Println(res)
  	fmt.Println(string(body))

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.post("https://pay.chargily.net/test/api/v2/products")
    .header("Authorization", "Bearer <YOUR_SECRET_KEY_HERE>")
    .header("Content-Type", "application/json")
    .body("{\n  \"name\": \"Super Product\"\n}")
    .asString();
  ```
</CodeGroup>

## Response

If everything worked, you should get a response like this:

```json json theme={null}
{
  "id": "01hhyjnrdbc1xhgmd34hs1v3en",
  "entity": "product",
  "livemode": false,
  "name": "Super Product",
  "description": null,
  "images": [],
  "metadata": [],
  "created_at": 1702907011,
  "updated_at": 1702911993
}
```

Which is the [Product](/pay-v2/api-reference/products/product-object "Product") object you just created.

Good job!

## Next

Next, you'll create a [Price](/pay-v2/api-reference/prices/price-object "Price") for this product.

<Card title="Create a price" icon="money-bill-1-wave" href="/pay-v2/the-full-guide/create-a-price">
  Let's now create a Price for the Product you just created.
</Card>
