openapi: 3.0.1 info: contact: email: hello@wordlift.io name: WordLift url: https://wordlift.io description: Generate completions based on customized linguistic models. license: name: (c) copyright 2022-present WordLift url: https://wordlift.io termsOfService: https://wordlift.io/terms-of-service/ title: Content Generation version: "1.0" servers: - url: https://api.wordlift.io tags: - description: List the available linguistic models. name: ContentGeneration Models - description: Manage content generation rules. name: ContentGeneration Rules - description: Operations on Content Generation projects. name: Content Generations - description: List fields from graphql query. name: ContentGeneration Fields - description: Manage Record Validations. name: ContentGeneration Record Validations - description: Manage content generation syncs. name: ContentGeneration Syncs - description: Operations on Word biases connected to prompts. name: ContentGeneration Word biases - description: Manage Presets name: ContentGeneration Presets - description: Manage content generation record stats. name: ContentGeneration Record Stats - description: Manage content generation records. name: ContentGeneration Records - description: Manage Validation Syncs. name: ContentGeneration Validation Syncs paths: /content-generations: get: operationId: listContentGenerations parameters: - description: The cursor in: query name: cursor required: false schema: type: string - description: The maximum number of results in: query name: limit required: false schema: type: integer default: 10 - description: Filter for the deleted flag in: query name: deleted required: false schema: type: boolean responses: "200": content: application/json: schema: $ref: '#/components/schemas/PageContentGeneration' description: Found. "401": description: Authentication Failure security: - security_oauth2: [] summary: List projects tags: - Content Generations post: operationId: createContentGeneration requestBody: content: application/json: schema: $ref: '#/components/schemas/ContentGenerationRequest' required: true responses: "201": content: application/json: schema: $ref: '#/components/schemas/ContentGeneration' description: Created "401": description: Authentication Failure security: - security_oauth2: [] summary: Create new tags: - Content Generations /content-generations/{contentGenerationId}/fields: get: operationId: listFields parameters: - description: The cursor in: query name: cursor required: false schema: type: string - description: The maximum number of results in: query name: limit required: false schema: type: integer default: 10 - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 responses: "200": content: application/json: schema: $ref: '#/components/schemas/PageField' description: Found. "401": description: Authentication Failure security: - security_oauth2: [] summary: List fields on graphql query tags: - ContentGeneration Fields /content-generations/{contentGenerationId}/record-stats: get: operationId: get stats parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 responses: "200": content: application/json: schema: $ref: '#/components/schemas/Stats' description: Found. "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Get Stats tags: - ContentGeneration Record Stats /content-generations/{contentGenerationId}/records: get: operationId: listRecords parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 - description: The cursor in: query name: cursor required: false schema: type: string - description: The maximum number of results in: query name: limit required: false schema: type: integer default: 10 - description: The record status in: query name: status required: false schema: $ref: '#/components/schemas/Status' - description: Search query in: query name: q required: false schema: type: string responses: "200": content: application/json: schema: $ref: '#/components/schemas/PageRecord' description: Found. "401": description: Authentication Failure security: - security_oauth2: [] summary: List Records tags: - ContentGeneration Records /content-generations/{contentGenerationId}/records/{recordId}: get: operationId: get record parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 - description: The Record id. in: path name: recordId required: true schema: type: integer format: int64 responses: "200": content: application/json: schema: $ref: '#/components/schemas/Record' description: Found. "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Get record tags: - ContentGeneration Records put: operationId: update record parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 - description: The Record id. in: path name: recordId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/Request' required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/Record' description: Found. "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Update record tags: - ContentGeneration Records /content-generations/{contentGenerationId}/records/{recordId}/validations: post: operationId: create record validation parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 - description: The Record id. in: path name: recordId required: true schema: type: integer format: int64 responses: "200": content: application/json: schema: $ref: '#/components/schemas/Record' description: Found. "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Validate record tags: - ContentGeneration Record Validations /content-generations/{contentGenerationId}/rules: get: operationId: listRules parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 - description: The cursor in: query name: cursor required: false schema: type: string - description: The maximum number of results in: query name: limit required: false schema: type: integer default: 10 responses: "200": content: application/json: schema: $ref: '#/components/schemas/PageRule' description: Found. "401": description: Authentication Failure security: - security_oauth2: [] summary: List Rules tags: - ContentGeneration Rules post: operationId: createRule parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/RuleRequest' required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/Rule' description: Found. "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: create Rule tags: - ContentGeneration Rules /content-generations/{contentGenerationId}/rules/{id}: delete: operationId: deleteRule parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 - description: The id in: path name: id required: true schema: type: integer format: int64 responses: "200": description: Found. "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Delete Rule tags: - ContentGeneration Rules put: operationId: updateRule parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 - description: The id in: path name: id required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/RuleRequest' required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/Rule' description: Found. "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Update Rule tags: - ContentGeneration Rules /content-generations/{contentGenerationId}/syncs: post: operationId: createSync parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 responses: "200": content: application/json: schema: $ref: '#/components/schemas/ContentGenerationSync' description: Found. "401": description: Authentication Failure security: - security_oauth2: [] summary: Start tags: - ContentGeneration Syncs /content-generations/{contentGenerationId}/validation-syncs: get: operationId: listValidationSyncs parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 - description: The cursor in: query name: cursor required: false schema: type: string - description: The maximum number of results in: query name: limit required: false schema: type: integer default: 10 - description: "The sorting, `+id` or `-id`" in: query name: sort required: false schema: type: string default: +id responses: "200": content: application/json: schema: $ref: '#/components/schemas/PageValidationSync' description: Found. "401": description: Authentication Failure security: - security_oauth2: [] summary: List Validation Syncs tags: - ContentGeneration Validation Syncs post: operationId: createValidationSync parameters: - description: The Content Generation id. in: path name: contentGenerationId required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/ValidationSyncRequest' required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/ValidationSync' description: Found. "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Create Completion sync tags: - ContentGeneration Validation Syncs /content-generations/{contentGenerationId}/words: get: operationId: listWords parameters: - in: query name: The cursor. required: false schema: type: string - in: query name: The maximum number of results. required: false schema: type: integer format: int32 default: 10 responses: "200": content: application/json: schema: $ref: '#/components/schemas/PageWord' description: Found. "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: List the Word biases associated with the specified Prompt tags: - ContentGeneration Word biases post: operationId: createWord parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/WordRequest' required: true responses: "201": content: application/json: schema: $ref: '#/components/schemas/Word' description: Created "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Create a Word bias tags: - ContentGeneration Word biases put: description: Send a list of word biases for this prompt. Existing words they will be deleted. operationId: createWordsFromCSV_1 parameters: - in: header name: content-type required: false schema: type: string requestBody: content: application/json: schema: type: array items: $ref: '#/components/schemas/WordRequest' text/csv: schema: type: string required: true responses: "201": content: application/json: schema: type: array items: $ref: '#/components/schemas/Word' description: Created "204": description: No Content "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Update words from csv file tags: - ContentGeneration Word biases /content-generations/{contentGenerationId}/words/{id}: delete: operationId: deleteWord parameters: [] responses: "200": description: Created "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Delete a Word bias tags: - ContentGeneration Word biases put: operationId: updateWord parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/WordRequest' required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/Word' description: Updated "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Update a Word bias tags: - ContentGeneration Word biases /content-generations/{id}: delete: operationId: deleteContentGeneration parameters: - description: The Content Generation id. in: path name: id required: true schema: type: integer format: int64 responses: "200": description: Deleted "401": description: Authentication Failure security: - security_oauth2: [] summary: Delete by id tags: - Content Generations get: operationId: getContentGeneration parameters: - description: The Content Generation id. in: path name: id required: true schema: type: integer format: int64 responses: "200": content: application/json: schema: $ref: '#/components/schemas/ContentGeneration' description: Found. "401": description: Authentication Failure "404": description: Not Found security: - security_oauth2: [] summary: Get by id tags: - Content Generations put: operationId: updateContentGeneration parameters: - description: The Content Generation id. in: path name: id required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/ContentGenerationRequest' required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/ContentGeneration' description: Update "401": description: Authentication Failure security: - security_oauth2: [] summary: Update tags: - Content Generations /graphql-query-presets: get: operationId: listPresets parameters: - description: The cursor in: query name: cursor required: false schema: type: string - description: The maximum number of results in: query name: limit required: false schema: type: integer default: 10 responses: "200": content: application/json: schema: $ref: '#/components/schemas/PagePreset' description: Found. "401": description: Authentication Failure security: - security_oauth2: [] summary: List Presets tags: - ContentGeneration Presets /models: get: operationId: listModels parameters: - description: The cursor in: query name: cursor required: false schema: type: string - description: The maximum number of results in: query name: limit required: false schema: type: integer default: 10 responses: "200": content: application/json: schema: $ref: '#/components/schemas/PageModel' description: Found. "401": description: Authentication Failure summary: List objects according to the cursor specifications and limit tags: - ContentGeneration Models components: schemas: ApplyTo: type: string enum: - ALL - OLD_VERSION - MISSING ContentGeneration: type: object description: A Content Generation project. properties: account_id: type: integer format: int64 description: The Account id bound to this Content Generation. created_at: type: string format: date-time description: The create date-time. readOnly: true deleted: type: boolean default: false description: True if the project has been deleted. deleted_at: type: string format: date-time description: The delete date-time. readOnly: true graphql_query: type: string description: The GraphQL query which will be used to import entity data from the Knowledge Graph. id: type: integer format: int64 description: The unique id. readOnly: true max_tokens: type: integer format: int32 default: 64 description: The maximum number of tokens. maximum: 2000 minimum: 0 model: type: string default: ada description: The model name. maxLength: 250 minLength: 0 modified_at: type: string format: date-time description: The last modified date-time. readOnly: true name: type: string description: The name. maxLength: 250 minLength: 0 penalty: type: number format: double default: 0.5 description: The penalty score. exclusiveMaximum: false exclusiveMinimum: false maximum: 1.9 minimum: 0.5 prompt_template: type: string description: The prompt template. stop: type: string default: '###' description: The stop sequence. temperature: type: number format: double default: 0.4 description: The temperature score. exclusiveMaximum: false exclusiveMinimum: false maximum: 0.8 minimum: 0.4 required: - account_id - deleted - graphql_query - name ContentGenerationRequest: type: object description: The Content Generation request. properties: account_id: type: integer format: int64 description: The account id bound to this content generation. deleted: type: boolean default: false description: The deleted flag. graphql_query: type: string description: The GraphQL query which will be used to import entity data from the Knowledge Graph. max_tokens: type: integer format: int32 default: 64 description: The maximum number of tokens. maximum: 2000 minimum: 0 model: type: string default: ada description: The model name. maxLength: 250 minLength: 0 name: type: string description: The model name. maxLength: 250 minLength: 0 penalty: type: number format: double default: 0.5 description: The penalty score. exclusiveMaximum: false exclusiveMinimum: false maximum: 1.9 minimum: 0.5 prompt_template: type: string description: The prompt template. stop: type: string default: '###' description: The stop sequence. temperature: type: number format: double default: 0.4 description: The temperature score. exclusiveMaximum: false exclusiveMinimum: false maximum: 0.8 minimum: 0.4 required: - account_id - graphql_query - name ContentGenerationSync: type: object properties: content_generation_id: type: integer format: int64 description: The parent content generation id. readOnly: true created_at: type: string format: date-time description: The create date-time. readOnly: true entities_created: type: integer format: int32 description: The number of created entities readOnly: true entities_errored: type: integer format: int32 description: The number of errored entities readOnly: true entities_total: type: integer format: int32 description: "The total number of processed entities, including the skipped\ \ and errored." readOnly: true has_errors: type: boolean description: Whether the sync encountered errors. readOnly: true id: type: integer format: int64 description: The unique id. readOnly: true modified_at: type: string format: date-time description: The last modified date-time. readOnly: true started_at: type: string format: date-time description: The started date-time. readOnly: true stopped_at: type: string format: date-time description: The stopped date-time. readOnly: true required: - content_generation_id Field: type: object description: An array of objects. properties: id: type: integer format: int64 name: type: string Json: type: object description: The data from knowledge graph after applying the graphql query. readOnly: true LevelEnum: type: string description: The rule level. enum: - RECOMMENDED - REQUIRED Model: type: object description: A linguistic model. properties: id: type: string description: A string which uniquely identifies a linguistic model. Please note that this may become a number in the future. PageContentGeneration: type: object description: A page object with links to move to other pages and the list of objects. properties: first: type: string description: The link to the first page. nullable: true items: type: array description: An array of objects. items: $ref: '#/components/schemas/ContentGeneration' last: type: string description: The link to the last page. nullable: true next: type: string description: The link to the next page or `null` if there's no page. nullable: true prev: type: string description: The link to the previous page or `null` if there's no page. nullable: true self: type: string description: The link to the current page. nullable: true required: - first - items - last - next - prev - self PageField: type: object description: A page object with links to move to other pages and the list of objects. properties: first: type: string description: The link to the first page. nullable: true items: type: array description: An array of objects. items: $ref: '#/components/schemas/Field' last: type: string description: The link to the last page. nullable: true next: type: string description: The link to the next page or `null` if there's no page. nullable: true prev: type: string description: The link to the previous page or `null` if there's no page. nullable: true self: type: string description: The link to the current page. nullable: true required: - first - items - last - next - prev - self PageModel: type: object description: A page object with links to move to other pages and the list of objects. properties: first: type: string description: The link to the first page. nullable: true items: type: array description: An array of objects. items: $ref: '#/components/schemas/Model' last: type: string description: The link to the last page. nullable: true next: type: string description: The link to the next page or `null` if there's no page. nullable: true prev: type: string description: The link to the previous page or `null` if there's no page. nullable: true self: type: string description: The link to the current page. nullable: true required: - first - items - last - next - prev - self PagePreset: type: object description: A page object with links to move to other pages and the list of objects. properties: first: type: string description: The link to the first page. nullable: true items: type: array description: An array of objects. items: $ref: '#/components/schemas/Preset' last: type: string description: The link to the last page. nullable: true next: type: string description: The link to the next page or `null` if there's no page. nullable: true prev: type: string description: The link to the previous page or `null` if there's no page. nullable: true self: type: string description: The link to the current page. nullable: true required: - first - items - last - next - prev - self PageRecord: type: object description: A page object with links to move to other pages and the list of objects. properties: first: type: string description: The link to the first page. nullable: true items: type: array description: An array of objects. items: $ref: '#/components/schemas/Record' last: type: string description: The link to the last page. nullable: true next: type: string description: The link to the next page or `null` if there's no page. nullable: true prev: type: string description: The link to the previous page or `null` if there's no page. nullable: true self: type: string description: The link to the current page. nullable: true required: - first - items - last - next - prev - self PageRule: type: object description: A page object with links to move to other pages and the list of objects. properties: first: type: string description: The link to the first page. nullable: true items: type: array description: An array of objects. items: $ref: '#/components/schemas/Rule' last: type: string description: The link to the last page. nullable: true next: type: string description: The link to the next page or `null` if there's no page. nullable: true prev: type: string description: The link to the previous page or `null` if there's no page. nullable: true self: type: string description: The link to the current page. nullable: true required: - first - items - last - next - prev - self PageValidationSync: type: object description: A page object with links to move to other pages and the list of objects. properties: first: type: string description: The link to the first page. nullable: true items: type: array description: An array of objects. items: $ref: '#/components/schemas/ValidationSync' last: type: string description: The link to the last page. nullable: true next: type: string description: The link to the next page or `null` if there's no page. nullable: true prev: type: string description: The link to the previous page or `null` if there's no page. nullable: true self: type: string description: The link to the current page. nullable: true required: - first - items - last - next - prev - self PageWord: type: object description: A page object with links to move to other pages and the list of objects. properties: first: type: string description: The link to the first page. nullable: true items: type: array description: An array of objects. items: $ref: '#/components/schemas/Word' last: type: string description: The link to the last page. nullable: true next: type: string description: The link to the next page or `null` if there's no page. nullable: true prev: type: string description: The link to the previous page or `null` if there's no page. nullable: true self: type: string description: The link to the current page. nullable: true required: - first - items - last - next - prev - self Preset: type: object description: An array of objects. properties: body: type: string description: The predefined graphql query. id: type: integer format: int64 label: type: string description: The label of the preset. required: - body - label Record: type: object properties: completion: type: string content_generation_id: type: integer format: int64 description: The parent content generation id. readOnly: true data: $ref: '#/components/schemas/Json' errors: type: array description: The set of errors found for record. items: $ref: '#/components/schemas/ValidationResult' readOnly: true has_upvote: type: boolean description: This indicates whether the user upvoted the completion. id: type: integer format: int64 is_accepted: type: boolean description: This indicates whether the completion is accepted by the user. modified_at: type: string format: date-time description: The last modified date-time. readOnly: true prompt: type: string description: The prompt. warnings: type: array description: The set of errors found for record. items: $ref: '#/components/schemas/ValidationResult' readOnly: true required: - content_generation_id - has_upvote - is_accepted - prompt Request: type: object properties: completion: type: string has_upvote: type: boolean description: This indicates whether the user upvoted the completion. is_accepted: type: boolean description: This indicates whether the completion is accepted by the user. required: - has_upvote - is_accepted Rule: type: object properties: content_generation_id: type: integer format: int64 description: The parent content generation id. readOnly: true description: type: string description: Description for the rule fixes: type: array description: The list of fixes to apply when the rule validation fails. items: $ref: '#/components/schemas/ValidationFix' id: type: integer format: int64 level: $ref: '#/components/schemas/LevelEnum' name: type: string description: The rule name. type: type: string description: "The rule type, one of `field`, `word` or `code`. By default\ \ `field`." what_operand_lhs: $ref: '#/components/schemas/WhatOperandLhs' what_operand_rhs: type: string description: The right hand side operand for what condition. what_operator: $ref: '#/components/schemas/WhatOperator' when_operand_lhs: type: string description: The left hand side operand for when condition. when_operand_rhs: type: string description: The right hand side operand for when condition. when_operator: $ref: '#/components/schemas/WhenOperator' required: - level - name - type - what_operand_lhs - what_operand_rhs - what_operator - when_operand_lhs - when_operand_rhs - when_operator RuleRequest: type: object description: The id properties: fixes: type: array description: The list of fixes to apply when the rule validation fails. items: $ref: '#/components/schemas/ValidationFix' level: $ref: '#/components/schemas/LevelEnum' name: type: string description: The rule name. type: type: string description: "The rule type, one of `field`, `word` or `code`. By default\ \ `field`." what_operand_lhs: $ref: '#/components/schemas/WhatOperandLhs' what_operand_rhs: type: string description: The right hand side operand for what condition. what_operator: $ref: '#/components/schemas/WhatOperator' when_operand_lhs: type: string description: The left hand side operand for when condition. when_operand_rhs: type: string description: The right hand side operand for when condition. when_operator: $ref: '#/components/schemas/WhenOperator' required: - level - name - type - what_operand_lhs - what_operand_rhs - what_operator - when_operand_lhs - when_operand_rhs - when_operator Stats: type: object properties: total_accepted: type: integer format: int64 total_errors: type: integer format: int64 total_valid: type: integer format: int64 total_warnings: type: integer format: int64 Status: type: string enum: - VALID - WARNING - ERROR - ACCEPTED ValidationFix: type: object description: The list of fixes to apply when the rule validation fails. properties: type: $ref: '#/components/schemas/ValidationTypeEnum' what: type: string with: type: string ValidationResult: type: object description: The set of errors found for record. properties: levelEnum: $ref: '#/components/schemas/LevelEnum' name: type: string result: type: string enum: - PASS - FAIL - SKIP - FIXED readOnly: true ValidationSync: type: object properties: completions_errored: type: integer format: int32 description: The number of errored completions readOnly: true completions_generated: type: integer format: int32 description: The number of generated completions readOnly: true content_generation_id: type: integer format: int64 description: The parent content generation id. readOnly: true created_at: type: string format: date-time description: The create date-time. readOnly: true has_errors: type: boolean description: Whether the sync encountered errors. readOnly: true id: type: integer format: int64 description: The unique id. readOnly: true modified_at: type: string format: date-time description: The last modified date-time. readOnly: true started_at: type: string format: date-time description: The started date-time. readOnly: true stopped_at: type: string format: date-time description: The stopped date-time. readOnly: true total: type: integer format: int32 description: The total number of completions which needs to be generated readOnly: true required: - content_generation_id ValidationSyncRequest: type: object description: The id properties: apply_to: $ref: '#/components/schemas/ApplyTo' ValidationTypeEnum: type: string enum: - FIND_AND_REPLACE - OPEN_AI - APPEND WhatOperandLhs: type: string description: The left hand side operand for what condition. enum: - EVERYWHERE - FIRST_SENTENCE - LAST_SENTENCE WhatOperator: type: string description: The operator for what condition. enum: - CONTAINS - DOESNT_CONTAIN - ENDS_WITH WhenOperator: type: string description: The operator for when condition. enum: - ALWAYS - EQUALS - NOT_EQUALS Word: type: object description: A Word bias. properties: bias: type: integer format: int32 description: The bias. content_generation_id: type: integer format: int64 description: The content generatio id. readOnly: true created_at: type: string format: date-time description: The create date-time. readOnly: true id: type: integer format: int64 description: The unique id. readOnly: true modified_at: type: string format: date-time description: The last modified date-time. readOnly: true word: type: string description: The actual word. maxLength: 1000 required: - bias - content_generation_id - word WordRequest: type: object properties: bias: type: integer format: int32 description: The bias. word: type: string description: The actual word. maxLength: 1000 required: - bias - word securitySchemes: security_oauth2: flows: authorizationCode: authorizationUrl: https://s.wordlift.io/oauth/authorize/ scopes: basic: basic scope tokenUrl: https://s.wordlift.io/oauth/token/ type: oauth2