Skip to content

Users API ​

All URIs are relative to https://api.syntheticusers.com/api/v1

MethodHTTP requestDescription
getUserGET /users/Get User
listUsersGET /usersList Users

getUser ​

User getUser()

Example ​

typescript
import { createConfiguration, UsersApi } from '';
import type { UsersApiGetUserRequest } from '';

const configuration = createConfiguration();
const apiInstance = new UsersApi(configuration);

const request: UsersApiGetUserRequest = {
  
  userId: "user_id_example",
  
  id: "id_example",
  
  email: "email_example",
  
  emailValidated: true,
  
  createdAt: new Date('1970-01-01T00:00:00.00Z'),
  
  generatedCounter: 1,
};

const data = await apiInstance.getUser(request);
console.log('API called successfully. Returned data:', data);

Parameters ​

NameTypeDescriptionNotes
userId[string]defaults to undefined
id[string]defaults to undefined
email[string]defaults to undefined
emailValidated[boolean]defaults to undefined
createdAt[Date]defaults to undefined
generatedCounter[number]defaults to undefined

Return type ​

User

Authorization ​

HTTPBearer

HTTP request headers ​

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details ​

Status codeDescriptionResponse headers
200Successful Response-
422Validation Error-

[Back to top] [Back to API list] [Back to SDK]

listUsers ​

PageUser listUsers()

Example ​

typescript
import { createConfiguration, UsersApi } from '';
import type { UsersApiListUsersRequest } from '';

const configuration = createConfiguration();
const apiInstance = new UsersApi(configuration);

const request: UsersApiListUsersRequest = {
    // Comma-separated list of user IDs (optional)
  id: "id_example",
    // Comma-separated list of workspace IDs (optional)
  workspaceId: "workspaceId_example",
    // Page number (optional)
  page: 1,
    // Page size (optional)
  size: 50,
};

const data = await apiInstance.listUsers(request);
console.log('API called successfully. Returned data:', data);

Parameters ​

NameTypeDescriptionNotes
id[string]Comma-separated list of user IDs(optional) defaults to undefined
workspaceId[string]Comma-separated list of workspace IDs(optional) defaults to undefined
page[number]Page number(optional) defaults to 1
size[number]Page size(optional) defaults to 50

Return type ​

PageUser

Authorization ​

HTTPBearer

HTTP request headers ​

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details ​

Status codeDescriptionResponse headers
200Successful Response-
422Validation Error-

[Back to top] [Back to API list] [Back to SDK]

Released under the MIT License.