{"openapi":"3.0.0","paths":{"/projects":{"post":{"description":"Provisions a new Data and Insights project within the organization, including its corresponding CDP account.","operationId":"ProjectController_create_1","parameters":[{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditProjectDTO"}}}},"responses":{"200":{"description":"Project created"},"400":{"description":"Validation failed, duplicate name/connection, project limit reached, or unlinkable connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"examples":{"validation":{"summary":"Field validation failed","value":{"message":"Bad request","status":400,"errors":{"name":[{"code":"lytics.PROJECTS.NOT_EMPTY"}],"domain":[{"code":"lytics.PROJECTS.INVALID_DOMAIN"}]}}},"duplicateName":{"summary":"Project name already in use","value":{"message":"Bad request","status":400,"errors":{"name":[{"code":"lytics.PROJECTS.DUPLICATE_PROJECT_NAME"}]}}},"duplicateConnection":{"summary":"Connection already linked to another project","value":{"message":"Bad request","status":400,"errors":{"connections":[{"code":"lytics.PROJECTS.DUPLICATE_CONNECTION"}]}}},"projectLimitReached":{"summary":"Organization project limit reached","value":{"message":"Bad request","status":400,"errors":{"project":[{"code":"lytics.PROJECTS.MAX_PROJECT_LIMIT_REACHED"}]}}},"connectionNotFound":{"summary":"Caller cannot link the supplied connection","value":{"message":"Bad request","status":400,"errors":{"connections.stackApiKeys":[{"code":"lytics.PROJECTS.CONNECTION_NOT_FOUND"}]}}}}}}},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Create a project","tags":["Projects"]},"get":{"description":"Returns projects the caller can access. Org admins see all projects; non-admins see only those they collaborate on.","operationId":"ProjectController_findAll_1","parameters":[{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"200":{"description":"List of projects"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"List projects in the organization","tags":["Projects"]}},"/projects/{id}":{"get":{"operationId":"ProjectController_findOne_1","parameters":[{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"200":{"description":"Project details"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Project does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectNotFoundErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get a project by ID","tags":["Projects"]},"put":{"operationId":"ProjectController_update_1","parameters":[{"name":"id","required":true,"in":"path","description":"Project UID","schema":{"type":"string"}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditProjectDTO"}}}},"responses":{"200":{"description":"Updated project"},"400":{"description":"Validation failed, duplicate name/connection, or unlinkable connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"examples":{"validation":{"summary":"Field validation failed","value":{"message":"Bad request","status":400,"errors":{"name":[{"code":"lytics.PROJECTS.NOT_EMPTY"}]}}},"duplicateName":{"summary":"Project name already in use","value":{"message":"Bad request","status":400,"errors":{"name":[{"code":"lytics.PROJECTS.DUPLICATE_PROJECT_NAME"}]}}},"connectionNotFound":{"summary":"Caller cannot link the supplied connection","value":{"message":"Bad request","status":400,"errors":{"connections.launchProjectUids":[{"code":"lytics.PROJECTS.CONNECTION_NOT_FOUND"}]}}}}}}},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Project does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectNotFoundErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Update a project","tags":["Projects"]},"delete":{"operationId":"ProjectController_delete_1","parameters":[{"name":"id","required":true,"in":"path","description":"Project UID","schema":{"type":"string"}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"204":{"description":"Project deleted"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Project does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectNotFoundErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Delete a project","tags":["Projects"]}},"/projects/{id}/collaborators":{"post":{"description":"Invites one or more users by email and assigns the given roles.","operationId":"CollaboratorController_add_1","parameters":[{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCollaboratorDTO"}}}},"responses":{"200":{"description":"Invited collaborators"},"400":{"description":"Validation failed, invalid roles, or invite-related errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"examples":{"validation":{"summary":"Field validation failed","value":{"message":"Bad request","status":400,"errors":{"userEmails":[{"code":"lytics.COLLABORATORS.INVALID_EMAIL"}]}}},"invalidRoles":{"summary":"One or more roles are not assignable","value":{"message":"Bad request","status":400,"errors":{"roles":[{"code":"lytics.COLLABORATORS.INVALID_ROLES"}]}}},"alreadyExists":{"summary":"User is already a collaborator","value":{"message":"Bad request","status":400,"errors":{"userEmails":[{"code":"lytics.COLLABORATORS.COLLABORATOR_ALREADY_EXISTS"}]}}}}}}},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Project does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectNotFoundErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Invite collaborators to a project","tags":["Collaborators"]},"get":{"operationId":"CollaboratorController_list_1","parameters":[{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"200":{"description":"Project collaborators"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Project does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectNotFoundErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"List collaborators for a project","tags":["Collaborators"]}},"/projects/{id}/collaborators/join":{"post":{"operationId":"CollaboratorController_join_1","parameters":[{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"204":{"description":"Current user added to the project"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Project does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectNotFoundErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Add the signed-in user to a project without sending an invitation","tags":["Collaborators"]}},"/projects/{id}/collaborators/{userUid}":{"delete":{"operationId":"CollaboratorController_remove_1","parameters":[{"name":"userUid","required":true,"in":"path","description":"UID of the collaborator to remove","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"204":{"description":"Collaborator removed"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Project or collaborator does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaboratorNotFoundErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Remove a collaborator from a project","tags":["Collaborators"]},"put":{"operationId":"CollaboratorController_update_1","parameters":[{"name":"userUid","required":true,"in":"path","description":"UID of the collaborator to update","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollaboratorDTO"}}}},"responses":{"200":{"description":"Updated collaborator"},"400":{"description":"Validation failed or invalid roles supplied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"examples":{"validation":{"summary":"Field validation failed","value":{"message":"Bad request","status":400,"errors":{"roles":[{"code":"lytics.COLLABORATORS.NOT_EMPTY_ARRAY"}]}}},"invalidRoles":{"summary":"One or more roles are not assignable","value":{"message":"Bad request","status":400,"errors":{"roles":[{"code":"lytics.COLLABORATORS.INVALID_ROLES"}]}}}}}}},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Collaborator does not exist on this project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollaboratorNotFoundErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Update a collaborator's roles","tags":["Collaborators"]}},"/projects/{id}/roles":{"get":{"description":"Returns the user-facing roles from the underlying CDP account.","operationId":"RoleController_list_1","parameters":[{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"200":{"description":"Available roles"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Project does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectNotFoundErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"List roles assignable to project collaborators","tags":["Roles"]}},"/projects/{id}/content-import":{"get":{"operationId":"ContentImportController_list_1","parameters":[{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"200":{"description":"Content imports"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"List all content imports across the project","tags":["Content Import"]}},"/projects/{id}/content-import/{importId}":{"get":{"operationId":"ContentImportController_getOne_1","parameters":[{"name":"importId","required":true,"in":"path","description":"Lytics job id","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"200":{"description":"Content import"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get a single content import","tags":["Content Import"]},"delete":{"operationId":"ContentImportController_remove_1","parameters":[{"name":"importId","required":true,"in":"path","description":"Lytics job id","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"204":{"description":"Import deleted"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Delete a content import","tags":["Content Import"]}},"/projects/{id}/content-import/stacks/{stackApiKey}/authorize":{"post":{"operationId":"ContentImportController_authorize_1","parameters":[{"name":"stackApiKey","required":true,"in":"path","description":"Contentstack stack API key","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeDTO"}}}},"responses":{"200":{"description":"Stack authorized"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Authorize a stack for Content Import","tags":["Content Import"]}},"/projects/{id}/content-import/stacks/{stackApiKey}":{"post":{"operationId":"ContentImportController_create_1","parameters":[{"name":"stackApiKey","required":true,"in":"path","description":"Contentstack stack API key","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateImportDTO"}}}},"responses":{"201":{"description":"Import created"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Create a content import under a stack","tags":["Content Import"]}},"/projects/{id}/content-import/{importId}/pause":{"post":{"operationId":"ContentImportController_pause_1","parameters":[{"name":"importId","required":true,"in":"path","description":"Lytics job id","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"204":{"description":"Import pausing"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Pause a content import","tags":["Content Import"]}},"/projects/{id}/content-import/{importId}/run":{"post":{"operationId":"ContentImportController_run_1","parameters":[{"name":"importId","required":true,"in":"path","description":"Lytics job id","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"204":{"description":"Import running"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Resume a paused content import, or run a sleeping one now","tags":["Content Import"]}},"/projects/{id}/simulator/config":{"get":{"operationId":"SimulatorController_getConfig_1","parameters":[{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"200":{"description":"Simulator config"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Read the Simulator enablement status","tags":["Simulator"]}},"/projects/{id}/simulator/enable":{"post":{"operationId":"SimulatorController_enable_1","parameters":[{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatorEnableDto"}}}},"responses":{"200":{"description":"Simulator config, now enabled"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Idempotently enable the Simulator — sets only the unsatisfied settings, and appends the given domains to the account's public allowlist","tags":["Simulator"]}},"/projects/{id}/simulator/collections":{"get":{"operationId":"SimulatorController_getCollections_1","parameters":[{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"200":{"description":"Available collections"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"List the content collections available to the project","tags":["Simulator"]}},"/projects/{id}/simulator/run":{"get":{"operationId":"SimulatorController_run_1","parameters":[{"name":"collectionId","required":true,"in":"query","description":"Content collection to recommend from (Lytics segment id or slug)","schema":{"example":"seg-123","type":"string"}},{"name":"field","required":false,"in":"query","description":"Which identity field `value` represents. Required, and validated against a fixed allowlist, whenever `value` is supplied. Ignored when `value` is blank or absent.","schema":{"type":"string","enum":["_uid","email","email_sha256","external_id"]}},{"name":"value","required":false,"in":"query","description":"Identity value to personalize the preview for, interpreted according to `field`. A blank value is treated the same as omitted, in which case `field` is ignored and this becomes a generic, collection-level request.","schema":{"type":"string"}},{"description":"Content collection to recommend from (Lytics segment id or slug)","name":"collectionId","in":"query","required":true,"schema":{"example":"seg-123","type":"string"}},{"description":"Which identity field `value` represents. Required, and validated against a fixed allowlist, whenever `value` is supplied. Ignored when `value` is blank or absent.","required":false,"name":"field","in":"query","schema":{"type":"string"}},{"description":"Identity value to personalize the preview for, interpreted according to `field`. A blank value is treated the same as omitted, in which case `field` is ignored and this becomes a generic, collection-level request.","required":false,"name":"value","in":"query","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Project UID","schema":{}},{"name":"organization_uid","in":"header","required":true,"description":"Contentstack organization UID","schema":{"type":"string"}},{"name":"x-cs-api-version","in":"header","required":false,"description":"API version (defaults to v1)","schema":{"type":"string","default":"1"}}],"responses":{"200":{"description":"Recommendation items, passed through from Lytics untouched"},"401":{"description":"Caller is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Caller lacks the required permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Preview recommendations for a collection, optionally scoped to an identity — called server-side through the CDP proxy so no Lytics token is ever exposed to the browser","tags":["Simulator"]}}},"info":{"title":"Lytics","description":"HTTP API for Lytics: project management, collaborators, roles, and supporting endpoints.","version":"1","contact":{}},"tags":[{"name":"Projects","description":""},{"name":"Collaborators","description":""},{"name":"Roles","description":""},{"name":"CDP Proxy","description":"The CDP proxy forwards requests to the Customer Data Platform (Lytics) service. Any path not matched by the routes above is proxied via a catch-all route (`GET/POST/PUT/DELETE /api-gateway/{*path}`).\n\nThe proxy forwards the request method, path, query parameters, headers, and body to the CDP service and returns the CDP response as-is (status, headers, body).\n\n### Required headers\n\n| Header | Description |\n|---|---|\n| `authtoken` | Contentstack auth token |\n| `organization_uid` | Contentstack organization UID |\n| `x-project-uid` | Lytics project UID to forward the request to |\n| `x-cs-api-version` | API version (defaults to `1`) |\n\n### Example — list segments\n\n```bash\ncurl https://lytics-api.contentstack.com/api-gateway/v2/segment \\\n  -H \"authtoken: YOUR_AUTH_TOKEN\" \\\n  -H \"organization_uid: YOUR_ORG_UID\" \\\n  -H \"x-project-uid: YOUR_PROJECT_UID\" \\\n  -H \"x-cs-api-version: 1\"\n```\n\n### Example — get a user profile\n\n```bash\ncurl https://lytics-api.contentstack.com/api-gateway/api/entity/user/email/user@example.com \\\n  -H \"authtoken: YOUR_AUTH_TOKEN\" \\\n  -H \"organization_uid: YOUR_ORG_UID\" \\\n  -H \"x-project-uid: YOUR_PROJECT_UID\" \\\n  -H \"x-cs-api-version: 1\"\n```\n\nFor the full list of available CDP endpoints, see the [Lytics API reference](https://docs.lytics.com/reference)."}],"servers":[{"url":"https://lytics-api.contentstack.com","description":"North America"},{"url":"https://eu-lytics-api.contentstack.com","description":"Europe"},{"url":"https://azure-na-lytics-api.contentstack.com","description":"Azure - North America"},{"url":"https://azure-eu-lytics-api.contentstack.com","description":"Azure - Europe"},{"url":"https://gcp-na-lytics-api.contentstack.com","description":"GCP - North America"},{"url":"https://gcp-eu-lytics-api.contentstack.com","description":"GCP - Europe"},{"url":"https://au-lytics-api.contentstack.com","description":"Australia"}],"components":{"securitySchemes":{"authorization":{"type":"http","scheme":"bearer","description":"Bearer token for authorization"},"authtoken":{"type":"apiKey","name":"authtoken","in":"header","description":"Contentstack authtoken"}},"schemas":{"UnauthorizedErrorResponse":{"type":"object","properties":{"message":{"type":"string","example":"Unauthorized"},"status":{"type":"number","example":401},"error":{"type":"string","example":"Unauthorized"}},"required":["message","status","error"]},"ForbiddenErrorResponse":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden"},"status":{"type":"number","example":403},"error":{"type":"string","example":"Forbidden"}},"required":["message","status","error"]},"InternalServerErrorResponse":{"type":"object","properties":{"message":{"type":"string","example":"Something went wrong"},"status":{"type":"number","example":500},"error":{"type":"string","example":"Internal Server Error"}},"required":["message","status","error"]},"ConnectionsDTO":{"type":"object","properties":{"stackApiKeys":{"description":"Contentstack stack API keys linked to this project","type":"array","items":{"type":"string"}},"launchProjectUids":{"description":"Launch project UIDs linked to this project","type":"array","items":{"type":"string"}},"personalizeProjectUids":{"description":"Personalize project UIDs linked to this project","type":"array","items":{"type":"string"}}}},"EditProjectDTO":{"type":"object","properties":{"name":{"type":"string","description":"Human-readable project name","maxLength":200,"example":"Acme Analytics"},"domain":{"type":"string","description":"Fully-qualified domain associated with the project","maxLength":200,"example":"acme.com"},"description":{"type":"string","description":"Free-form description of the project","maxLength":255},"connections":{"description":"External resources linked to the project","allOf":[{"$ref":"#/components/schemas/ConnectionsDTO"}]}},"required":["name","domain"]},"ValidationErrorResponse":{"type":"object","properties":{"message":{"type":"string","example":"Bad request"},"status":{"type":"number","example":400},"errors":{"type":"object","description":"Field-keyed map of violation codes. Keys are request body field paths; values list the codes that failed.","additionalProperties":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]}},"example":{"name":[{"code":"lytics.PROJECTS.NOT_EMPTY"}]}}},"required":["message","status","errors"]},"ProjectNotFoundErrorResponse":{"type":"object","properties":{"message":{"type":"string","example":"Project not found"},"status":{"type":"number","example":404},"error":{"type":"string","example":"Not Found"}},"required":["message","status","error"]},"AddCollaboratorDTO":{"type":"object","properties":{"userEmails":{"description":"Email addresses of users to invite as collaborators","example":["user@acme.com"],"type":"array","items":{"type":"string"}},"roles":{"description":"Role slugs to assign to each invited collaborator","example":["member"],"type":"array","items":{"type":"string"}},"invitationMessage":{"type":"string","description":"Optional message included in the invitation email"}},"required":["userEmails","roles"]},"CollaboratorNotFoundErrorResponse":{"type":"object","properties":{"message":{"type":"string","example":"Collaborator not found"},"status":{"type":"number","example":404},"error":{"type":"string","example":"Not Found"}},"required":["message","status","error"]},"UpdateCollaboratorDTO":{"type":"object","properties":{"roles":{"description":"Replacement set of role slugs for the collaborator","example":["member"],"type":"array","items":{"type":"string"}}},"required":["roles"]},"AuthorizeDTO":{"type":"object","properties":{"deliveryTokenUid":{"type":"string","description":"The stack's selected delivery token uid","example":"blt1234567890abcdef"},"checkOnly":{"type":"boolean","description":"Check only — report whether this stack and delivery token are already authorized, without creating anything. No management token is created, no Lytics authorization is made, and nothing is written. Returns { authorized: false } when the combination is not yet authorized.","default":false}},"required":["deliveryTokenUid"]},"CreateImportDTO":{"type":"object","properties":{"deliveryTokenUid":{"type":"string","description":"The delivery token this import runs under. Must already be authorized for this stack — the import is bound to that authorization.","example":"blt1234567890abcdef"},"label":{"type":"string","description":"Becomes the Lytics job's name; shown in the imports table","example":"Destinations Import"},"contentTypes":{"description":"Content type uids to import. At least one is required.","example":["destination","article"],"type":"array","items":{"type":"string"}},"domain":{"type":"string","description":"The domain used to scope imported entries in Lytics","example":"wanderlust.com"},"taxonomies":{"description":"Taxonomy uids to import. Optional — omit for none.","example":["activities"],"default":[],"type":"array","items":{"type":"string"}},"tagsAsTopics":{"type":"boolean","description":"Import entry tags as Lytics topic signals","default":false},"keepUpdated":{"type":"boolean","description":"Re-import new and updated entries on a schedule. Maps to lio’s continuous_update.","default":false}},"required":["deliveryTokenUid","label","contentTypes","domain"]},"SimulatorEnableDto":{"type":"object","properties":{"domains":{"description":"Hostnames (or full origins) of every site that will serve the copyable recommend snippet — the customer's own domain(s), not this admin UI. At least one is required.","example":["www.example.com"],"type":"array","items":{"type":"string"}}},"required":["domains"]}}}}