openapi: 3.2.0 info: title: Partners Client Credentials API version: v1 servers: - url: https://cubi-sandbox-api.customersbank.com/partners/v1 tags: - name: ClientCredentials paths: /client-credentials: post: tags: - ClientCredentials summary: /client-credentials - POST description: Creates a new client credential for the partner. operationId: post-client-credentials parameters: - name: x-idempotency-key in: header description: Unique request idenitfier for idempotency. required: true schema: type: string format: uuid example: 7784eb6f-c1b2-4c76-a53a-b81227de0669 requestBody: content: application/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.CreateClientCredentialDto' example: displayName: string description: string roles: - string isCredentialManager: true startDate: string endDate: string text/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.CreateClientCredentialDto' example: displayName: string description: string roles: - string isCredentialManager: true startDate: string endDate: string application/*+json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.CreateClientCredentialDto' example: displayName: string description: string roles: - string isCredentialManager: true startDate: string endDate: string responses: '201': description: Created content: text/plain: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialCreatedDto' examples: default: value: null application/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialCreatedDto' example: clientId: string clientSecret: string displayName: string description: string roles: - string isCredentialManager: true startDate: string endDate: string createdAt: string text/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialCreatedDto' example: clientId: string clientSecret: string displayName: string description: string roles: - string isCredentialManager: true startDate: string endDate: string createdAt: string '400': description: BadRequest content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.1 title: One or more validation errors occurred. status: 400 traceId: string '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.2 title: Unauthorized status: 401 traceId: string '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.4 title: Forbidden status: 403 traceId: string '422': description: UnprocessableEntity content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails' example: type: https://tools.ietf.org/html/rfc4918#section-11.2 title: Unprocessable Entity status: 422 traceId: string '500': description: InternalServerError content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.6.1 title: An error occurred while processing your request. status: 500 traceId: string get: tags: - ClientCredentials summary: /client-credentials - GET description: Gets all client credentials for the partner. operationId: get-client-credentials responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialDto' examples: default: value: null application/json: schema: type: array items: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialDto' example: - clientId: string secretHint: string displayName: string description: string roles: - string isCredentialManager: true startDate: string endDate: string createdAt: string text/json: schema: type: array items: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialDto' example: - clientId: string secretHint: string displayName: string description: string roles: - string isCredentialManager: true startDate: string endDate: string createdAt: string '400': description: BadRequest content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.1 title: One or more validation errors occurred. status: 400 traceId: string '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.2 title: Unauthorized status: 401 traceId: string '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.4 title: Forbidden status: 403 traceId: string '500': description: InternalServerError content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.6.1 title: An error occurred while processing your request. status: 500 traceId: string /client-credentials/me: get: tags: - ClientCredentials summary: /client-credentials/me - GET description: Gets the client credential for the calling M2M application (from JWT). operationId: get-client-credentials-me responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialDto' examples: default: value: null application/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialDto' example: clientId: string secretHint: string displayName: string description: string roles: - string isCredentialManager: true startDate: string endDate: string createdAt: string text/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialDto' example: clientId: string secretHint: string displayName: string description: string roles: - string isCredentialManager: true startDate: string endDate: string createdAt: string '400': description: BadRequest content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.1 title: One or more validation errors occurred. status: 400 traceId: string '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.2 title: Unauthorized status: 401 traceId: string '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.4 title: Forbidden status: 403 traceId: string '404': description: NotFound content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.5 title: Not Found status: 404 traceId: string '500': description: InternalServerError content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.6.1 title: An error occurred while processing your request. status: 500 traceId: string /client-credentials/{clientId}: get: tags: - ClientCredentials summary: /client-credentials/{clientId} - GET description: Gets a specific client credential by client ID. operationId: get-client-credentials-clientid parameters: - name: clientId in: path required: true schema: type: string responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialDto' examples: default: value: null application/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialDto' example: clientId: string secretHint: string displayName: string description: string roles: - string isCredentialManager: true startDate: string endDate: string createdAt: string text/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialDto' example: clientId: string secretHint: string displayName: string description: string roles: - string isCredentialManager: true startDate: string endDate: string createdAt: string '400': description: BadRequest content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.1 title: One or more validation errors occurred. status: 400 traceId: string '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.2 title: Unauthorized status: 401 traceId: string '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.4 title: Forbidden status: 403 traceId: string '404': description: NotFound content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.5 title: Not Found status: 404 traceId: string '500': description: InternalServerError content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.6.1 title: An error occurred while processing your request. status: 500 traceId: string put: tags: - ClientCredentials summary: /client-credentials/{clientId} - PUT description: Updates the roles for a specific client credential. operationId: put-client-credentials-clientid parameters: - name: clientId in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.UpdateClientCredentialDto' example: roles: - string isCredentialManager: true text/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.UpdateClientCredentialDto' example: roles: - string isCredentialManager: true application/*+json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.UpdateClientCredentialDto' example: roles: - string isCredentialManager: true responses: '202': description: Accepted '400': description: BadRequest content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.1 title: One or more validation errors occurred. status: 400 traceId: string '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.2 title: Unauthorized status: 401 traceId: string '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.4 title: Forbidden status: 403 traceId: string '404': description: NotFound content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.5 title: Not Found status: 404 traceId: string '500': description: InternalServerError content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.6.1 title: An error occurred while processing your request. status: 500 traceId: string delete: tags: - ClientCredentials summary: /client-credentials/{clientId} - DELETE description: Deletes a specific client credential. Self-delete is not allowed. operationId: delete-client-credentials-clientid parameters: - name: clientId in: path required: true schema: type: string responses: '204': description: No Content '400': description: BadRequest content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.1 title: One or more validation errors occurred. status: 400 traceId: string '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.2 title: Unauthorized status: 401 traceId: string '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.4 title: Forbidden status: 403 traceId: string '404': description: NotFound content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.5 title: Not Found status: 404 traceId: string '500': description: InternalServerError content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.6.1 title: An error occurred while processing your request. status: 500 traceId: string /client-credentials/me/rotate: post: tags: - ClientCredentials summary: /client-credentials/me/rotate - POST description: Rotates the client secret for the calling M2M application (from JWT). operationId: post-client-credentials-me-rotate parameters: - name: x-idempotency-key in: header description: Unique request idenitfier for idempotency. required: true schema: type: string format: uuid example: 2eb136f8-e422-456a-8f7d-f05a11a9a3e7 responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialRotatedDto' examples: default: value: null application/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialRotatedDto' example: secretId: string clientSecret: string startDate: string endDate: string createdAt: string text/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialRotatedDto' example: secretId: string clientSecret: string startDate: string endDate: string createdAt: string '400': description: BadRequest content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.1 title: One or more validation errors occurred. status: 400 traceId: string '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.2 title: Unauthorized status: 401 traceId: string '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.4 title: Forbidden status: 403 traceId: string '404': description: NotFound content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.5 title: Not Found status: 404 traceId: string '500': description: InternalServerError content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.6.1 title: An error occurred while processing your request. status: 500 traceId: string /client-credentials/{clientId}/rotate: post: tags: - ClientCredentials summary: /client-credentials/{clientId}/rotate - POST description: Rotates the client secret for a specific client credential. operationId: post-client-credentials-clientid-rotate parameters: - name: clientId in: path required: true schema: type: string - name: x-idempotency-key in: header description: Unique request idenitfier for idempotency. required: true schema: type: string format: uuid example: fba64993-2eca-480d-a02a-f0ce5785d3f9 responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialRotatedDto' examples: default: value: null application/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialRotatedDto' example: secretId: string clientSecret: string startDate: string endDate: string createdAt: string text/json: schema: $ref: '#/components/schemas/Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialRotatedDto' example: secretId: string clientSecret: string startDate: string endDate: string createdAt: string '400': description: BadRequest content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.1 title: One or more validation errors occurred. status: 400 traceId: string '401': description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.2 title: Unauthorized status: 401 traceId: string '403': description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.4 title: Forbidden status: 403 traceId: string '404': description: NotFound content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.5.5 title: Not Found status: 404 traceId: string '500': description: InternalServerError content: application/problem+json: schema: $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails' example: type: https://tools.ietf.org/html/rfc9110#section-15.6.1 title: An error occurred while processing your request. status: 500 traceId: string components: schemas: Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialRotatedDto: required: - clientSecret - secretId type: object properties: secretId: type: string clientSecret: type: string startDate: type: string format: date-time endDate: type: string format: date-time createdAt: type: string format: date-time additionalProperties: false Microsoft.AspNetCore.Mvc.ProblemDetails: type: object properties: type: type: - string - 'null' title: type: - string - 'null' status: type: - integer - 'null' format: int32 detail: type: - string - 'null' traceId: type: - string - 'null' additionalProperties: {} Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialDto: required: - clientId - displayName - secretHint type: object properties: clientId: type: string secretHint: type: string displayName: type: string description: type: - string - 'null' roles: type: array items: type: string isCredentialManager: type: boolean startDate: type: string format: date-time endDate: type: string format: date-time createdAt: type: string format: date-time additionalProperties: false Cubi.Partners.WebApi.Dtos.ClientCredentials.UpdateClientCredentialDto: type: object properties: roles: type: array items: type: string isCredentialManager: type: boolean additionalProperties: false Microsoft.AspNetCore.Mvc.ValidationProblemDetails: type: object properties: type: type: - string - 'null' title: type: - string - 'null' status: type: - integer - 'null' format: int32 detail: type: - string - 'null' traceId: type: - string - 'null' errors: type: object additionalProperties: type: array items: type: string additionalProperties: {} Cubi.Partners.WebApi.Dtos.ClientCredentials.ClientCredentialCreatedDto: required: - clientId - clientSecret - displayName type: object properties: clientId: type: string clientSecret: type: string displayName: type: string description: type: - string - 'null' roles: type: array items: type: string isCredentialManager: type: boolean startDate: type: string format: date-time endDate: type: string format: date-time createdAt: type: string format: date-time additionalProperties: false Cubi.Partners.WebApi.Dtos.ClientCredentials.CreateClientCredentialDto: required: - displayName type: object properties: displayName: type: string description: type: - string - 'null' roles: type: array items: type: string isCredentialManager: type: boolean startDate: type: - string - 'null' format: date-time endDate: type: - string - 'null' format: date-time additionalProperties: false x-readme: explorer-enabled: false proxy-enabled: true