Skip to main content
PATCH
/
license_key_instances
/
{id}
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});

const licenseKeyInstance = await client.licenseKeyInstances.update('lki_EeWORStkMc7z0KycI31VS', {
  name: 'name',
});

console.log(licenseKeyInstance.id);
import os
from dodopayments import DodoPayments

client = DodoPayments(
    bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"),  # This is the default and can be omitted
)
license_key_instance = client.license_key_instances.update(
    id="lki_EeWORStkMc7z0KycI31VS",
    name="name",
)
print(license_key_instance.id)
package main

import (
	"context"
	"fmt"

	"github.com/dodopayments/dodopayments-go"
	"github.com/dodopayments/dodopayments-go/option"
)

func main() {
	client := dodopayments.NewClient(
		option.WithBearerToken("My Bearer Token"),
	)
	licenseKeyInstance, err := client.LicenseKeyInstances.Update(
		context.TODO(),
		"lki_EeWORStkMc7z0KycI31VS",
		dodopayments.LicenseKeyInstanceUpdateParams{
			Name: dodopayments.F("name"),
		},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", licenseKeyInstance.ID)
}
package com.dodopayments.api.example;

import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstance;
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstanceUpdateParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

        LicenseKeyInstanceUpdateParams params = LicenseKeyInstanceUpdateParams.builder()
            .id("lki_EeWORStkMc7z0KycI31VS")
            .name("name")
            .build();
        LicenseKeyInstance licenseKeyInstance = client.licenseKeyInstances().update(params);
    }
}
package com.dodopayments.api.example

import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstance
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstanceUpdateParams

fun main() {
    val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

    val params: LicenseKeyInstanceUpdateParams = LicenseKeyInstanceUpdateParams.builder()
        .id("lki_EeWORStkMc7z0KycI31VS")
        .name("name")
        .build()
    val licenseKeyInstance: LicenseKeyInstance = client.licenseKeyInstances().update(params)
}
require "dodopayments"

dodo_payments = Dodopayments::Client.new(
  bearer_token: "My Bearer Token",
  environment: "test_mode" # defaults to "live_mode"
)

license_key_instance = dodo_payments.license_key_instances.update("lki_EeWORStkMc7z0KycI31VS", name: "name")

puts(license_key_instance)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;

$client = new Client(
  bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
  environment: 'test_mode',
);

try {
  $licenseKeyInstance = $client->licenseKeyInstances->update(
    'lki_EeWORStkMc7z0KycI31VS', name: 'name'
  );

  var_dump($licenseKeyInstance);
} catch (APIException $e) {
  echo $e->getMessage();
}
using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.LicenseKeyInstances;

DodoPaymentsClient client = new();

LicenseKeyInstanceUpdateParams parameters = new()
{
    ID = "lki_EeWORStkMc7z0KycI31VS",
    Name = "name",
};

var licenseKeyInstance = await client.LicenseKeyInstances.Update(parameters);

Console.WriteLine(licenseKeyInstance);
use dodopayments::Client;

#[tokio::main]
async fn main() -> dodopayments::Result<()> {
    let client = Client::from_env()?;
    let id = "id";
    let result = client
        .license_key_instances()
        .update()
        .id(id)
        .body(dodopayments::models::LicenseKeyInstancesUpdateParams {
                name: Some("name".to_string()),
                ..Default::default()
            })
        .await?;
    println!("{result:?}");
    Ok(())
}
curl --request PATCH \
  --url https://test.dodopayments.com/license_key_instances/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "business_id": "<string>",
  "created_at": "2024-01-01T00:00:00.000Z",
  "id": "lki_123",
  "license_key_id": "lic_123",
  "name": "Production Server 1"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

License key instance ID

Body

application/json
name
string
required

Response

License key instance updated

business_id
string
required
created_at
string<date-time>
required
Example:

"2024-01-01T00:00:00.000Z"

id
string
required
Example:

"lki_123"

license_key_id
string
required
Example:

"lic_123"

name
string
required
Example:

"Production Server 1"

Last modified on March 25, 2026