Skip to content

Plans API ​

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

MethodHTTP requestDescription
createPlanPOST /plansCreate Plan
deletePlanDELETE /plans/Delete Plan
getPlanGET /plans/Get Plan
listPlansGET /plansList Plans
updatePlanPATCH /plans/Update Plan

createPlan ​

Plan createPlan(planCreate)

Example ​

typescript
import { createConfiguration, PlansApi } from '';
import type { PlansApiCreatePlanRequest } from '';

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

const request: PlansApiCreatePlanRequest = {
  
  planCreate: {
    name: "name_example",
    projectId: "projectId_example",
    audience: "audience_example",
    researchGoal: "researchGoal_example",
    createdAt: new Date('1970-01-01T00:00:00.00Z'),
  },
};

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

Parameters ​

NameTypeDescriptionNotes
planCreatePlanCreate

Return type ​

Plan

Authorization ​

HTTPBearer

HTTP request headers ​

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

HTTP response details ​

Status codeDescriptionResponse headers
200Successful Response-
422Validation Error-

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

deletePlan ​

any deletePlan()

Example ​

typescript
import { createConfiguration, PlansApi } from '';
import type { PlansApiDeletePlanRequest } from '';

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

const request: PlansApiDeletePlanRequest = {
  
  planId: "plan_id_example",
};

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

Parameters ​

NameTypeDescriptionNotes
planId[string]defaults to undefined

Return type ​

any

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]

getPlan ​

Plan getPlan()

Example ​

typescript
import { createConfiguration, PlansApi } from '';
import type { PlansApiGetPlanRequest } from '';

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

const request: PlansApiGetPlanRequest = {
  
  planId: "plan_id_example",
};

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

Parameters ​

NameTypeDescriptionNotes
planId[string]defaults to undefined

Return type ​

Plan

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]

listPlans ​

PagePlan listPlans()

Example ​

typescript
import { createConfiguration, PlansApi } from '';
import type { PlansApiListPlansRequest } from '';

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

const request: PlansApiListPlansRequest = {
    // Comma-separated list of plans IDs (optional)
  id: "id_example",
    // Comma-separated list of project IDs (optional)
  projectId: "projectId_example",
    // Page number (optional)
  page: 1,
    // Page size (optional)
  size: 50,
};

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

Parameters ​

NameTypeDescriptionNotes
id[string]Comma-separated list of plans IDs(optional) defaults to undefined
projectId[string]Comma-separated list of project IDs(optional) defaults to undefined
page[number]Page number(optional) defaults to 1
size[number]Page size(optional) defaults to 50

Return type ​

PagePlan

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]

updatePlan ​

Plan updatePlan(planUpdate)

Example ​

typescript
import { createConfiguration, PlansApi } from '';
import type { PlansApiUpdatePlanRequest } from '';

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

const request: PlansApiUpdatePlanRequest = {
  
  planId: "plan_id_example",
  
  planUpdate: {
    name: "name_example",
    audience: "audience_example",
    researchGoal: "researchGoal_example",
    createdAt: new Date('1970-01-01T00:00:00.00Z'),
    graphData: {
      "key": null,
    },
  },
};

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

Parameters ​

NameTypeDescriptionNotes
planUpdatePlanUpdate
planId[string]defaults to undefined

Return type ​

Plan

Authorization ​

HTTPBearer

HTTP request headers ​

  • Content-Type: application/json
  • 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.