NAV
JavaScript Go HTTP

Kinde Management API v1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Provides endpoints to manage your Kinde Businesses

Base URLs:

Terms of service Email: Kinde Support Team Web: Kinde Support Team

Authentication

Users

Everything about your end-users.

List Users

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/users',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{businessName}.kinde.com/api/v1/users", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://{businessName}.kinde.com/api/v1/users HTTP/1.1

Accept: application/json

GET /api/v1/users

The returned list can be sorted by full name or email address in ascending or descending order. The number of records to return at a time can also be controlled using the page_size query string parameter.

Parameters

Name In Type Required Description
sort query string false Field and order to sort the result by.
page_size query integer false Number of results per page. Defaults to 10 if parameter not sent.
user_id query string false ID of the user to filter by.
next_token query string false A string to get the next page of results if there are more results.

Enumerated Values

Parameter Value
sort name_asc
sort name_desc
sort email_asc
sort email_desc

Example responses

200 Response

{
  "code": "string",
  "message": "string",
  "users": [
    {
      "id": "string",
      "email": "string",
      "last_name": "string",
      "first_name": "string",
      "is_suspended": true,
      "picture": "string"
    }
  ],
  "next_token": "string"
}

Responses

Status Meaning Description Schema
200 OK Users successfully retrieved. Inline
403 Forbidden Invalid credentials. None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» code string false none Response code.
» message string false none Response message.
» users [user] false none none
»» id string false none Unique id of the user in Kinde.
»» email string false none Default email address of the user in Kinde.
»» last_name string false none User's last name.
»» first_name string false none User's first name.
»» is_suspended boolean false none Whether the user is currently suspended or not.
»» picture string¦null false none User's profile picture URL.
» next_token string false none Pagination token.

Get User

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/user',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{businessName}.kinde.com/api/v1/user", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://{businessName}.kinde.com/api/v1/user HTTP/1.1

Accept: application/json

GET /api/v1/user

Retrieve a user record.

Parameters

Name In Type Required Description
id query string false The user's id.

Example responses

200 Response

{
  "id": "string",
  "email": "string",
  "last_name": "string",
  "first_name": "string",
  "is_suspended": true,
  "picture": "string"
}

Responses

Status Meaning Description Schema
200 OK User successfully updated. user
400 Bad Request Bad request. error_response
403 Forbidden Invalid credentials. None

Create User

Code samples

const inputBody = '{
  "profile": {
    "given_name": "string",
    "family_name": "string"
  },
  "identities": [
    {
      "type": "string",
      "details": {
        "email": "string"
      }
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/user',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://{businessName}.kinde.com/api/v1/user", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://{businessName}.kinde.com/api/v1/user HTTP/1.1

Content-Type: application/json
Accept: application/json

POST /api/v1/user

Creates a user record and optionally zero or more identities for the user. An example identity could be the email address of the user.

Body parameter

{
  "profile": {
    "given_name": "string",
    "family_name": "string"
  },
  "identities": [
    {
      "type": "string",
      "details": {
        "email": "string"
      }
    }
  ]
}

Parameters

Name In Type Required Description
body body object false The details of the user to create.
» profile body object false Basic information required to create a user.
»» given_name body string false User's first name.
»» family_name body string false User's last name.
» identities body [object] false Array of identities to assign to the created user
»» type body string false The type of identity to create, for e.g. email.
»» details body object false Additional details required to create the user.
»»» email body string false The email address of the user.

Example responses

200 Response

{
  "id": "string",
  "created": true,
  "identities": [
    {
      "type": "string",
      "result": {
        "created": true,
        "identity_id": 0
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK User successfully created. Inline
400 Bad Request Error creating user. error_response
403 Forbidden Invalid credentials. None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string false none Unique id of the user in Kinde.
» created boolean false none True if the user was successfully created.
» identities [user_identity] false none none
»» type string false none The type of identity object created.
»» result object false none The result of the user creation operation.
»»» created boolean false none True if the user identity was successfully created.
»»» identity_id integer false none Unique id of the user's identity in Kinde.

Update User

Code samples

const inputBody = '{
  "given_name": "string",
  "family_name": "string",
  "is_suspended": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/user',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://{businessName}.kinde.com/api/v1/user", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH https://{businessName}.kinde.com/api/v1/user HTTP/1.1

Content-Type: application/json
Accept: application/json

PATCH /api/v1/user

Update a user record.

Body parameter

{
  "given_name": "string",
  "family_name": "string",
  "is_suspended": true
}

Parameters

Name In Type Required Description
id query string false The user's id.
body body object true The user to update.
» given_name body string false User's first name.
» family_name body string false User's last name.
» is_suspended body boolean false Whether the user is currently suspended or not.

Example responses

200 Response

{
  "id": "string",
  "email": "string",
  "last_name": "string",
  "first_name": "string",
  "is_suspended": true,
  "picture": "string"
}

Responses

Status Meaning Description Schema
200 OK User successfully updated. user
400 Bad Request Bad request. error_response
403 Forbidden Invalid credentials. None

Delete User

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/user',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://{businessName}.kinde.com/api/v1/user", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE https://{businessName}.kinde.com/api/v1/user HTTP/1.1

Accept: application/json

DELETE /api/v1/user

Delete a user record.

Parameters

Name In Type Required Description
id query string false The user's id.

Example responses

200 Response

{
  "message": "string",
  "code": "string"
}

Responses

Status Meaning Description Schema
200 OK User successfully deleted. success_response
400 Bad Request Bad request. error_response
403 Forbidden Invalid credentials. None

OAuth

Returns the details of the currently logged in user

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/oauth2/v2/user_profile',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{businessName}.kinde.com/oauth2/v2/user_profile", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://{businessName}.kinde.com/oauth2/v2/user_profile HTTP/1.1

Accept: application/json

GET /oauth2/v2/user_profile

Contains the id, names, profile picture URL and email of the currently logged in user.

Example responses

200 Response

{
  "id": "string",
  "provided_id": "string",
  "name": "string",
  "given_name": "string",
  "family_name": "string",
  "updated_at": 0,
  "email": "string"
}

Responses

Status Meaning Description Schema
200 OK Details of logged in user V2. user_profile_v2
403 Forbidden Invalid credentials. None

Organizations

Get Organization

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/organization',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{businessName}.kinde.com/api/v1/organization", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://{businessName}.kinde.com/api/v1/organization HTTP/1.1

Accept: application/json

GET /api/v1/organization

Gets an organization given the organization's code.

Parameters

Name In Type Required Description
code query string false The organization's code.

Example responses

200 Response

{
  "code": "string",
  "name": "string",
  "is_default": true
}

Responses

Status Meaning Description Schema
200 OK Organization successfully retrieved. organization
400 Bad Request Bad request. error_response
403 Forbidden Invalid credentials. None

Create Organization

Code samples

const inputBody = '{
  "name": "string",
  "feature_flags": {
    "property1": "str",
    "property2": "str"
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/organization',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://{businessName}.kinde.com/api/v1/organization", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://{businessName}.kinde.com/api/v1/organization HTTP/1.1

Content-Type: application/json
Accept: application/json

POST /api/v1/organization

Create an organization.

Body parameter

{
  "name": "string",
  "feature_flags": {
    "property1": "str",
    "property2": "str"
  }
}

Parameters

Name In Type Required Description
body body object false Organization details.
» name body string false The organization's name.
» feature_flags body object false The organization's feature flag settings.
»» additionalProperties body string false Value of the feature flag.

Enumerated Values

Parameter Value
»» additionalProperties str
»» additionalProperties int
»» additionalProperties bool

Example responses

400 Response

{
  "errors": [
    {
      "code": "string",
      "message": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created Organization successfully created. None
400 Bad Request Error creating user. error_response
403 Forbidden Invalid credentials. None
500 Internal Server Error Could not create organization. None

List Organizations

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/organizations',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{businessName}.kinde.com/api/v1/organizations", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://{businessName}.kinde.com/api/v1/organizations HTTP/1.1

Accept: application/json

GET /api/v1/organizations

Get a list of organizations.

Parameters

Name In Type Required Description
sort query string false Field and order to sort the result by.
page_size query integer false Number of results per page. Defaults to 10 if parameter not sent.
next_token query string false A string to get the next page of results if there are more results.

Enumerated Values

Parameter Value
sort name_asc
sort name_desc
sort email_asc
sort email_desc

Example responses

200 Response

{
  "code": "string",
  "message": "string",
  "organizations": [
    {
      "code": "string",
      "name": "string",
      "is_default": true
    }
  ],
  "next_token": "string"
}

Responses

Status Meaning Description Schema
200 OK A successful response with a list of organizations or an empty list. Inline
403 Forbidden Invalid credentials. None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» code string false none Response code.
» message string false none Response message.
» organizations [organization] false none none
»» code string false none none
»» name string false none none
»» is_default boolean false none none
» next_token string false none Pagination token.

List Organization Users

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/organization/users',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{businessName}.kinde.com/api/v1/organization/users", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://{businessName}.kinde.com/api/v1/organization/users HTTP/1.1

Accept: application/json

GET /api/v1/organization/users

Get users in an organization.

Parameters

Name In Type Required Description
sort query string false Field and order to sort the result by.
page_size query integer false Number of results per page. Defaults to 10 if parameter not sent.
next_token query string false A string to get the next page of results if there are more results.
code query string false The organization's code.
permissions query string false Filter by user permissions

Enumerated Values

Parameter Value
sort name_asc
sort name_desc
sort email_asc
sort email_desc

Example responses

200 Response

{
  "code": "string",
  "message": "string",
  "organization_users": [
    {
      "id": "string",
      "email": "string",
      "full_name": "string",
      "last_name": "string",
      "first_name": "string"
    }
  ],
  "next_token": "string"
}

Responses

Status Meaning Description Schema
200 OK A succesful response with a list of organization users or an empty list. Inline
400 Bad Request Error creating user error_response
403 Forbidden Invalid credentials. None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» code string false none Response code.
» message string false none Response message.
» organization_users [organization_user] false none none
»» id string false none none
»» email string false none none
»» full_name string false none none
»» last_name string false none none
»» first_name string false none none
» next_token string false none Pagination token.

Assign Users to an Organization

Code samples

const inputBody = '{
  "users": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/organization/users',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://{businessName}.kinde.com/api/v1/organization/users", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://{businessName}.kinde.com/api/v1/organization/users HTTP/1.1

Content-Type: application/json
Accept: application/json

POST /api/v1/organization/users

Add existing users to an organization.

Body parameter

{
  "users": [
    "string"
  ]
}

Parameters

Name In Type Required Description
code query string false The organization's code.
body body object false none
» users body [string] false List of user ids to be added to the organization.

Example responses

200 Response

{
  "code": "string",
  "message": "string",
  "users_added": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK Users successfully added. Inline
204 No Content No users added. None
400 Bad Request Bad request. error_response
403 Forbidden Invalid credentials. None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» code string false none Response code.
» message string false none Response message.
» users_added [string] false none none

Remove Users from an Organization

Code samples

const inputBody = '{
  "users": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/organization/users',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://{businessName}.kinde.com/api/v1/organization/users", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH https://{businessName}.kinde.com/api/v1/organization/users HTTP/1.1

Content-Type: application/json
Accept: application/json

PATCH /api/v1/organization/users

Remove existing users from an organization.

Body parameter

{
  "users": [
    "string"
  ]
}

Parameters

Name In Type Required Description
code query string false The organization's code.
body body object false none
» users body [string] false List of user ids to be removed from the organization.

Example responses

200 Response

{
  "message": "string",
  "users_added": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK Users successfully removed. Inline
400 Bad Request Error creating user. error_response
403 Forbidden Invalid credentials. None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» message string false none none
» users_added [string] false none none

Delete all organization feature flag overrides

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/organizations/{org_code}/feature_flags',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://{businessName}.kinde.com/api/v1/organizations/{org_code}/feature_flags", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE https://{businessName}.kinde.com/api/v1/organizations/{org_code}/feature_flags HTTP/1.1

Accept: application/json

DELETE /api/v1/organizations/{org_code}/feature_flags

Delete all organization feature flag overrides.

Parameters

Name In Type Required Description
org_code path string true The identifier for the organization.

Example responses

200 Response

{
  "message": "string",
  "code": "string"
}

Responses

Status Meaning Description Schema
200 OK Feature flag overrides successfully deleted. success_response
400 Bad Request Invalid request. error_response
403 Forbidden Invalid credentials. None

Delete organization feature flag override

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://{businessName}.kinde.com/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE https://{businessName}.kinde.com/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key} HTTP/1.1

Accept: application/json

DELETE /api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}

Delete organization feature flag override.

Parameters

Name In Type Required Description
org_code path string true The identifier for the organization.
feature_flag_key path string true The identifier for the feature flag.

Example responses

200 Response

{
  "message": "string",
  "code": "string"
}

Responses

Status Meaning Description Schema
200 OK Feature flag override successfully deleted. success_response
400 Bad Request Invalid request. error_response
403 Forbidden Invalid credentials. None

Update organization feature flag override

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}?value=string',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://{businessName}.kinde.com/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH https://{businessName}.kinde.com/api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}?value=string HTTP/1.1

Accept: application/json

PATCH /api/v1/organizations/{org_code}/feature_flags/{feature_flag_key}

Update organization feature flag override.

Parameters

Name In Type Required Description
org_code path string true The identifier for the organization
feature_flag_key path string true The identifier for the feature flag
value query string true Override value

Example responses

200 Response

{
  "message": "string",
  "code": "string"
}

Responses

Status Meaning Description Schema
200 OK Feature flag override successfully updated. success_response
400 Bad Request Invalid request. error_response
403 Forbidden Invalid credentials. None

Connected Apps

Get Connected App URL

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/connected_apps/auth_url?key_code_ref=string&user_id=0',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{businessName}.kinde.com/api/v1/connected_apps/auth_url", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://{businessName}.kinde.com/api/v1/connected_apps/auth_url?key_code_ref=string&user_id=0 HTTP/1.1

Accept: application/json

GET /api/v1/connected_apps/auth_url

Get a URL that authenticates and authorizes a user to a third-party connected app.

Parameters

Name In Type Required Description
key_code_ref query string true The unique key code reference of the connected app to authenticate against.
user_id query integer true The id of the user that needs to authenticate to the third-party connected app.

Example responses

200 Response

{
  "url": "string",
  "session_id": "string"
}

Responses

Status Meaning Description Schema
200 OK A URL that can be used to authenticate and a session id to identify this authentication session. connected_apps_auth_url
403 Forbidden Invalid credentials. None

Get Connected App Token

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/connected_apps/token?session_id=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://{businessName}.kinde.com/api/v1/connected_apps/token", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET https://{businessName}.kinde.com/api/v1/connected_apps/token?session_id=string HTTP/1.1

Accept: application/json

GET /api/v1/connected_apps/token

Get an access token that can be used to call the third-party provider linked to the connected app.

Parameters

Name In Type Required Description
session_id query string true The unique sesssion id reprensenting the login session of a user.

Example responses

200 Response

{
  "access_token": "string",
  "access_token_expiry": "string"
}

Responses

Status Meaning Description Schema
200 OK An access token that can be used to query a third-party provider, as well as the token's expiry time. connected_apps_access_token
400 Bad Request The session id provided points to an invalid session. None
403 Forbidden Invalid credentials. None

Revoke Connected App Token

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/connected_apps/revoke?session_id=string',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://{businessName}.kinde.com/api/v1/connected_apps/revoke", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://{businessName}.kinde.com/api/v1/connected_apps/revoke?session_id=string HTTP/1.1

Accept: application/json

POST /api/v1/connected_apps/revoke

Revoke the tokens linked to the connected app session.

Parameters

Name In Type Required Description
session_id query string true The unique sesssion id reprensenting the login session of a user.

Example responses

200 Response

{
  "result": "string"
}

Responses

Status Meaning Description Schema
200 OK An access token that can be used to query a third-party provider, as well as the token's expiry time. api_result
400 Bad Request Bad request. api_result
403 Forbidden Invalid credentials. api_result
405 Method Not Allowed Invalid HTTP method used. api_result

Feature Flags

Create a new feature flag

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/feature_flags?name=string&description=string&key=string&type=str&allow_override_level=env&default_value=string',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://{businessName}.kinde.com/api/v1/feature_flags", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST https://{businessName}.kinde.com/api/v1/feature_flags?name=string&description=string&key=string&type=str&allow_override_level=env&default_value=string HTTP/1.1

Accept: application/json

POST /api/v1/feature_flags

Create feature flag.

Parameters

Name In Type Required Description
name query string true The name of the flag.
description query string true Description of the flag purpose.
key query string true The flag identifier to use in code.
type query string true The variable type.
allow_override_level query string true Allow the flag to be overridden at a different level.
default_value query string true Default value for the flag used by environments and organizations.

Enumerated Values

Parameter Value
type str
type int
type bool
allow_override_level env
allow_override_level org

Example responses

201 Response

{
  "message": "string",
  "code": "string"
}

Responses

Status Meaning Description Schema
201 Created Feature flag successfully created success_response
400 Bad Request Invalid request. error_response
403 Forbidden Invalid credentials. None

Delete a feature flag

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/feature_flags/{feature_flag_key}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://{businessName}.kinde.com/api/v1/feature_flags/{feature_flag_key}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE https://{businessName}.kinde.com/api/v1/feature_flags/{feature_flag_key} HTTP/1.1

Accept: application/json

DELETE /api/v1/feature_flags/{feature_flag_key}

Delete feature flag

Parameters

Name In Type Required Description
feature_flag_key path string true The identifier for the feature flag.

Example responses

200 Response

{
  "message": "string",
  "code": "string"
}

Responses

Status Meaning Description Schema
200 OK Feature flag successfully updated. success_response
400 Bad Request Invalid request. error_response
403 Forbidden Invalid credentials. None

Update a feature flag

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/feature_flags/{feature_flag_key}?name=string&description=string&key=string&type=str&allow_override_level=env&default_value=string',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://{businessName}.kinde.com/api/v1/feature_flags/{feature_flag_key}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT https://{businessName}.kinde.com/api/v1/feature_flags/{feature_flag_key}?name=string&description=string&key=string&type=str&allow_override_level=env&default_value=string HTTP/1.1

Accept: application/json

PUT /api/v1/feature_flags/{feature_flag_key}

Update feature flag.

Parameters

Name In Type Required Description
feature_flag_key path string true The identifier for the feature flag.
name query string true The name of the flag.
description query string true Description of the flag purpose.
key query string true The flag identifier to use in code.
type query string true The variable type
allow_override_level query string true Allow the flag to be overridden at a different level.
default_value query string true Default value for the flag used by environments and organizations.

Enumerated Values

Parameter Value
type str
type int
type bool
allow_override_level env
allow_override_level org

Example responses

200 Response

{
  "message": "string",
  "code": "string"
}

Responses

Status Meaning Description Schema
200 OK Feature flag successfully updated. success_response
400 Bad Request Invalid request. error_response
403 Forbidden Invalid credentials. None

Environments

Delete all environment feature flag overrides

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/environment/feature_flags/',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://{businessName}.kinde.com/api/v1/environment/feature_flags/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE https://{businessName}.kinde.com/api/v1/environment/feature_flags/ HTTP/1.1

Accept: application/json

DELETE /api/v1/environment/feature_flags/

Delete all environment feature flag overrides.

Example responses

200 Response

{
  "message": "string",
  "code": "string"
}

Responses

Status Meaning Description Schema
200 OK Feature flag overrides deleted successfully. success_response
400 Bad Request Invalid request. error_response
403 Forbidden Invalid credentials. None

Delete environment feature flag override

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/environment/feature_flags/{feature_flag_key}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://{businessName}.kinde.com/api/v1/environment/feature_flags/{feature_flag_key}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE https://{businessName}.kinde.com/api/v1/environment/feature_flags/{feature_flag_key} HTTP/1.1

Accept: application/json

DELETE /api/v1/environment/feature_flags/{feature_flag_key}

Delete environment feature flag override.

Parameters

Name In Type Required Description
feature_flag_key path string true The identifier for the feature flag.

Example responses

200 Response

{
  "message": "string",
  "code": "string"
}

Responses

Status Meaning Description Schema
200 OK Feature flag deleted successfully. success_response
400 Bad Request Invalid request. error_response
403 Forbidden Invalid credentials. None

Update environment feature flag override

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://{businessName}.kinde.com/api/v1/environment/feature_flags/{feature_flag_key}?value=string',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://{businessName}.kinde.com/api/v1/environment/feature_flags/{feature_flag_key}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH https://{businessName}.kinde.com/api/v1/environment/feature_flags/{feature_flag_key}?value=string HTTP/1.1

Accept: application/json

PATCH /api/v1/environment/feature_flags/{feature_flag_key}

Update environment feature flag override.

Parameters

Name In Type Required Description
feature_flag_key path string true The identifier for the feature flag.
value query string true The override value for the feature flag.

Example responses

200 Response

{
  "message": "string",
  "code": "string"
}

Responses

Status Meaning Description Schema
200 OK Feature flag override successful success_response
400 Bad Request Invalid request. error_response
403 Forbidden Invalid credentials. None

Schemas

success_response

{
  "message": "string",
  "code": "string"
}

Properties

Name Type Required Restrictions Description
message string false none none
code string false none none

error

{
  "code": "string",
  "message": "string"
}

Properties

Name Type Required Restrictions Description
code string false none Error code.
message string false none Error message.

error_response

{
  "errors": [
    {
      "code": "string",
      "message": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
errors [error] false none none

user

{
  "id": "string",
  "email": "string",
  "last_name": "string",
  "first_name": "string",
  "is_suspended": true,
  "picture": "string"
}

Properties

Name Type Required Restrictions Description
id string false none Unique id of the user in Kinde.
email string false none Default email address of the user in Kinde.
last_name string false none User's last name.
first_name string false none User's first name.
is_suspended boolean false none Whether the user is currently suspended or not.
picture string¦null false none User's profile picture URL.

users

[
  {
    "id": "string",
    "email": "string",
    "last_name": "string",
    "first_name": "string",
    "is_suspended": true,
    "picture": "string"
  }
]

Array of users.

Properties

Name Type Required Restrictions Description
anonymous [user] false none Array of users.

user_identity

{
  "type": "string",
  "result": {
    "created": true,
    "identity_id": 0
  }
}

Properties

Name Type Required Restrictions Description
type string false none The type of identity object created.
result object false none The result of the user creation operation.
» created boolean false none True if the user identity was successfully created.
» identity_id integer false none Unique id of the user's identity in Kinde.

user_profile

{
  "id": "string",
  "preferred_email": "string",
  "provided_id": "string",
  "last_name": "string",
  "first_name": "string"
}

Properties

Name Type Required Restrictions Description
id string false none Unique id of the user in Kinde.
preferred_email string false none Default email address of the user in Kinde.
provided_id string¦null false none Value of the user's id in a third-party system when the user is imported into Kinde.
last_name string false none User's last name.
first_name string false none User's first name.

user_profile_v2

{
  "id": "string",
  "provided_id": "string",
  "name": "string",
  "given_name": "string",
  "family_name": "string",
  "updated_at": 0,
  "email": "string"
}

Properties

Name Type Required Restrictions Description
id string false none Unique id of the user in Kinde.
provided_id string¦null false none Value of the user's id in a third-party system when the user is imported into Kinde.
name string false none Users's first and last name separated by a space.
given_name string false none User's first name.
family_name string false none User's last name.
updated_at integer false none Date the user was last updated at (In Unix time).
email string false none User's email address if available.

organization

{
  "code": "string",
  "name": "string",
  "is_default": true
}

Properties

Name Type Required Restrictions Description
code string false none none
name string false none none
is_default boolean false none none

organizations

[
  {
    "code": "string",
    "name": "string",
    "is_default": true
  }
]

Properties

Name Type Required Restrictions Description
anonymous [organization] false none none

organization_user

{
  "id": "string",
  "email": "string",
  "full_name": "string",
  "last_name": "string",
  "first_name": "string"
}

Properties

Name Type Required Restrictions Description
id string false none none
email string false none none
full_name string false none none
last_name string false none none
first_name string false none none

organization_users

[
  {
    "id": "string",
    "email": "string",
    "full_name": "string",
    "last_name": "string",
    "first_name": "string"
  }
]

Properties

Name Type Required Restrictions Description
anonymous [organization_user] false none none

connected_apps_auth_url

{
  "url": "string",
  "session_id": "string"
}

Properties

Name Type Required Restrictions Description
url string false none A URL that is used to authenticate an end-user against a connected app.
session_id string false none A unique identifier for the login session.

connected_apps_access_token

{
  "access_token": "string",
  "access_token_expiry": "string"
}

Properties

Name Type Required Restrictions Description
access_token string false none The access token to access a third-party provider.
access_token_expiry string false none The date and time that the access token expires.

api_result

{
  "result": "string"
}

Properties

Name Type Required Restrictions Description
result string false none The result of the api operation.