> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.getunleash.io/api/register-client-application/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server. # Register a client SDK POST https://app.unleash-instance.example.com/api/client/register Content-Type: application/json Register a client SDK with Unleash. SDKs call this endpoint on startup to tell Unleash about their existence. Used to track custom strategies in use as well as SDK versions. Reference: https://docs.getunleash.io/api/register-client-application ## Authentication - `Authorization` header (required) — API key needed to access this API - `Authorization` header (bearer token, required) — API key needed to access this API, in Bearer token format ## Request ### Body (application/json) This endpoint expects a clientApplicationSchema. - `appName` (string, required) — An identifier for the app that uses the sdk, should be static across SDK restarts - `interval` (double, required) — How often (in seconds) does the client refresh its toggles - `started` (ClientApplicationSchemaStarted, required) — Either an RFC-3339 timestamp or a unix timestamp in seconds - `strategies` (list of string, required) — Which strategies the SDKs runtime knows about - `instanceId` (string, optional) — A unique identifier identifying the instance of the application running the SDK. Often changes based on execution environment. For instance: two pods in Kubernetes will have two different instanceIds - `sdkVersion` (string, optional) — An SDK version identifier. Usually formatted as "unleash-client-\:\" - `platformName` (string, optional) — The platform the application is running on. For languages that compile to binaries, this can be omitted - `platformVersion` (string, optional) — The version of the platform the application is running on. Languages that compile to binaries, this is expected to be the compiler version used to assemble the binary. - `yggdrasilVersion` (string, optional) — The semantic version of the Yggdrasil engine used by the client. If the client is using a native engine this can be omitted. - `specVersion` (string, optional) — The version of the Unleash client specification the client supports - `sdkFlavor` (string, optional) — The identifier of an integration built on top of an Unleash SDK (e.g. an OpenFeature provider). Sent so adoption of the integration can be tracked alongside sdkVersion. - `sdkFlavorVersion` (string, optional) — The version of the integration identified by sdk flavor, that has been built on top of an Unleash SDK ## Response ### 202 This response has no body. ## Types ### ClientApplicationSchemaStarted Either an RFC-3339 timestamp or a unix timestamp in seconds ## Examples **Request** ```json { "appName": "example-app", "interval": 10, "started": "2023-06-13T16:35:00.000Z", "strategies": [ "default", "gradualRollout", "remoteAddress" ] } ``` **Response** ```json {} ``` **SDK Code** ```python import requests url = "https://app.unleash-instance.example.com/api/client/register" payload = { "appName": "example-app", "interval": 10, "started": "2023-06-13T16:35:00.000Z", "strategies": ["default", "gradualRollout", "remoteAddress"] } headers = { "Authorization": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/api/client/register'; const options = { method: 'POST', headers: {Authorization: '', 'Content-Type': 'application/json'}, body: '{"appName":"example-app","interval":10,"started":"2023-06-13T16:35:00.000Z","strategies":["default","gradualRollout","remoteAddress"]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.unleash-instance.example.com/api/client/register" payload := strings.NewReader("{\n \"appName\": \"example-app\",\n \"interval\": 10,\n \"started\": \"2023-06-13T16:35:00.000Z\",\n \"strategies\": [\n \"default\",\n \"gradualRollout\",\n \"remoteAddress\"\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.unleash-instance.example.com/api/client/register") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"appName\": \"example-app\",\n \"interval\": 10,\n \"started\": \"2023-06-13T16:35:00.000Z\",\n \"strategies\": [\n \"default\",\n \"gradualRollout\",\n \"remoteAddress\"\n ]\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://app.unleash-instance.example.com/api/client/register") .header("Authorization", "") .header("Content-Type", "application/json") .body("{\n \"appName\": \"example-app\",\n \"interval\": 10,\n \"started\": \"2023-06-13T16:35:00.000Z\",\n \"strategies\": [\n \"default\",\n \"gradualRollout\",\n \"remoteAddress\"\n ]\n}") .asString(); ``` ```php request('POST', 'https://app.unleash-instance.example.com/api/client/register', [ 'body' => '{ "appName": "example-app", "interval": 10, "started": "2023-06-13T16:35:00.000Z", "strategies": [ "default", "gradualRollout", "remoteAddress" ] }', 'headers' => [ 'Authorization' => '', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/client/register"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"appName\": \"example-app\",\n \"interval\": 10,\n \"started\": \"2023-06-13T16:35:00.000Z\",\n \"strategies\": [\n \"default\",\n \"gradualRollout\",\n \"remoteAddress\"\n ]\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "", "Content-Type": "application/json" ] let parameters = [ "appName": "example-app", "interval": 10, "started": "2023-06-13T16:35:00.000Z", "strategies": ["default", "gradualRollout", "remoteAddress"] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/api/client/register")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```