Users

Members within the workspace. Learn more about user management here.

List Users

get
/user

Get a list of users.

Authorizations
Responses
200

List of users.

application/json
Responseall of
get
/user
GET /api/v1/user HTTP/1.1
Host: api.secoda.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "links": {
    "next": "https://api.secoda.co/resource/all/?page=2",
    "previous": "None"
  },
  "meta": {
    "page": 1,
    "previous_page": "None",
    "next_page": 2
  },
  "count": 315,
  "total_pages": 7,
  "results": [
    {
      "id": "3131f219-16bb-4c95-853a-894ae12db42a",
      "first_name": "Sample",
      "last_name": "User",
      "email": "[email protected]",
      "role": "editor",
      "workspace_id": "f71585fa-251c-4102-8d81-c97c57c8d435",
      "profile_picture": "image.jpg",
      "pending": "False",
      "user_groups": [
        "f71585fa-251c-4102-8d81-c97c57c8d435"
      ],
      "bookmarks": [
        "f71585fa-251c-4102-8d81-c97c57c8d435"
      ],
      "workspace": "f71585fa-251c-4102-8d81-c97c57c8d435",
      "is_service_account": false,
      "service_account_count_popularity": true,
      "last_login": "None",
      "new_feature_acknowledged": true,
      "disabled": false
    }
  ]
}

Create User

post
/user

Create a new user in the workspace.

Authorizations
Body
first_namestringOptional

Indicates the first name of the user.

Example: Sample
last_namestringOptional

Indicates the last name of the user.

Example: User
emailstringOptional

Indicates the email id of the user.

Example: [email protected]
rolestringOptional

Indicates the role of the user. Values can be - Admin Editor Viewer Guest

Example: editor
teamsstring[]Optional

List of team IDs (optional). It is mandatory if the role is guest.

Example: ["33733f42-8ff7-460b-9e20-50a2133d3bb0","c90dedee-40ee-47ec-9c27-96dc3b2ec363"]
user_groupsstring[]Optional

List of group IDs (optional)

Example: ["33733f42-8ff7-460b-9e20-50a2133d3bb0","c90dedee-40ee-47ec-9c27-96dc3b2ec363"]
Responses
201

Created

application/json
post
/user
POST /api/v1/user HTTP/1.1
Host: api.secoda.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 268

{
  "first_name": "Sample",
  "last_name": "User",
  "email": "[email protected]",
  "role": "editor",
  "teams": [
    "33733f42-8ff7-460b-9e20-50a2133d3bb0",
    "c90dedee-40ee-47ec-9c27-96dc3b2ec363"
  ],
  "user_groups": [
    "33733f42-8ff7-460b-9e20-50a2133d3bb0",
    "c90dedee-40ee-47ec-9c27-96dc3b2ec363"
  ]
}
{
  "id": "3131f219-16bb-4c95-853a-894ae12db42a",
  "first_name": "Sample",
  "last_name": "User",
  "email": "[email protected]",
  "role": "editor",
  "workspace_id": "f71585fa-251c-4102-8d81-c97c57c8d435",
  "profile_picture": "image.jpg",
  "pending": "False",
  "user_groups": [
    "f71585fa-251c-4102-8d81-c97c57c8d435"
  ],
  "bookmarks": [
    "f71585fa-251c-4102-8d81-c97c57c8d435"
  ],
  "workspace": "f71585fa-251c-4102-8d81-c97c57c8d435",
  "is_service_account": false,
  "service_account_count_popularity": true,
  "last_login": "None",
  "new_feature_acknowledged": true,
  "disabled": false
}

Get User

get
/user/{id}

Get a user by their ID.

Authorizations
Path parameters
idstringRequired

The ID of the user to retrieve.

Example: 3131f219-16bb-4c95-853a-894ae12db42a
Responses
200

OK

application/json
get
/user/{id}
GET /api/v1/user/{id} HTTP/1.1
Host: api.secoda.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "3131f219-16bb-4c95-853a-894ae12db42a",
  "first_name": "Sample",
  "last_name": "User",
  "email": "[email protected]",
  "role": "editor",
  "workspace_id": "f71585fa-251c-4102-8d81-c97c57c8d435",
  "profile_picture": "image.jpg",
  "pending": "False",
  "user_groups": [
    "f71585fa-251c-4102-8d81-c97c57c8d435"
  ],
  "bookmarks": [
    "f71585fa-251c-4102-8d81-c97c57c8d435"
  ],
  "workspace": "f71585fa-251c-4102-8d81-c97c57c8d435",
  "is_service_account": false,
  "service_account_count_popularity": true,
  "last_login": "None",
  "new_feature_acknowledged": true,
  "disabled": false
}

Delete User

delete
/user/{id}

Delete a user by their ID.

Authorizations
Path parameters
idstringRequired

The ID of the user to delete.

Example: 3131f219-16bb-4c95-853a-894ae12db42a
Responses
204

No Content

No content

delete
/user/{id}
DELETE /api/v1/user/{id} HTTP/1.1
Host: api.secoda.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Update User

patch
/user/{id}

Use this endpoint to update the user. Editable fields include the first name, last name, and role.

Authorizations
Path parameters
idstringRequired

The ID of the user to update.

Example: 3131f219-16bb-4c95-853a-894ae12db42a
Body
first_namestringOptional

Indicates the first name of the user.

Example: Sample
last_namestringOptional

Indicates the last name of the user.

Example: User
Responses
200

User updated successfully

application/json
patch
/user/{id}
PATCH /api/v1/user/{id} HTTP/1.1
Host: api.secoda.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "first_name": "Sample",
  "last_name": "User"
}
{
  "id": "3131f219-16bb-4c95-853a-894ae12db42a",
  "first_name": "Sample",
  "last_name": "User",
  "email": "[email protected]",
  "role": "editor",
  "workspace_id": "f71585fa-251c-4102-8d81-c97c57c8d435",
  "profile_picture": "image.jpg",
  "pending": "False",
  "user_groups": [
    "f71585fa-251c-4102-8d81-c97c57c8d435"
  ],
  "bookmarks": [
    "f71585fa-251c-4102-8d81-c97c57c8d435"
  ],
  "workspace": "f71585fa-251c-4102-8d81-c97c57c8d435",
  "is_service_account": false,
  "service_account_count_popularity": true,
  "last_login": "None",
  "new_feature_acknowledged": true,
  "disabled": false
}

Was this helpful?