openapi: 3.0.0 info: version: '1' title: Kinde Account API Keys Permissions API description: ' Provides endpoints to operate on an authenticated user. ## Intro ## How to use 1. Get a user access token - this can be obtained when a user signs in via the methods you''ve setup in Kinde (e.g. Google, passwordless, etc). 2. Call one of the endpoints below using the user access token in the Authorization header as a Bearer token. Typically, you can use the `getToken` command in the relevant SDK. ' termsOfService: https://docs.kinde.com/trust-center/agreements/terms-of-service/ contact: name: Kinde Support Team email: support@kinde.com url: https://docs.kinde.com tags: - name: Permissions x-displayName: Permissions paths: /account_api/v1/permissions: servers: [] get: tags: - Permissions operationId: GetUserPermissions summary: Get permissions description: 'Returns all the permissions the user has ' parameters: - name: page_size in: query required: false description: Number of results per page. Defaults to 10 if parameter not sent. schema: type: integer nullable: true - name: starting_after in: query required: false description: The ID of the permission to start after. schema: type: string nullable: true example: perm_1234567890abcdef responses: '200': description: Permissions successfully retrieved. content: application/json: schema: $ref: '#/components/schemas/get_user_permissions_response' '403': description: Invalid credentials. '429': description: Request was throttled. security: - kindeBearerAuth: [] /api/v1/permissions: servers: [] get: tags: - Permissions operationId: GetPermissions x-scope: read:permissions description: "The returned list can be sorted by permission name or permission 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.\n\n
\n read:permissions\n
\n" summary: List Permissions parameters: - name: sort in: query description: Field and order to sort the result by. schema: type: string nullable: true enum: - name_asc - name_desc - id_asc - id_desc - name: page_size in: query description: Number of results per page. Defaults to 10 if parameter not sent. schema: type: integer nullable: true - name: next_token in: query description: A string to get the next page of results if there are more results. schema: type: string nullable: true responses: '200': description: Permissions successfully retrieved. content: application/json: schema: $ref: '#/components/schemas/get_permissions_response' application/json; charset=utf-8: schema: $ref: '#/components/schemas/get_permissions_response' '403': description: Invalid credentials. content: application/json: schema: $ref: '#/components/schemas/error_response' application/json; charset=utf-8: schema: $ref: '#/components/schemas/error_response' '429': description: Request was throttled. security: - kindeBearerAuth: [] post: tags: - Permissions operationId: CreatePermission x-scope: create:permissions description: "Create a new permission.\n\n
\n create:permissions\n
\n" summary: Create Permission requestBody: description: Permission details. required: false content: application/json: schema: type: object properties: name: description: The permission's name. type: string description: description: The permission's description. type: string key: description: The permission identifier to use in code. type: string responses: '201': description: Permission successfully created content: application/json: schema: $ref: '#/components/schemas/success_response' application/json; charset=utf-8: schema: $ref: '#/components/schemas/success_response' '400': description: Invalid request. content: application/json: schema: $ref: '#/components/schemas/error_response' application/json; charset=utf-8: schema: $ref: '#/components/schemas/error_response' '403': description: Invalid credentials. content: application/json: schema: $ref: '#/components/schemas/error_response' application/json; charset=utf-8: schema: $ref: '#/components/schemas/error_response' '429': description: Request was throttled. security: - kindeBearerAuth: [] /api/v1/permissions/{permission_id}: servers: [] patch: tags: - Permissions operationId: UpdatePermissions x-scope: update:permissions description: "Update permission\n\n
\n update:permissions\n
\n" summary: Update Permission parameters: - name: permission_id in: path description: The identifier for the permission. required: true schema: type: string nullable: false requestBody: description: Permission details. required: false content: application/json: schema: type: object properties: name: description: The permission's name. type: string description: description: The permission's description. type: string key: description: The permission identifier to use in code. type: string responses: '200': description: Permission successfully updated content: application/json: schema: $ref: '#/components/schemas/success_response' application/json; charset=utf-8: schema: $ref: '#/components/schemas/success_response' '400': description: Invalid request. content: application/json: schema: $ref: '#/components/schemas/error_response' application/json; charset=utf-8: schema: $ref: '#/components/schemas/error_response' '403': description: Invalid credentials. content: application/json: schema: $ref: '#/components/schemas/error_response' application/json; charset=utf-8: schema: $ref: '#/components/schemas/error_response' '429': description: Request was throttled. security: - kindeBearerAuth: [] delete: tags: - Permissions operationId: DeletePermission x-scope: delete:permissions description: "Delete permission\n\n
\n delete:permissions\n
\n" summary: Delete Permission parameters: - name: permission_id in: path description: The identifier for the permission. required: true schema: type: string responses: '200': description: permission successfully updated. content: application/json: schema: $ref: '#/components/schemas/success_response' application/json; charset=utf-8: schema: $ref: '#/components/schemas/success_response' '400': description: Invalid request. content: application/json: schema: $ref: '#/components/schemas/error_response' application/json; charset=utf-8: schema: $ref: '#/components/schemas/error_response' '403': description: Invalid credentials. '429': description: Request was throttled. security: - kindeBearerAuth: [] components: schemas: error: type: object properties: code: type: string description: Error code. message: type: string description: Error message. permissions: type: object properties: id: type: string description: The permission's ID. key: type: string description: The permission identifier to use in code. name: type: string description: The permission's name. description: type: string description: The permission's description. get_user_permissions_response: type: object properties: data: type: object properties: org_code: type: string description: The organization code the roles are associated with. example: org_0195ac80a14e permissions: type: array description: A list of permissions items: type: object properties: id: type: string description: The friendly ID of a permission example: perm_0195ac80a14e8d71f42b98e75d3c61ad name: type: string description: The name of the permission example: View reports key: type: string description: The key of the permission example: view_reports metadata: type: object properties: has_more: type: boolean description: Whether more records exist. example: false next_page_starting_after: type: string description: The ID of the last record on the current page. example: perm_0195ac80a14e8d71f42b98e75d3c61ad success_response: type: object properties: message: type: string example: Success code: type: string example: OK error_response: type: object properties: errors: type: array items: $ref: '#/components/schemas/error' get_permissions_response: type: object properties: code: type: string description: Response code. message: type: string description: Response message. permissions: type: array items: $ref: '#/components/schemas/permissions' next_token: type: string description: Pagination token. securitySchemes: kindeBearerAuth: description: 'To access these endpoints, you will need to use a user token. This can be 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. ' type: http scheme: bearer bearerFormat: JWT