---
agentTools:
  projectIndex: https://docs.devmate.com/llms.txt
---

# Create License for Customer

This method is used to create a license for the specific customer. The ID of customer needs to be passed in the URL of the request (`customer_id`). For example:

```
https://public-api.devmate.com/v2/customers/45/licenses
```

this request will create a license for the customer with ID `45`.

License ID can be found in DevMate Dashboard under *App Settings > License Types*.

Description of response fields see [here](https://docs.devmate.com/docs/get-customers).

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/cbRHrslhT8CjhBKb1kMn_License_type_id.png",
        "License_type_id.png",
        "1000",
        "579",
        "#fc1c15",
        ""
      ]
    }
  ]
}
[/block]

In case of success, you will receive an activation number within the server response, so you may provide it to your customer.

Example shows the creation of license with ID 26.

\#Response Codes

[block:parameters]
{
  "data": {
    "0-0": "`201`",
    "0-1": "License was successfully created",
    "1-0": "`400`",
    "1-1": "Bad request. Customer id was not specified or incorrect or wrong license id provided",
    "2-0": "`401`",
    "2-1": "Authorization failed",
    "3-0": "`500`",
    "3-1": "Server error"
  },
  "cols": 2,
  "rows": 4
}
[/block]