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.
Welcome to Kinde’s Management API docs. This is your library of API requests and responses.
If you haven’t already connected your app to our API, you’ll need to do these tasks first:
- Add a machine to machine application for API access
- Get access token for connecting
- Test the connection — we show you how in Postman
Once you’re connected, you can browse the API library for what you need.
Base URLs
Make sure you use your own Kinde domain as the base URL wherever you see http://{businessName}.kinde.com.
To find this in Kinde, go to Settings > Applications > View details (on the relevant app) and copy it from the App keys > Domain field.
Need more help?
Reach out in the Kinde community on Slack
Email support@kinde.com
Authentication
To access endpoints in the API, you need to go through the three set up steps above.
To access the OAuth endpoint, use the token obtained when your users sign in via the methods you've setup in Kinde (e.g. google, passwordless, etc). Find this using the getToken command in the relevant SDK.
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. | users_response |
403 | Forbidden | Invalid credentials. | None |
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. | error_response |
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": "email",
"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": "email",
"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. |
body | string | false | The email address of the user. |
Enumerated Values
Parameter | Value |
---|---|
»» type |
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. | create_user_response |
400 | Bad Request | Error creating user. | error_response |
403 | Forbidden | Invalid credentials. | None |
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",
"sub": "string",
"provided_id": "string",
"name": "string",
"given_name": "string",
"family_name": "string",
"updated_at": 0,
"email": "string",
"picture": "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"
},
"external_id": "string",
"background_color": "string",
"button_color": "string",
"button_text_color": "string",
"link_color": "string"
}';
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"
},
"external_id": "string",
"background_color": "string",
"button_color": "string",
"button_text_color": "string",
"link_color": "string"
}
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. |
» external_id | body | string | false | The organization's ID. |
» background_color | body | string | false | The organization's brand settings - background color. |
» button_color | body | string | false | The organization's brand settings - button color. |
» button_text_color | body | string | false | The organization's brand settings - button text color. |
» link_color | body | string | false | The organization's brand settings - link color. |
Enumerated Values
Parameter | Value |
---|---|
»» additionalProperties | str |
»» additionalProperties | int |
»» additionalProperties | bool |
Example responses
200 Response
{
"code": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Organization successfully created. | create_organization_response |
400 | Bad Request | Error creating user. | error_response |
403 | Forbidden | Invalid credentials. | None |
500 | Internal Server Error | Could not create organization. | None |
Update Organization
Code samples
const inputBody = '{
"name": "string",
"external_id": "string",
"background_color": "string",
"button_color": "string",
"button_text_color": "string",
"link_color": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://{businessName}.kinde.com/api/v1/organizations/{org_code}',
{
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/organizations/{org_code}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH https://{businessName}.kinde.com/api/v1/organizations/{org_code} HTTP/1.1
Content-Type: application/json
Accept: application/json
PATCH /api/v1/organizations/{org_code}
Update an organization.
Body parameter
{
"name": "string",
"external_id": "string",
"background_color": "string",
"button_color": "string",
"button_text_color": "string",
"link_color": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
org_code | path | string | true | The identifier for the organization. |
body | body | object | false | Organization details. |
» name | body | string | false | The organization's name. |
» external_id | body | string | false | The organization's ID. |
» background_color | body | string | false | The organization's brand settings - background color. |
» button_color | body | string | false | The organization's brand settings - button color. |
» button_text_color | body | string | false | The organization's brand settings - button text color. |
» link_color | body | string | false | The organization's brand settings - link color. |
Example responses
400 Response
{
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Organization successfully updated. | None |
400 | Bad Request | Error updating organization. | error_response |
403 | Forbidden | Invalid credentials. | 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. | get_organizations_response |
403 | Forbidden | Invalid credentials. | None |
List Organization Users
Code samples
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://{businessName}.kinde.com/api/v1/organizations/{org_code}/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/organizations/{org_code}/users", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET https://{businessName}.kinde.com/api/v1/organizations/{org_code}/users HTTP/1.1
Accept: application/json
GET /api/v1/organizations/{org_code}/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. |
org_code | path | string | true | 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 successful response with a list of organization users or an empty list. | get_organizations_users_response |
400 | Bad Request | Error creating user | error_response |
403 | Forbidden | Invalid credentials. | None |
Add organization users
Code samples
const inputBody = '{
"users": [
{
"id": "string",
"roles": [
"string"
],
"permissions": [
"string"
]
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://{businessName}.kinde.com/api/v1/organizations/{org_code}/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/organizations/{org_code}/users", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST https://{businessName}.kinde.com/api/v1/organizations/{org_code}/users HTTP/1.1
Content-Type: application/json
Accept: application/json
POST /api/v1/organizations/{org_code}/users
Add existing users to an organization.
Body parameter
{
"users": [
{
"id": "string",
"roles": [
"string"
],
"permissions": [
"string"
]
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
org_code | path | string | true | The organization's code. |
body | body | object | false | none |
» users | body | [object] | false | Users to be added to the organization. |
»» id | body | string | false | The users id. |
»» roles | body | [string] | false | Role keys to assign to the user. |
»» permissions | body | [string] | false | Permission keys to assign to the user. |
Example responses
200 Response
{
"code": "string",
"message": "string",
"users_added": [
"string"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Users successfully added. | add_organization_users_response |
204 | No Content | No users added. | None |
400 | Bad Request | Bad request. | error_response |
403 | Forbidden | Invalid credentials. | None |
Update organization users
Code samples
const inputBody = '{
"users": [
{
"id": "string",
"operation": "string",
"roles": [
"string"
],
"permissions": [
"string"
]
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://{businessName}.kinde.com/api/v1/organizations/{org_code}/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/organizations/{org_code}/users", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH https://{businessName}.kinde.com/api/v1/organizations/{org_code}/users HTTP/1.1
Content-Type: application/json
Accept: application/json
PATCH /api/v1/organizations/{org_code}/users
Update users that belong to an organization.
Body parameter
{
"users": [
{
"id": "string",
"operation": "string",
"roles": [
"string"
],
"permissions": [
"string"
]
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
org_code | path | string | true | The organization's code. |
body | body | object | false | none |
» users | body | [object] | false | Users to be added to the organization. |
»» id | body | string | false | The users id. |
»» operation | body | string | false | Optional operation, set to 'delete' to remove the user from the organization. |
»» roles | body | [string] | false | Role keys to assign to the user. |
»» permissions | body | [string] | false | Permission keys to assign to the user. |
Example responses
200 Response
{
"message": "string",
"users_added": [
"string"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Users successfully removed. | remove_organization_users_response |
400 | Bad Request | Error creating user. | error_response |
403 | Forbidden | Invalid credentials. | None |
Remove organization user
Code samples
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://{businessName}.kinde.com/api/v1/organizations/{org_code}/users/{user_id}',
{
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}/users/{user_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE https://{businessName}.kinde.com/api/v1/organizations/{org_code}/users/{user_id} HTTP/1.1
Accept: application/json
DELETE /api/v1/organizations/{org_code}/users/{user_id}
Remove user from an organization.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
org_code | path | string | true | The organization's code. |
user_id | path | string | true | The user's id. |
Example responses
200 Response
{
"message": "string",
"code": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | User successfully removed from | success_response |
400 | Bad Request | Error removing user | error_response |
403 | Forbidden | Invalid credentials. | 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=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/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=string 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 | string | 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 |
400 | Bad Request | Error retrieving connected app auth url. | error_response |
403 | Forbidden | Invalid credentials. | None |
404 | Not Found | Error retrieving connected app auth url. | error_response |
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. | error_response |
403 | Forbidden | Invalid credentials. | error_response |
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
{
"message": "string",
"code": "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. | success_response |
400 | Bad Request | Bad request. | error_response |
403 | Forbidden | Invalid credentials. | error_response |
405 | Method Not Allowed | Invalid HTTP method used. | None |
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 |
Roles
List Roles
Code samples
const headers = {
'Accept':'application/json; charset=utf-8',
'Authorization':'Bearer {access-token}'
};
fetch('https://{businessName}.kinde.com/api/v1/roles',
{
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; charset=utf-8"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{businessName}.kinde.com/api/v1/roles", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET https://{businessName}.kinde.com/api/v1/roles HTTP/1.1
Accept: application/json; charset=utf-8
GET /api/v1/roles
The returned list can be sorted by role name or role ID 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. |
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 | id_asc |
sort | id_desc |
Example responses
200 Response
{
"message": "string",
"code": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Roles successfully retrieved. | success_response |
403 | Forbidden | Invalid credentials. | error_response |
Create a new role
Code samples
const inputBody = '{
"name": "string",
"description": "string",
"key": "string",
"is_default_role": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json; charset=utf-8',
'Authorization':'Bearer {access-token}'
};
fetch('https://{businessName}.kinde.com/api/v1/role',
{
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; charset=utf-8"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{businessName}.kinde.com/api/v1/role", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST https://{businessName}.kinde.com/api/v1/role HTTP/1.1
Content-Type: application/json
Accept: application/json; charset=utf-8
POST /api/v1/role
Create role.
Body parameter
{
"name": "string",
"description": "string",
"key": "string",
"is_default_role": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | false | Role details. |
» name | body | string | false | The role's name. |
» description | body | string | false | The role's description. |
» key | body | string | false | The role identifier to use in code. |
» is_default_role | body | boolean | false | Set role as default for new users. |
Example responses
201 Response
{
"message": "string",
"code": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Role successfully created | success_response |
400 | Bad Request | Invalid request. | error_response |
403 | Forbidden | Invalid credentials. | error_response |
Update a role
Code samples
const inputBody = '{
"name": "string",
"description": "string",
"key": "string",
"is_default_role": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json; charset=utf-8',
'Authorization':'Bearer {access-token}'
};
fetch('https://{businessName}.kinde.com/api/v1/roles/{role_id}',
{
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; charset=utf-8"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "https://{businessName}.kinde.com/api/v1/roles/{role_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH https://{businessName}.kinde.com/api/v1/roles/{role_id} HTTP/1.1
Content-Type: application/json
Accept: application/json; charset=utf-8
PATCH /api/v1/roles/{role_id}
Update role
Body parameter
{
"name": "string",
"description": "string",
"key": "string",
"is_default_role": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
role_id | path | integer | true | The identifier for the role. |
body | body | object | false | Role details. |
» name | body | string | false | The role's name. |
» description | body | string | false | The role's description. |
» key | body | string | false | The role identifier to use in code. |
» is_default_role | body | boolean | false | Set role as default for new users. |
Example responses
201 Response
{
"message": "string",
"code": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Role successfully updated | success_response |
400 | Bad Request | Invalid request. | error_response |
403 | Forbidden | Invalid credentials. | error_response |
Callbacks
List Callback URLs
Code samples
const headers = {
'Accept':'application/json; charset=utf-8',
'Authorization':'Bearer {access-token}'
};
fetch('https://{businessName}.kinde.com/api/v1/applications/{app_id}/auth_redirect_urls',
{
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; charset=utf-8"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{businessName}.kinde.com/api/v1/applications/{app_id}/auth_redirect_urls", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET https://{businessName}.kinde.com/api/v1/applications/{app_id}/auth_redirect_urls HTTP/1.1
Accept: application/json; charset=utf-8
GET /api/v1/applications/{app_id}/auth_redirect_urls
Returns an application's redirect callback URLs.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
app_id | path | string | true | The identifier for the application. |
Example responses
200 Response
{
"redirect_urls": [
"string"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Callback URLs successfully retrieved. | redirect_callback_urls |
400 | Bad Request | Invalid request. | error_response |
403 | Forbidden | Invalid credentials. | error_response |
Add Redirect Callback URLs
Code samples
const headers = {
'Authorization':'Bearer {access-token}'
};
fetch('https://{businessName}.kinde.com/api/v1/applications/{app_id}/auth_redirect_urls?urls=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{
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{businessName}.kinde.com/api/v1/applications/{app_id}/auth_redirect_urls", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST https://{businessName}.kinde.com/api/v1/applications/{app_id}/auth_redirect_urls?urls=string HTTP/1.1
POST /api/v1/applications/{app_id}/auth_redirect_urls
Add additional redirect callback URLs.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
app_id | path | string | true | The identifier for the application. |
urls | query | array[string] | true | Array of callback urls. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Callback URL successfully updated. | None |
403 | Forbidden | Invalid credentials. | None |
Replace redirect callback URLs
Code samples
const headers = {
'Authorization':'Bearer {access-token}'
};
fetch('https://{businessName}.kinde.com/api/v1/applications/{app_id}/auth_redirect_urls?urls=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{
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{businessName}.kinde.com/api/v1/applications/{app_id}/auth_redirect_urls", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT https://{businessName}.kinde.com/api/v1/applications/{app_id}/auth_redirect_urls?urls=string HTTP/1.1
PUT /api/v1/applications/{app_id}/auth_redirect_urls
Replace all redirect callback URLs.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
app_id | path | string | true | The identifier for the application. |
urls | query | array[string] | true | Array of callback urls. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Callback URL successfully updated. | None |
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. |
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. |
users_response
{
"code": "string",
"message": "string",
"users": [
{
"id": "string",
"email": "string",
"last_name": "string",
"first_name": "string",
"is_suspended": true,
"picture": "string"
}
],
"next_token": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | Response code. |
message | string | false | none | Response message. |
users | [user] | false | none | none |
next_token | string | false | none | Pagination token. |
create_user_response
{
"id": "string",
"created": true,
"identities": [
{
"type": "string",
"result": {
"created": true,
"identity_id": 0
}
}
]
}
Properties
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 |
create_organization_response
{
"code": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | The organization's code. |
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",
"picture": "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. |
picture | string | false | none | URL that point's to the user's picture or avatar |
user_profile_v2
{
"id": "string",
"sub": "string",
"provided_id": "string",
"name": "string",
"given_name": "string",
"family_name": "string",
"updated_at": 0,
"email": "string",
"picture": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | Unique id of the user in Kinde (deprecated). |
sub | 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). |
string | false | none | User's email address if available. | |
picture | string | false | none | URL that point's to the user's picture or avatar |
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 |
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 |
get_organizations_response
{
"code": "string",
"message": "string",
"organizations": [
{
"code": "string",
"name": "string",
"is_default": true
}
],
"next_token": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | Response code. |
message | string | false | none | Response message. |
organizations | [organization] | false | none | none |
next_token | string | false | none | Pagination token. |
get_organizations_users_response
{
"code": "string",
"message": "string",
"organization_users": [
{
"id": "string",
"email": "string",
"full_name": "string",
"last_name": "string",
"first_name": "string"
}
],
"next_token": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | Response code. |
message | string | false | none | Response message. |
organization_users | [organization_user] | false | none | none |
next_token | string | false | none | Pagination token. |
add_organization_users_response
{
"code": "string",
"message": "string",
"users_added": [
"string"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | Response code. |
message | string | false | none | Response message. |
users_added | [string] | false | none | none |
remove_organization_users_response
{
"message": "string",
"users_added": [
"string"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | false | none | none |
users_added | [string] | 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. |
application
{
"app_id": "string",
"name": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
app_id | string | false | none | none |
name | string | false | none | none |
get_applications_response
{
"code": "string",
"message": "string",
"organizations": [
{
"app_id": "string",
"name": "string"
}
],
"next_token": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | Response code. |
message | string | false | none | Response message. |
organizations | [application] | false | none | none |
next_token | string | false | none | Pagination token. |
redirect_callback_urls
{
"redirect_urls": [
"string"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
redirect_urls | [string] | false | none | An application's redirect URLs. |
get_redirect_callback_urls_response
{
"redirect_urls": [
{
"redirect_urls": [
"string"
]
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
redirect_urls | [redirect_callback_urls] | false | none | An application's redirect callback URLs. |
roles
{
"key": "string",
"name": "string",
"description": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
key | string | false | none | The role identifier to use in code. |
name | string | false | none | The role's name. |
description | string | false | none | The role's description. |