Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Greenly Carbon Analytics Users API
version: '1.5'
description: '# Introduction
The Greenly Carbon Analytics API is a set of RESTful services which enable the enrichment of bank transactions with carbon footprint analytics.'
contact:
email: contact@greenly.earth
servers:
- url: https://api.greenly.earth/v1.5
tags:
- name: Users
paths:
/users/createUser:
post:
operationId: CreateUserAPI
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/UserProfile'
'401':
description: Authentication Failed
'422':
description: Input request body does not have the right format
'500':
description: An unexpected error occured while processing the request
description: Create a user.
summary: Create user
tags:
- Users
security: []
parameters: []
/users/{userId}:
put:
operationId: UpdateUser
responses:
'200':
description: Ok
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/UserProfile'
- {}
'401':
description: Authentication Failed
'404':
description: Resource not found
'422':
description: Input request body does not have the right format
'500':
description: An unexpected error occured while processing the request
description: 'Update a user with new default tag values. All previous tag values are replaced (the two objects are not merged) so you
must provide all tag values that apply to the user during each call.'
summary: Update user
tags:
- Users
security: []
parameters:
- in: path
name: userId
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserAPIUpdateArgs'
get:
operationId: GetUser
responses:
'200':
description: Ok
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/UserProfile'
- {}
'401':
description: Authentication Failed
'404':
description: Resource not found
'500':
description: An unexpected error occured while processing the request
description: Retrieve user default tag values applied to all user transactions.
summary: Get user
tags:
- Users
security: []
parameters:
- in: path
name: userId
required: true
schema:
type: string
delete:
operationId: DeleteUserAPI
responses:
'204':
description: No Content
'401':
description: Authentication Failed
'404':
description: Resource not found
'500':
description: An unexpected error occured while processing the request
description: 'Delete a user and all associated data. Warning: this operation is irreversible.'
summary: Delete user
tags:
- Users
security: []
parameters:
- in: path
name: userId
required: true
schema:
type: string
components:
schemas:
UserAPIUpdateArgs:
properties:
defaultTagValues:
items:
$ref: '#/components/schemas/TagValue'
type: array
required:
- defaultTagValues
type: object
TagValue:
properties:
value:
anyOf:
- type: string
- type: number
format: double
- type: boolean
tagId:
type: string
required:
- value
- tagId
type: object
Pick_Profile.defaultTagValues_:
properties:
defaultTagValues:
items:
$ref: '#/components/schemas/TagValue'
type: array
description: Set of tag values that are set as default for this user's transactions.
required:
- defaultTagValues
type: object
description: From T, pick a set of properties whose keys are in the union K
UserProfile:
allOf:
- $ref: '#/components/schemas/Pick_Profile.defaultTagValues_'
- properties:
userId:
type: string
required:
- userId
type: object
securitySchemes:
api_key:
type: apiKey
name: api-key
in: header