---
title: "Import an agent"
method: POST
path: "/rest/api/v1/agents/{agent_id}/import"
tags: ["Agents"]
---

# Import an agent

`POST /rest/api/v1/agents/{agent_id}/import`

Imports an [agent](https://developers.glean.com/agents/agents-api) from its on-disk folder representation (spec.yaml, instructions.md, skills/, subagents/) packaged as a zip, and creates or updates the agent. Inverse of the export flow: the folder-to-schema conversion runs server-side. The bundle must contain only regular files; symlinks are resolved by the caller at packaging time.

## Path parameters

- `agent_id` string, required — The ID of the agent to create or update.

## Query parameters

- `locale` string
- `timezoneOffset` integer

## Response `200`

Success

- ImportAgentResponse
  - `workflowResult` WorkflowResult
    - `workflow` Workflow, required
      - `permissions` ObjectPermissions
        - `write` WritePermission — Describes the write permissions levels that a user has for a specific feature
          - `scopeType` 'GLOBAL' | 'OWN' — Describes the scope for a ReadPermission, WritePermission, or GrantPermission object
          - `create` boolean — True if user has create permission for this feature and scope
          - `update` boolean — True if user has update permission for this feature and scope
          - `delete` boolean — True if user has delete permission for this feature and scope
      - `name` string — The name of the workflow.
      - `author` Person
        - `name` string, required — The display name.
        - `obfuscatedId` string, required — An opaque identifier that can be used to request metadata for a Person.
        - `relatedDocuments` RelatedDocuments[] — A list of documents related to this person.
          - `relation` 'ATTACHMENT' | 'CANONICAL' | 'CASE' | 'contact' | 'CONTACT' | 'CONVERSATION_MESSAGES' | 'EXPERT' | 'FROM' | 'HIGHLIGHT' | 'opportunity' | 'OPPORTUNITY' | 'RECENT' | 'SOURCE' | 'TICKET' | 'TRANSCRIPT' | 'WITH' — How this document relates to the including entity.
          - `associatedEntityId` string — Which entity in the response that this entity relates to. Relevant when there are multiple entities associated with the response (such as merged customers)
          - `querySuggestion` QuerySuggestion
            - `missingTerm` string — A query term missing from the original query on which this suggestion is based.
            - `query` string, required — The query being suggested (e.g. enforcing the missing term from the original query).
            - `searchProviderInfo` SearchProviderInfo
              - …
            - `label` string — A user-facing description to display for the suggestion.
            - `datasource` string — The datasource associated with the suggestion.
            - `resultTab` ResultTab
              - …
            - `requestOptions` SearchRequestOptions
              - …
            - `ranges` TextRange[] — The bolded ranges within the query of the QuerySuggestion.
              - …
            - `inputDetails` SearchRequestInputDetails
              - …
          - `documents` Document[] — A truncated list of documents with this relation. TO BE DEPRECATED.
            - `id` string — The Glean Document ID.
            - `datasource` string — The app or other repository type from which the document was extracted
            - `connectorType` 'API_CRAWL' | 'BROWSER_CRAWL' | 'BROWSER_HISTORY' | 'BUILTIN' | 'FEDERATED_SEARCH' | 'PUSH_API' | 'WEB_CRAWL' | 'NATIVE_HISTORY' — The source from which document content was pulled, e.g. an API crawl or browser history
            - `docType` string — The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request).
            - `content` DocumentContent
              - …
            - `containerDocument` Document — recursive
            - `parentDocument` Document — recursive
            - `title` string — The title of the document.
            - `url` string — A permalink for the document.
            - `metadata` DocumentMetadata
              - …
            - `sections` DocumentSection[] — A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page.
              - …
          - `results` SearchResult[] — A truncated list of documents associated with this relation. To be used in favor of `documents` because it contains a trackingToken.
            - `structuredResults` StructuredResult[] — An array of entities in the work graph retrieved via a data request.
              - …
            - `trackingToken` string — An opaque token that represents this particular result in this particular query. To be used for /feedback reporting.
            - `document` Document
              - …
            - `title` string
            - `url` string, required
            - `nativeAppUrl` string — A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://...).
            - `snippets` SearchResultSnippet[] — Text content from the result document which contains search query terms, if available.
              - …
            - `fullText` string — The full body text of the result if not already contained in the snippets. Only populated for conversation results (e.g. results from a messaging app such as Slack).
            - `fullTextList` string[] — The full body text of the result if not already contained in the snippets; each item in the array represents a separate line in the original text. Only populated for conversation results (e.g. results from a messaging app such as Slack).
            - `relatedResults` RelatedDocuments[] — A list of results related to this search result. Eg. for conversation results it contains individual messages from the conversation document which will be shown on SERP.
            - `clusteredResults` SearchResult[] — A list of results that should be displayed as associated with this result.
            - `allClusteredResults` ClusterGroup[] — A list of results that should be displayed as associated with this result.
              - …
            - `attachmentCount` integer — The total number of attachments.
            - `attachments` SearchResult[] — A (potentially partial) list of results representing documents attached to the main result document.
            - `backlinkResults` SearchResult[] — A list of results that should be displayed as backlinks of this result in reverse chronological order.
            - `clusterType` 'SIMILAR' | 'FRESHNESS' | 'TITLE' | 'CONTENT' | 'NONE' | 'THREAD_REPLY' | 'THREAD_ROOT' | 'PREFIX' | 'SUFFIX' | 'AUTHOR_PREFIX' | 'AUTHOR_SUFFIX' — The reason for inclusion of clusteredResults.
            - `mustIncludeSuggestions` QuerySuggestionList
              - …
            - `querySuggestion` QuerySuggestion
              - …
            - `prominence` 'HERO' | 'PROMOTED' | 'STANDARD' — The level of visual distinction that should be given to a result.
            - `attachmentContext` string — Additional context for the relationship between the result and the document it's attached to.
            - `pins` PinDocument[] — A list of pins associated with this search result.
              - …
        - `metadata` PersonMetadata
          - `type` 'FULL_TIME' | 'CONTRACTOR' | 'NON_EMPLOYEE' | 'FORMER_EMPLOYEE'
          - `firstName` string — The first name of the person
          - `lastName` string — The last name of the person
          - `title` string — Job title.
          - `businessUnit` string — Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses.
          - `department` string — An organizational unit where everyone has a similar task, e.g. `Engineering`.
          - `jobFunction` string — Normalized job-function category assigned by Entity Builder from the source department and, when available, job title. Unlike `department`, which preserves the company-specific organizational unit, this field groups departments into configured categories such as `Engineering`, `Sales`, or `IT`; it may be `Unknown` when the mapping is inconclusive.
          - `teams` PersonTeam[] — Info about the employee's team(s).
            - `id` string — Unique identifier
            - `name` string — Team name
            - `externalLink` string, uri — Link to a team page on the internet or your company's intranet
            - `relationship` 'MEMBER' | 'MANAGER' | 'LEAD' | 'POINT_OF_CONTACT' | 'OTHER' — The team member's relationship to the team. This defaults to MEMBER if not set.
            - `joinDate` string, date-time — The team member's start date
          - `departmentCount` integer — The number of people in this person's department.
          - `email` string — The user's primary email address
          - `aliasEmails` string[] — Additional email addresses of this user beyond the primary, if any.
          - `location` string — User facing string representing the person's location.
          - `structuredLocation` StructuredLocation — Detailed location with information about country, state, city etc.
            - `deskLocation` string — Desk number.
            - `timezone` string — Location's timezone, e.g. UTC, PST.
            - `address` string — Office address or name.
            - `city` string — Name of the city.
            - `state` string — State code.
            - `region` string — Region information, e.g. NORAM, APAC.
            - `zipCode` string — ZIP Code for the address.
            - `country` string — Country name.
            - `countryCode` string — Alpha-2 or Alpha-3 ISO 3166 country code, e.g. US or USA.
          - `externalProfileLink` string — Link to a customer's internal profile page. This is set to '#' when no link is desired.
          - `manager` Person — recursive
          - `managementChain` Person[] — The chain of reporting in the company as far up as it goes. The last entry is this person's direct manager.
          - `phone` string — Phone number as a number string.
          - `timezone` string — The timezone of the person. E.g. "Pacific Daylight Time".
          - `timezoneOffset` integer — The offset of the person's timezone in seconds from UTC.
          - `timezoneIANA` string — The IANA timezone identifier, e.g. "America/Los_Angeles".
          - `photoUrl` string, url — The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs).
          - `uneditedPhotoUrl` string, url — The original photo URL of the person's avatar before any edits they made are applied
          - `bannerUrl` string, url — The URL of the person's banner photo.
          - `reports` Person[]
          - `startDate` string, date — The date when the employee started.
          - `endDate` string, date — If a former employee, the last date of employment.
          - `bio` string — Short biography or mission statement of the employee.
          - `pronoun` string — She/her, He/his or other pronoun.
          - `orgSizeCount` integer — The total recursive size of the people reporting to this person, or 1
          - `directReportsCount` integer — The total number of people who directly report to this person, or 0
          - `preferredName` string — The preferred name of the person, or a nickname.
          - `socialNetwork` SocialNetwork[] — List of social network profiles.
            - `name` string, required — Possible values are "twitter", "linkedin".
            - `profileName` string — Human-readable profile name.
            - `profileUrl` string, url, required — Link to profile.
          - `datasourceProfile` DatasourceProfile[] — List of profiles this user has in different datasources / tools that they use.
            - `datasource` string, required — The datasource the profile is of.
            - `handle` string, required — The display name of the entity in the given datasource.
            - `url` string — URL to view the entity's profile.
            - `nativeAppUrl` string — A deep link, if available, into the datasource's native application for the entity's platform (i.e. slack://...).
            - `isUserGenerated` boolean — For internal use only. True iff the data source profile was manually added by a user from within Glean (aka not from the original data source)
          - `querySuggestions` QuerySuggestionList
            - `suggestions` QuerySuggestion[]
              - …
            - `person` Person — recursive
          - `peopleDistance` PersonDistance[] — List of people and distances to those people from this person. Optionally with metadata.
            - `name` string, required — The display name.
            - `obfuscatedId` string, required — An opaque identifier that can be used to request metadata for a Person.
            - `distance` number, float, required — Distance to person, refer to PeopleDistance pipeline on interpretation of the value.
          - `inviteInfo` InviteInfo — Information regarding the invite status of a person.
            - `signUpTime` string, date-time — The time this person signed up in ISO format (ISO 8601).
            - `invites` ChannelInviteInfo[] — Latest invites received by the user for each channel
              - …
            - `inviter` Person — recursive
            - `inviteTime` string, date-time — The time this person was invited in ISO format (ISO 8601).
            - `reminderTime` string, date-time — The time this person was reminded in ISO format (ISO 8601) if a reminder was sent.
          - `isSignedUp` boolean — Whether the user has signed into Glean at least once.
          - `lastExtensionUse` string, date-time — The last time the user has used the Glean extension in ISO 8601 format.
          - `permissions` Permissions — Describes the permissions levels that a user has for permissioned features. When the client sends this, Permissions.read and Permissions.write are the additional permissions granted to a user on top of what they have via their roles. When the server sends this, Permissions.read and Permissions.write are the complete (merged) set of permissions the user has, and Permissions.roles is just for display purposes.
            - `canAdminSearch` boolean — TODO--deprecate in favor of the read and write properties. True if the user has access to /adminsearch
            - `canAdminClientApiGlobalTokens` boolean — TODO--deprecate in favor of the read and write properties. True if the user can administrate client API tokens with global scope
            - `canDlp` boolean — TODO--deprecate in favor of the read and write properties. True if the user has access to data loss prevention (DLP) features
            - `read` unknown
            - `write` unknown
            - `grant` unknown
            - `role` string — The roleId of the canonical role a user has. The displayName is equal to the roleId.
            - `roles` string[] — The roleIds of the roles a user has.
          - `customFields` CustomFieldData[] — User customizable fields for additional people information.
            - `label` string, required — A user-facing label for this field.
            - `values` CustomFieldValue[], required
              - …
            - `displayable` boolean, required — Determines whether the client should display this custom field
          - `loggingId` string — The logging id of the person used in scrubbed logs, tracking GA metrics.
          - `startDatePercentile` number, float — Percentage of the company that started strictly after this person. Between [0,100).
          - `busyEvents` AnonymousEvent[] — Intervals of busy time for this person, along with the type of event they're busy with.
            - `time` TimeInterval
              - …
            - `eventType` 'DEFAULT' | 'OUT_OF_OFFICE' — The nature of the event, for example "out of office".
          - `profileBoolSettings` object — flag settings to indicate user profile settings for certain items
          - `badges` Badge[] — The badges that a user has earned over their lifetime.
            - `key` string — An auto generated unique identifier.
            - `displayName` string — The badge name displayed to users
            - `iconConfig` IconConfig — Defines how to render an icon
              - …
            - `pinned` boolean — The badge should be shown on the PersonAttribution
          - `isOrgRoot` boolean — Whether this person is a "root" node in their organization's hierarchy.
      - `createTimestamp` integer — Server Unix timestamp of the creation time.
      - `lastUpdateTimestamp` integer — Server Unix timestamp of the last update time.
      - `lastDraftSavedAt` integer — Server Unix timestamp of the last time the draft was saved.
      - `lastDraftSavedBy` Person
        - `name` string, required — The display name.
        - `obfuscatedId` string, required — An opaque identifier that can be used to request metadata for a Person.
        - `relatedDocuments` RelatedDocuments[] — A list of documents related to this person.
          - `relation` 'ATTACHMENT' | 'CANONICAL' | 'CASE' | 'contact' | 'CONTACT' | 'CONVERSATION_MESSAGES' | 'EXPERT' | 'FROM' | 'HIGHLIGHT' | 'opportunity' | 'OPPORTUNITY' | 'RECENT' | 'SOURCE' | 'TICKET' | 'TRANSCRIPT' | 'WITH' — How this document relates to the including entity.
          - `associatedEntityId` string — Which entity in the response that this entity relates to. Relevant when there are multiple entities associated with the response (such as merged customers)
          - `querySuggestion` QuerySuggestion
            - `missingTerm` string — A query term missing from the original query on which this suggestion is based.
            - `query` string, required — The query being suggested (e.g. enforcing the missing term from the original query).
            - `searchProviderInfo` SearchProviderInfo
              - …
            - `label` string — A user-facing description to display for the suggestion.
            - `datasource` string — The datasource associated with the suggestion.
            - `resultTab` ResultTab
              - …
            - `requestOptions` SearchRequestOptions
              - …
            - `ranges` TextRange[] — The bolded ranges within the query of the QuerySuggestion.
              - …
            - `inputDetails` SearchRequestInputDetails
              - …
          - `documents` Document[] — A truncated list of documents with this relation. TO BE DEPRECATED.
            - `id` string — The Glean Document ID.
            - `datasource` string — The app or other repository type from which the document was extracted
            - `connectorType` 'API_CRAWL' | 'BROWSER_CRAWL' | 'BROWSER_HISTORY' | 'BUILTIN' | 'FEDERATED_SEARCH' | 'PUSH_API' | 'WEB_CRAWL' | 'NATIVE_HISTORY' — The source from which document content was pulled, e.g. an API crawl or browser history
            - `docType` string — The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request).
            - `content` DocumentContent
              - …
            - `containerDocument` Document — recursive
            - `parentDocument` Document — recursive
            - `title` string — The title of the document.
            - `url` string — A permalink for the document.
            - `metadata` DocumentMetadata
              - …
            - `sections` DocumentSection[] — A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page.
              - …
          - `results` SearchResult[] — A truncated list of documents associated with this relation. To be used in favor of `documents` because it contains a trackingToken.
            - `structuredResults` StructuredResult[] — An array of entities in the work graph retrieved via a data request.
              - …
            - `trackingToken` string — An opaque token that represents this particular result in this particular query. To be used for /feedback reporting.
            - `document` Document
              - …
            - `title` string
            - `url` string, required
            - `nativeAppUrl` string — A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://...).
            - `snippets` SearchResultSnippet[] — Text content from the result document which contains search query terms, if available.
              - …
            - `fullText` string — The full body text of the result if not already contained in the snippets. Only populated for conversation results (e.g. results from a messaging app such as Slack).
            - `fullTextList` string[] — The full body text of the result if not already contained in the snippets; each item in the array represents a separate line in the original text. Only populated for conversation results (e.g. results from a messaging app such as Slack).
            - `relatedResults` RelatedDocuments[] — A list of results related to this search result. Eg. for conversation results it contains individual messages from the conversation document which will be shown on SERP.
            - `clusteredResults` SearchResult[] — A list of results that should be displayed as associated with this result.
            - `allClusteredResults` ClusterGroup[] — A list of results that should be displayed as associated with this result.
              - …
            - `attachmentCount` integer — The total number of attachments.
            - `attachments` SearchResult[] — A (potentially partial) list of results representing documents attached to the main result document.
            - `backlinkResults` SearchResult[] — A list of results that should be displayed as backlinks of this result in reverse chronological order.
            - `clusterType` 'SIMILAR' | 'FRESHNESS' | 'TITLE' | 'CONTENT' | 'NONE' | 'THREAD_REPLY' | 'THREAD_ROOT' | 'PREFIX' | 'SUFFIX' | 'AUTHOR_PREFIX' | 'AUTHOR_SUFFIX' — The reason for inclusion of clusteredResults.
            - `mustIncludeSuggestions` QuerySuggestionList
              - …
            - `querySuggestion` QuerySuggestion
              - …
            - `prominence` 'HERO' | 'PROMOTED' | 'STANDARD' — The level of visual distinction that should be given to a result.
            - `attachmentContext` string — Additional context for the relationship between the result and the document it's attached to.
            - `pins` PinDocument[] — A list of pins associated with this search result.
              - …
        - `metadata` PersonMetadata
          - `type` 'FULL_TIME' | 'CONTRACTOR' | 'NON_EMPLOYEE' | 'FORMER_EMPLOYEE'
          - `firstName` string — The first name of the person
          - `lastName` string — The last name of the person
          - `title` string — Job title.
          - `businessUnit` string — Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses.
          - `department` string — An organizational unit where everyone has a similar task, e.g. `Engineering`.
          - `jobFunction` string — Normalized job-function category assigned by Entity Builder from the source department and, when available, job title. Unlike `department`, which preserves the company-specific organizational unit, this field groups departments into configured categories such as `Engineering`, `Sales`, or `IT`; it may be `Unknown` when the mapping is inconclusive.
          - `teams` PersonTeam[] — Info about the employee's team(s).
            - `id` string — Unique identifier
            - `name` string — Team name
            - `externalLink` string, uri — Link to a team page on the internet or your company's intranet
            - `relationship` 'MEMBER' | 'MANAGER' | 'LEAD' | 'POINT_OF_CONTACT' | 'OTHER' — The team member's relationship to the team. This defaults to MEMBER if not set.
            - `joinDate` string, date-time — The team member's start date
          - `departmentCount` integer — The number of people in this person's department.
          - `email` string — The user's primary email address
          - `aliasEmails` string[] — Additional email addresses of this user beyond the primary, if any.
          - `location` string — User facing string representing the person's location.
          - `structuredLocation` StructuredLocation — Detailed location with information about country, state, city etc.
            - `deskLocation` string — Desk number.
            - `timezone` string — Location's timezone, e.g. UTC, PST.
            - `address` string — Office address or name.
            - `city` string — Name of the city.
            - `state` string — State code.
            - `region` string — Region information, e.g. NORAM, APAC.
            - `zipCode` string — ZIP Code for the address.
            - `country` string — Country name.
            - `countryCode` string — Alpha-2 or Alpha-3 ISO 3166 country code, e.g. US or USA.
          - `externalProfileLink` string — Link to a customer's internal profile page. This is set to '#' when no link is desired.
          - `manager` Person — recursive
          - `managementChain` Person[] — The chain of reporting in the company as far up as it goes. The last entry is this person's direct manager.
          - `phone` string — Phone number as a number string.
          - `timezone` string — The timezone of the person. E.g. "Pacific Daylight Time".
          - `timezoneOffset` integer — The offset of the person's timezone in seconds from UTC.
          - `timezoneIANA` string — The IANA timezone identifier, e.g. "America/Los_Angeles".
          - `photoUrl` string, url — The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs).
          - `uneditedPhotoUrl` string, url — The original photo URL of the person's avatar before any edits they made are applied
          - `bannerUrl` string, url — The URL of the person's banner photo.
          - `reports` Person[]
          - `startDate` string, date — The date when the employee started.
          - `endDate` string, date — If a former employee, the last date of employment.
          - `bio` string — Short biography or mission statement of the employee.
          - `pronoun` string — She/her, He/his or other pronoun.
          - `orgSizeCount` integer — The total recursive size of the people reporting to this person, or 1
          - `directReportsCount` integer — The total number of people who directly report to this person, or 0
          - `preferredName` string — The preferred name of the person, or a nickname.
          - `socialNetwork` SocialNetwork[] — List of social network profiles.
            - `name` string, required — Possible values are "twitter", "linkedin".
            - `profileName` string — Human-readable profile name.
            - `profileUrl` string, url, required — Link to profile.
          - `datasourceProfile` DatasourceProfile[] — List of profiles this user has in different datasources / tools that they use.
            - `datasource` string, required — The datasource the profile is of.
            - `handle` string, required — The display name of the entity in the given datasource.
            - `url` string — URL to view the entity's profile.
            - `nativeAppUrl` string — A deep link, if available, into the datasource's native application for the entity's platform (i.e. slack://...).
            - `isUserGenerated` boolean — For internal use only. True iff the data source profile was manually added by a user from within Glean (aka not from the original data source)
          - `querySuggestions` QuerySuggestionList
            - `suggestions` QuerySuggestion[]
              - …
            - `person` Person — recursive
          - `peopleDistance` PersonDistance[] — List of people and distances to those people from this person. Optionally with metadata.
            - `name` string, required — The display name.
            - `obfuscatedId` string, required — An opaque identifier that can be used to request metadata for a Person.
            - `distance` number, float, required — Distance to person, refer to PeopleDistance pipeline on interpretation of the value.
          - `inviteInfo` InviteInfo — Information regarding the invite status of a person.
            - `signUpTime` string, date-time — The time this person signed up in ISO format (ISO 8601).
            - `invites` ChannelInviteInfo[] — Latest invites received by the user for each channel
              - …
            - `inviter` Person — recursive
            - `inviteTime` string, date-time — The time this person was invited in ISO format (ISO 8601).
            - `reminderTime` string, date-time — The time this person was reminded in ISO format (ISO 8601) if a reminder was sent.
          - `isSignedUp` boolean — Whether the user has signed into Glean at least once.
          - `lastExtensionUse` string, date-time — The last time the user has used the Glean extension in ISO 8601 format.
          - `permissions` Permissions — Describes the permissions levels that a user has for permissioned features. When the client sends this, Permissions.read and Permissions.write are the additional permissions granted to a user on top of what they have via their roles. When the server sends this, Permissions.read and Permissions.write are the complete (merged) set of permissions the user has, and Permissions.roles is just for display purposes.
            - `canAdminSearch` boolean — TODO--deprecate in favor of the read and write properties. True if the user has access to /adminsearch
            - `canAdminClientApiGlobalTokens` boolean — TODO--deprecate in favor of the read and write properties. True if the user can administrate client API tokens with global scope
            - `canDlp` boolean — TODO--deprecate in favor of the read and write properties. True if the user has access to data loss prevention (DLP) features
            - `read` unknown
            - `write` unknown
            - `grant` unknown
            - `role` string — The roleId of the canonical role a user has. The displayName is equal to the roleId.
            - `roles` string[] — The roleIds of the roles a user has.
          - `customFields` CustomFieldData[] — User customizable fields for additional people information.
            - `label` string, required — A user-facing label for this field.
            - `values` CustomFieldValue[], required
              - …
            - `displayable` boolean, required — Determines whether the client should display this custom field
          - `loggingId` string — The logging id of the person used in scrubbed logs, tracking GA metrics.
          - `startDatePercentile` number, float — Percentage of the company that started strictly after this person. Between [0,100).
          - `busyEvents` AnonymousEvent[] — Intervals of busy time for this person, along with the type of event they're busy with.
            - `time` TimeInterval
              - …
            - `eventType` 'DEFAULT' | 'OUT_OF_OFFICE' — The nature of the event, for example "out of office".
          - `profileBoolSettings` object — flag settings to indicate user profile settings for certain items
          - `badges` Badge[] — The badges that a user has earned over their lifetime.
            - `key` string — An auto generated unique identifier.
            - `displayName` string — The badge name displayed to users
            - `iconConfig` IconConfig — Defines how to render an icon
              - …
            - `pinned` boolean — The badge should be shown on the PersonAttribution
          - `isOrgRoot` boolean — Whether this person is a "root" node in their organization's hierarchy.
      - `lastDraftGitAuthorId` string — ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API.
      - `lastUpdatedBy` Person
        - `name` string, required — The display name.
        - `obfuscatedId` string, required — An opaque identifier that can be used to request metadata for a Person.
        - `relatedDocuments` RelatedDocuments[] — A list of documents related to this person.
          - `relation` 'ATTACHMENT' | 'CANONICAL' | 'CASE' | 'contact' | 'CONTACT' | 'CONVERSATION_MESSAGES' | 'EXPERT' | 'FROM' | 'HIGHLIGHT' | 'opportunity' | 'OPPORTUNITY' | 'RECENT' | 'SOURCE' | 'TICKET' | 'TRANSCRIPT' | 'WITH' — How this document relates to the including entity.
          - `associatedEntityId` string — Which entity in the response that this entity relates to. Relevant when there are multiple entities associated with the response (such as merged customers)
          - `querySuggestion` QuerySuggestion
            - `missingTerm` string — A query term missing from the original query on which this suggestion is based.
            - `query` string, required — The query being suggested (e.g. enforcing the missing term from the original query).
            - `searchProviderInfo` SearchProviderInfo
              - …
            - `label` string — A user-facing description to display for the suggestion.
            - `datasource` string — The datasource associated with the suggestion.
            - `resultTab` ResultTab
              - …
            - `requestOptions` SearchRequestOptions
              - …
            - `ranges` TextRange[] — The bolded ranges within the query of the QuerySuggestion.
              - …
            - `inputDetails` SearchRequestInputDetails
              - …
          - `documents` Document[] — A truncated list of documents with this relation. TO BE DEPRECATED.
            - `id` string — The Glean Document ID.
            - `datasource` string — The app or other repository type from which the document was extracted
            - `connectorType` 'API_CRAWL' | 'BROWSER_CRAWL' | 'BROWSER_HISTORY' | 'BUILTIN' | 'FEDERATED_SEARCH' | 'PUSH_API' | 'WEB_CRAWL' | 'NATIVE_HISTORY' — The source from which document content was pulled, e.g. an API crawl or browser history
            - `docType` string — The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request).
            - `content` DocumentContent
              - …
            - `containerDocument` Document — recursive
            - `parentDocument` Document — recursive
            - `title` string — The title of the document.
            - `url` string — A permalink for the document.
            - `metadata` DocumentMetadata
              - …
            - `sections` DocumentSection[] — A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page.
              - …
          - `results` SearchResult[] — A truncated list of documents associated with this relation. To be used in favor of `documents` because it contains a trackingToken.
            - `structuredResults` StructuredResult[] — An array of entities in the work graph retrieved via a data request.
              - …
            - `trackingToken` string — An opaque token that represents this particular result in this particular query. To be used for /feedback reporting.
            - `document` Document
              - …
            - `title` string
            - `url` string, required
            - `nativeAppUrl` string — A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://...).
            - `snippets` SearchResultSnippet[] — Text content from the result document which contains search query terms, if available.
              - …
            - `fullText` string — The full body text of the result if not already contained in the snippets. Only populated for conversation results (e.g. results from a messaging app such as Slack).
            - `fullTextList` string[] — The full body text of the result if not already contained in the snippets; each item in the array represents a separate line in the original text. Only populated for conversation results (e.g. results from a messaging app such as Slack).
            - `relatedResults` RelatedDocuments[] — A list of results related to this search result. Eg. for conversation results it contains individual messages from the conversation document which will be shown on SERP.
            - `clusteredResults` SearchResult[] — A list of results that should be displayed as associated with this result.
            - `allClusteredResults` ClusterGroup[] — A list of results that should be displayed as associated with this result.
              - …
            - `attachmentCount` integer — The total number of attachments.
            - `attachments` SearchResult[] — A (potentially partial) list of results representing documents attached to the main result document.
            - `backlinkResults` SearchResult[] — A list of results that should be displayed as backlinks of this result in reverse chronological order.
            - `clusterType` 'SIMILAR' | 'FRESHNESS' | 'TITLE' | 'CONTENT' | 'NONE' | 'THREAD_REPLY' | 'THREAD_ROOT' | 'PREFIX' | 'SUFFIX' | 'AUTHOR_PREFIX' | 'AUTHOR_SUFFIX' — The reason for inclusion of clusteredResults.
            - `mustIncludeSuggestions` QuerySuggestionList
              - …
            - `querySuggestion` QuerySuggestion
              - …
            - `prominence` 'HERO' | 'PROMOTED' | 'STANDARD' — The level of visual distinction that should be given to a result.
            - `attachmentContext` string — Additional context for the relationship between the result and the document it's attached to.
            - `pins` PinDocument[] — A list of pins associated with this search result.
              - …
        - `metadata` PersonMetadata
          - `type` 'FULL_TIME' | 'CONTRACTOR' | 'NON_EMPLOYEE' | 'FORMER_EMPLOYEE'
          - `firstName` string — The first name of the person
          - `lastName` string — The last name of the person
          - `title` string — Job title.
          - `businessUnit` string — Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses.
          - `department` string — An organizational unit where everyone has a similar task, e.g. `Engineering`.
          - `jobFunction` string — Normalized job-function category assigned by Entity Builder from the source department and, when available, job title. Unlike `department`, which preserves the company-specific organizational unit, this field groups departments into configured categories such as `Engineering`, `Sales`, or `IT`; it may be `Unknown` when the mapping is inconclusive.
          - `teams` PersonTeam[] — Info about the employee's team(s).
            - `id` string — Unique identifier
            - `name` string — Team name
            - `externalLink` string, uri — Link to a team page on the internet or your company's intranet
            - `relationship` 'MEMBER' | 'MANAGER' | 'LEAD' | 'POINT_OF_CONTACT' | 'OTHER' — The team member's relationship to the team. This defaults to MEMBER if not set.
            - `joinDate` string, date-time — The team member's start date
          - `departmentCount` integer — The number of people in this person's department.
          - `email` string — The user's primary email address
          - `aliasEmails` string[] — Additional email addresses of this user beyond the primary, if any.
          - `location` string — User facing string representing the person's location.
          - `structuredLocation` StructuredLocation — Detailed location with information about country, state, city etc.
            - `deskLocation` string — Desk number.
            - `timezone` string — Location's timezone, e.g. UTC, PST.
            - `address` string — Office address or name.
            - `city` string — Name of the city.
            - `state` string — State code.
            - `region` string — Region information, e.g. NORAM, APAC.
            - `zipCode` string — ZIP Code for the address.
            - `country` string — Country name.
            - `countryCode` string — Alpha-2 or Alpha-3 ISO 3166 country code, e.g. US or USA.
          - `externalProfileLink` string — Link to a customer's internal profile page. This is set to '#' when no link is desired.
          - `manager` Person — recursive
          - `managementChain` Person[] — The chain of reporting in the company as far up as it goes. The last entry is this person's direct manager.
          - `phone` string — Phone number as a number string.
          - `timezone` string — The timezone of the person. E.g. "Pacific Daylight Time".
          - `timezoneOffset` integer — The offset of the person's timezone in seconds from UTC.
          - `timezoneIANA` string — The IANA timezone identifier, e.g. "America/Los_Angeles".
          - `photoUrl` string, url — The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs).
          - `uneditedPhotoUrl` string, url — The original photo URL of the person's avatar before any edits they made are applied
          - `bannerUrl` string, url — The URL of the person's banner photo.
          - `reports` Person[]
          - `startDate` string, date — The date when the employee started.
          - `endDate` string, date — If a former employee, the last date of employment.
          - `bio` string — Short biography or mission statement of the employee.
          - `pronoun` string — She/her, He/his or other pronoun.
          - `orgSizeCount` integer — The total recursive size of the people reporting to this person, or 1
          - `directReportsCount` integer — The total number of people who directly report to this person, or 0
          - `preferredName` string — The preferred name of the person, or a nickname.
          - `socialNetwork` SocialNetwork[] — List of social network profiles.
            - `name` string, required — Possible values are "twitter", "linkedin".
            - `profileName` string — Human-readable profile name.
            - `profileUrl` string, url, required — Link to profile.
          - `datasourceProfile` DatasourceProfile[] — List of profiles this user has in different datasources / tools that they use.
            - `datasource` string, required — The datasource the profile is of.
            - `handle` string, required — The display name of the entity in the given datasource.
            - `url` string — URL to view the entity's profile.
            - `nativeAppUrl` string — A deep link, if available, into the datasource's native application for the entity's platform (i.e. slack://...).
            - `isUserGenerated` boolean — For internal use only. True iff the data source profile was manually added by a user from within Glean (aka not from the original data source)
          - `querySuggestions` QuerySuggestionList
            - `suggestions` QuerySuggestion[]
              - …
            - `person` Person — recursive
          - `peopleDistance` PersonDistance[] — List of people and distances to those people from this person. Optionally with metadata.
            - `name` string, required — The display name.
            - `obfuscatedId` string, required — An opaque identifier that can be used to request metadata for a Person.
            - `distance` number, float, required — Distance to person, refer to PeopleDistance pipeline on interpretation of the value.
          - `inviteInfo` InviteInfo — Information regarding the invite status of a person.
            - `signUpTime` string, date-time — The time this person signed up in ISO format (ISO 8601).
            - `invites` ChannelInviteInfo[] — Latest invites received by the user for each channel
              - …
            - `inviter` Person — recursive
            - `inviteTime` string, date-time — The time this person was invited in ISO format (ISO 8601).
            - `reminderTime` string, date-time — The time this person was reminded in ISO format (ISO 8601) if a reminder was sent.
          - `isSignedUp` boolean — Whether the user has signed into Glean at least once.
          - `lastExtensionUse` string, date-time — The last time the user has used the Glean extension in ISO 8601 format.
          - `permissions` Permissions — Describes the permissions levels that a user has for permissioned features. When the client sends this, Permissions.read and Permissions.write are the additional permissions granted to a user on top of what they have via their roles. When the server sends this, Permissions.read and Permissions.write are the complete (merged) set of permissions the user has, and Permissions.roles is just for display purposes.
            - `canAdminSearch` boolean — TODO--deprecate in favor of the read and write properties. True if the user has access to /adminsearch
            - `canAdminClientApiGlobalTokens` boolean — TODO--deprecate in favor of the read and write properties. True if the user can administrate client API tokens with global scope
            - `canDlp` boolean — TODO--deprecate in favor of the read and write properties. True if the user has access to data loss prevention (DLP) features
            - `read` unknown
            - `write` unknown
            - `grant` unknown
            - `role` string — The roleId of the canonical role a user has. The displayName is equal to the roleId.
            - `roles` string[] — The roleIds of the roles a user has.
          - `customFields` CustomFieldData[] — User customizable fields for additional people information.
            - `label` string, required — A user-facing label for this field.
            - `values` CustomFieldValue[], required
              - …
            - `displayable` boolean, required — Determines whether the client should display this custom field
          - `loggingId` string — The logging id of the person used in scrubbed logs, tracking GA metrics.
          - `startDatePercentile` number, float — Percentage of the company that started strictly after this person. Between [0,100).
          - `busyEvents` AnonymousEvent[] — Intervals of busy time for this person, along with the type of event they're busy with.
            - `time` TimeInterval
              - …
            - `eventType` 'DEFAULT' | 'OUT_OF_OFFICE' — The nature of the event, for example "out of office".
          - `profileBoolSettings` object — flag settings to indicate user profile settings for certain items
          - `badges` Badge[] — The badges that a user has earned over their lifetime.
            - `key` string — An auto generated unique identifier.
            - `displayName` string — The badge name displayed to users
            - `iconConfig` IconConfig — Defines how to render an icon
              - …
            - `pinned` boolean — The badge should be shown on the PersonAttribution
          - `isOrgRoot` boolean — Whether this person is a "root" node in their organization's hierarchy.
      - `id` string — The ID of the workflow.
      - `verified` boolean — When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits.
      - `showOrganizationAsAuthor` boolean — When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits.
      - `webhookUrl` string — For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL (.../webhooks/custom/<token>) minted for the agent. Empty for other trigger types.
  - `status` 'CREATED' | 'UPDATED' | 'DRAFT_PREVIEW' — Outcome of the import for the target agent.

## Other responses

- `400` — Bad request
- `401` — Not Authorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal server error

## Changes

> 92 revisions in range; 7 could not be searched.

- **2026-08-05** `eb8771f34824` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/gleanwork/apis/glean-api/changes/rest/api/v1/agents/:agent_id/import/post.md)

---

[API](https://skmtc.dev/gleanwork/apis/glean-api.md) · [All operations](https://skmtc.dev/gleanwork/apis/glean-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gleanwork/glean-api/revisions/7ed1f79f6fb7/schema)
