Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Cosuno Current User API
version: '1'
description: '-'
license:
name: '-'
contact:
name: '-'
servers:
- url: https://api.cosuno.com/v1
- description: current
url: /v1
tags:
- name: Current User
paths:
/me:
get:
operationId: GetCurrentUser
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/CurrentUserResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
headers:
Retry-After:
schema:
type: string
required: false
description: Retrieve the user that the current access key belongs to, including the workspace ID and the offices the user has access to. Use this to introspect the credentials being used to call the API.
tags:
- Current User
security:
- accessKey: []
parameters: []
summary: Get current user
x-summary-source: derived
components:
schemas:
USER_TYPE:
type: string
enum:
- custom
- administrator
- employee
- guest
- collaborator
- manager
USER_STATUS:
type: string
enum:
- approvalPending
- adminApprovalPending
- invited
- inviteCanceled
- inviteFailed
- inviteRequested
- active
- inactive
CurrentUserResponse:
properties:
id:
type: string
description: ID of the user.
email:
type: string
description: Email address of the user. Also used as their login identifier.
status:
$ref: '#/components/schemas/USER_STATUS'
description: Current status of the user.
firstName:
type: string
description: Given name of the user.
lastName:
type: string
description: Family name of the user.
type:
$ref: '#/components/schemas/USER_TYPE'
description: Account type of the user. Values starting with `custom` indicate a custom user role (see `customUserRoleId`).
customUserRoleId:
type: string
description: ID of the custom user role assigned to the user. Present only when `type` refers to a custom user role.
workspaceId:
type: string
description: ID of the workspace (company tenant) the user belongs to.
offices:
items:
$ref: '#/components/schemas/OfficeResponse'
type: array
description: Offices the user has access to.
required:
- id
- email
- status
- type
- workspaceId
- offices
type: object
additionalProperties: false
OFFICE_STATUS:
type: string
enum:
- active
- inactive
FieldErrors:
properties: {}
type: object
additionalProperties:
properties:
value: {}
message:
type: string
required:
- message
type: object
ErrorResponse:
properties:
message:
type: string
meta:
properties:
fieldErrors:
$ref: '#/components/schemas/FieldErrors'
required:
- fieldErrors
type: object
required:
- message
type: object
additionalProperties: false
OfficeResponse:
properties:
id:
type: string
description: ID of the office.
name:
type: string
description: Display name of the office.
status:
$ref: '#/components/schemas/OFFICE_STATUS'
description: Current status of the office. Inactive offices can no longer have new projects or users assigned to them.
required:
- id
- name
- status
type: object
additionalProperties: false
securitySchemes:
accessKey:
type: http
scheme: bearer
bearerFormat: JWT