Get all users in your organization
GET/v1/users
This route allows you to fetch all of the users in your Port organization.
To learn more about users, check out the documentation.
Request
Parameters (JSON)
{
"parameters": [
{
"schema": {
"type": "array",
"style": "form",
"explode": true,
"items": {
"type": "string",
"enum": [
"id",
"email",
"firstName",
"isInvisible",
"lastName",
"picture",
"status",
"supportLevel",
"type",
"providers",
"managedByScim",
"createdAt",
"updatedAt",
"teams.name",
"teams.provider",
"teams.createdAt",
"teams.updatedAt",
"roles.name",
"roles.description",
"roles.isAdmin",
"roles.protected",
"roles.orgId",
"roles.createdAt",
"roles.updatedAt",
"orgMembers.orgId",
"orgMembers.status",
"orgMembers.lastLoginAt",
"userAccounts.accountId",
"userAccounts.accountRole",
"companyId",
"companyRole"
]
}
},
"in": "query",
"name": "fields",
"required": false,
"description": "The fields you want to fetch for each user. If used, only the specified fields will be included in the response.",
"style": "form",
"explode": true
}
]
}Request body schema (JSON)
{
"title": "Body"
}Responses
- 200
- 401
- 404
Retrieved successfully.
Default Response
A resource with the provided identifier was not found
Responses (JSON)
{
"responses": {
"200": {
"description": "Retrieved successfully.",
"content": {
"application/json": {
"schema": {
"description": "Retrieved successfully.",
"type": "object",
"properties": {
"ok": {
"enum": [
true
]
},
"users": {
"type": "array",
"items": {
"properties": {
"email": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"picture": {
"type": "string"
},
"status": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"providers": {
"type": "array",
"items": {
"type": "string"
}
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"orgs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
}
},
"teams": {
"type": "array",
"items": {
"type": "string"
}
},
"roles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
}
},
"orgMembers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"orgId": {
"type": "string"
},
"status": {
"type": "string"
},
"lastLoginAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"orgId",
"status",
"lastLoginAt"
]
}
},
"termsAccepted": {
"type": "boolean",
"default": null
},
"managedByScim": {
"type": "boolean",
"default": null
},
"companyId": {
"type": "string",
"nullable": true
},
"companyRole": {
"type": "string",
"nullable": true
},
"userAccounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"accountId": {
"type": "string"
},
"accountRole": {
"type": "string"
}
}
}
}
}
}
}
},
"required": [
"users",
"ok"
],
"additionalProperties": false
}
}
}
},
"401": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false
}
}
}
},
"404": {
"description": "A resource with the provided identifier was not found",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "A resource with the provided identifier was not found"
}
}
}
}
}
}