Skip to content
Skip to Content
Coder Docs

Add new license

POST
/api/v2/licenses

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Request Body

Add license request

application/json
  1. body
license*string

Response Body

Created

application/json
  1. response
claims?

Claims are the JWT claims asserted by the license. Here we use a generic string map to ensure that all data from the server is parsed verbatim, not just the fields this version of Coder understands.

id?integer
uploaded_at?string
Formatdate-time
uuid?string
Formatuuid

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X POST \	"$CODER_URL/api/v2/licenses" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "license": "string"}'
Example Response201
{  "claims": {},  "id": 0,  "uploaded_at": "2019-08-24T14:15:22Z",  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"}