GET
/
v1
/
users
/
{userId}
curl --request GET \
  --url https://live.copilot.fabric.inc/data-customer/v1/users/{userId} \
  --header 'Authorization: Bearer <token>' \
  --header 'x-site-context: <x-site-context>'
{
  "_id": "61604a30fdfacd0009816e44",
  "username": "TEST_USER_5554",
  "userId": "user_123",
  "title": "Mr",
  "firstName": "John",
  "lastName": "Smith",
  "email": "email@address.com",
  "primaryPhone": "+1 345345345",
  "status": "ACTIVE",
  "role": "reporter",
  "additionalAttributes": {},
  "isDeleted": false,
  "createdAt": "2021-08-30T23:20:42.822Z",
  "updatedAt": "2021-08-30T23:20:42.822Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-site-context
string
required

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Path Parameters

userId
string
required

Fabric internal id of the user to update.

Example:

"61a558b1b155125f02be7fb1"

Query Parameters

filterBy
enum<string>

the field in which you want to filter by.

Available options:
userId
Example:

"userId"

Response

200
application/json
OK
_id
string

Fabric internal id of the record

Example:

"61604a30fdfacd0009816e44"

username
string

user name of the user. It must be UNIQUE.

Example:

"TEST_USER_5554"

userId
string

user identifier

Example:

"user_123"

title
string

title of the usr

Example:

"Mr"

firstName
string

first name of the user

Example:

"John"

lastName
string

last name of the user

Example:

"Smith"

email
string

email of the user

Example:

"email@address.com"

primaryPhone
string

primary phone of the usr

Example:

"+1 345345345"

status
enum<string>

status of the user. Default value will be PENDING.

Available options:
ACTIVE,
INACTIVE,
PENDING
Example:

"ACTIVE"

role
string

role of the user

Example:

"reporter"

additionalAttributes
object

Contains all additional attributes not captured in the schema.

isDeleted
boolean

flag that indicates if the record is deleted

Example:

false

createdAt
string

date of creation of the record

Example:

"2021-08-30T23:20:42.822Z"

updatedAt
string

laste date of update of the record

Example:

"2021-08-30T23:20:42.822Z"