# Affinda

Affinda provides an AI-powered document processing platform that automates data extraction from various document types.

- **Category:** artificial intelligence
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 128
- **Triggers:** 0
- **Slug:** `AFFINDA`
- **Version:** 20260309_00

## Tools

### Add Tag to Documents

**Slug:** `AFFINDA_ADD_TAG_TO_DOCUMENTS`

Tool to add a tag to multiple documents in a single operation. Use when you need to organize or categorize multiple documents by assigning them a shared tag. Tags enable efficient filtering and grouping of documents in your workspace.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | integer | Yes | The tag's unique ID to add to the documents. Obtain tag IDs using the Get Tags action. |
| `identifiers` | array | Yes | List of document identifiers to tag. Each identifier must be a valid document identifier from your workspace. Use the Get Documents action to retrieve document identifiers. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Batch Update Annotations

**Slug:** `AFFINDA_BATCH_UPDATE_ANNOTATIONS`

Batch update multiple document annotations in a single API call. Use this action to efficiently update parsed values or other fields across many annotations at once, rather than making individual update requests for each annotation. Prerequisites: - Obtain annotation IDs using the 'Get Annotations' action with a document filter - Annotations must exist in documents that have been processed by Affinda Common use cases: - Correcting OCR/extraction errors in bulk - Updating parsed values after manual review - Modifying annotation data programmatically

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `annotations` | array | Yes | List of annotation update objects. Each object must include the annotation 'id' and at least one field to update (typically 'parsed'). Maximum recommended batch size is 100 annotations per request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create API User

**Slug:** `AFFINDA_CREATE_API_USER`

Tool to create a new API user within an organization. Use when you need to generate a new API user with authentication credentials for programmatic access to Affinda services.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Name of the API user to be created. |
| `email` | string | No | Email address for the API user. |
| `avatar` | string | No | URL of the user's avatar image. |
| `username` | string | No | Username for the API user. |
| `organization` | string | Yes | Uniquely identify an organization. This is a required field to specify which organization the API user belongs to. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Batch Create Annotations

**Slug:** `AFFINDA_CREATE_BATCH_ANNOTATIONS`

Batch create multiple document annotations in a single API call. Use this action to efficiently create multiple annotations at once for documents that have been processed by Affinda. This is useful for programmatically adding structured data to documents or importing annotation data from external sources. Prerequisites: - Documents must be created first using 'Create Document' action - Obtain document identifiers from 'Create Document' or 'Get Documents' actions - Know the data point identifiers for your collection (from extractor configuration) Common use cases: - Importing annotation data from external systems - Programmatically adding structured data to documents - Creating annotations for validation or training purposes

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `annotations` | array | Yes | List of annotation objects to create. Each object must include 'document' and 'pageIndex'. Recommended maximum batch size is 100 annotations per request for optimal performance. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Collection

**Slug:** `AFFINDA_CREATE_COLLECTION`

Tool to create a new collection. Use after you have a valid workspace ID and want to group documents by a specific extractor within that workspace.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Human-readable name for the collection. |
| `extractor` | string | Yes | Identifier of the extractor to use for documents in this collection. Common extractors include 'resume' for resumes/CVs and 'invoice' for invoices. Get available extractors via the Get Extractors action. |
| `workspace` | string | Yes | Identifier of the workspace where the collection will be created. Get workspace IDs via the Get Workspaces action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Data Field For Collection

**Slug:** `AFFINDA_CREATE_DATA_FIELD_FOR_COLLECTION`

Tool to create a data field for a collection along with a new data point. Use when you need to add a custom field to a collection for document processing and validation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `field` | object | Yes | The field to be created. |
| `dataPoint` | object | Yes | The data point to be created for this field. If a data point with the same slug and collection already exists, it will be reused. |
| `identifier` | string | Yes | Collection's identifier. This is the unique identifier for the collection where the data field will be created. |
| `categoryLabel` | string | No | The label of the category that this field will be put into. If not provided, the field will be put into the default category. If no category exists with the specified label, a new category will be created. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Data Point

**Slug:** `AFFINDA_CREATE_DATA_POINT`

Tool to create a custom data point for document extraction. Use when you need to define a new field that should be extracted from documents in a specific extractor. Note: This endpoint is deprecated but still functional. Data points define custom fields for extraction models.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name of the data point. This is the human-readable label displayed in the UI. |
| `slug` | string | Yes | A camelCase string that will be used as the key in the API response. Must be unique within the extractor. Use lowercase letters and no spaces. |
| `noRect` | boolean | No | If true, this data point will not have a bounding rectangle on the document. Useful for computed or derived fields. |
| `parent` | string | No | The identifier of the parent data point if this is a nested/child data point. Used to create hierarchical data structures. |
| `multiple` | boolean | No | If true, this data point can have multiple values extracted from a single document. For example, multiple phone numbers or email addresses. |
| `extractor` | string | Yes | Identifier of the extractor this data point belongs to. Common extractors include 'resume', 'invoice', 'receipt'. Get available extractors via the Get Extractors action. |
| `description` | string | No | Optional description explaining what this data point represents and how it should be used. Helps users understand the purpose of this field. |
| `manualEntry` | boolean | No | If true, the model will not be used to predict this data point. Instead, the user will be able to manually enter the value in the validation tool. Useful for fields that are difficult to extract automatically. |
| `organization` | string | Yes | Organization identifier that will own this data point. This is typically an 8-character alphanumeric string. |
| `mappingDataSource` | string | No | If populated, the model will learn to predict this field using the data source, rather than relying on fuzzy string matching. Specify the identifier of a mapping data source. |
| `annotationContentType` | string ("text" | "integer" | "float" | "decimal" | "date" | "datetime" | "daterange" | "boolean" | "enum" | "location" | "phonenumber" | "json" | "table" | "expectedremuneration" | "jobtitle" | "language" | "skill" | "yearsexperience" | "group" | "table_deprecated" | "url" | "image" | "docclf") | Yes | The data type of this data point. Determines how the value will be extracted and validated. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Data Point Choice

**Slug:** `AFFINDA_CREATE_DATA_POINT_CHOICE`

Tool to create a custom data point choice. Use when you need to add a new choice option for a specific data point in a collection or organization. Note: This endpoint is deprecated but still functional.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `label` | string | Yes | Label of the data point choice |
| `value` | string | Yes | Value of the data point choice |
| `synonyms` | array | No | List of synonyms for the data point choice |
| `dataPoint` | string | Yes | Uniquely identify a data point |
| `collection` | string | No | Uniquely identify a collection |
| `description` | string | No | Description of the data point choice |
| `organization` | string | No | Uniquely identify an organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Data Source

**Slug:** `AFFINDA_CREATE_DATA_SOURCE`

Tool to create a custom mapping data source. Use when you need to set up a new data source for mapping AI-extracted values to your database records.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Human-readable name for the mapping data source for easier identification. |
| `schema` | object | No | The JSON schema defining the structure of the mapping data source. Should follow JSON Schema Draft 7 format. |
| `values` | array | No | Array of data objects conforming to the schema. Each object represents a record in the mapping data source. |
| `workspace` | string | No | The workspace identifier that this mapping data source belongs to. If not specified, uses the default workspace. |
| `identifier` | string | Yes | Unique identifier for the mapping data source. Must be unique within your organization. |
| `keyProperty` | string | No | Attribute in the schema which uniquely identifies the value. Defaults to 'value' if not specified. |
| `organization` | string | No | The organization identifier that this mapping data source belongs to. If not specified, uses the default organization. |
| `displayProperty` | string | No | Attribute in the schema which is used to display the value. Defaults to 'label' if not specified. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Data Source Value

**Slug:** `AFFINDA_CREATE_DATA_SOURCE_VALUE`

Tool to add a new value to a mapping data source. Use when you need to add entries to a data source for mapping or validation purposes. The created value can then be referenced in document extraction and mapping workflows.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `label` | string | No | Optional human-readable label for the value. Provides a display name for the value in the UI. |
| `value` | string | Yes | The value to add to the mapping data source. This is the primary data that will be stored and mapped. |
| `identifier` | string | Yes | Unique identifier of the mapping data source to add the value to. Obtain this from the list_data_sources action. |
| `description` | string | No | Optional description providing additional context or details about the value. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Document

**Slug:** `AFFINDA_CREATE_DOCUMENT`

Upload a document to Affinda for parsing and data extraction. Use this action when you need to: - Parse resumes/CVs to extract candidate information - Process invoices to extract line items, amounts, and vendor details - Extract data from any supported document type (PDF, DOCX, images) You can upload either a file directly or provide a publicly accessible URL. The document will be processed by Affinda's AI extraction engine. Prerequisites: - For collection-based uploads: Get collection ID from get_collections action - For workspace-specific uploads: Get workspace ID from get_workspaces action

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | No | Publicly accessible URL of the document to parse. Alternative to uploading a `file`. The URL must be directly accessible without authentication. |
| `file` | object | No | Document file to upload for parsing. Supports PDF, DOCX, DOC, PNG, JPG, TIFF formats. |
| `wait` | boolean | No | If true, the API will wait for parsing to complete before returning. If false or omitted, returns immediately with status 'pending'. |
| `compact` | boolean | No | If true, return a compact response with fewer fields for faster transmission. |
| `fileName` | string | No | Override filename when uploading via URL. This sets the document's display name in Affinda. Ignored when uploading via `file` parameter. |
| `language` | string | No | ISO 639-1 language code for the document content. Helps improve OCR and extraction accuracy for non-English documents. |
| `workspace` | string | No | Workspace identifier where the document will be created. Obtain this from the get_workspaces action. If omitted, defaults to the user's primary workspace. |
| `collection` | string | No | Collection identifier to add the document to. Obtain this from the get_collections action. If not specified, document will be in the workspace without a collection. |
| `expiryTime` | string | No | ISO 8601 datetime when the document should be automatically deleted. Use for temporary documents or compliance requirements. |
| `identifier` | string | No | Custom identifier for your own reference to track this document. Must be unique within your workspace. |
| `rejectDuplicates` | boolean | No | If true, reject the document if it appears to be a duplicate of an existing document in the collection. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Document Type

**Slug:** `AFFINDA_CREATE_DOCUMENT_TYPE`

Tool to create a new document type in the specified organization. Use when you need to define a new category of documents for processing. Document types allow you to organize and categorize documents within an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The name of the document type to create. |
| `description` | string | No | Optional description of the document type. |
| `organization` | string | Yes | The identifier of the organization this document type belongs to. Get organization IDs via the Get Organizations action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Extractor

**Slug:** `AFFINDA_CREATE_EXTRACTOR`

Tool to create a new extractor. Use when you need to define a custom document parser with specific fields and extraction rules, typically derived from a base extractor.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name of the extractor to be created. |
| `category` | string | No | Category to organize the extractor under. |
| `namePlural` | string | No | Plural form of the extractor name. If not provided, defaults to adding 's' to the name. |
| `fieldGroups` | array | No | List of field groups defining the data structure to extract. Each field group must have 'label' and 'fields' properties. |
| `validatable` | boolean | No | Whether documents using this extractor can be validated. If true, enables validation workflows. |
| `organization` | string | Yes | Unique identifier of the organization where the extractor will be created. Obtain this from the Get Organization action. |
| `baseExtractor` | string | No | Identifier of the base extractor to derive from. Common base extractors include 'resume', 'invoice', 'job-description'. If provided, the new extractor will inherit fields and behavior from this base extractor. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Document from Data

**Slug:** `AFFINDA_CREATE_FROM_DATA_DOCUMENTS`

Create a document from structured resume or job description data for Search & Match. Use this when you have structured data to create a document programmatically without file uploads. Returns an identifier for subsequent status checks via /documents/{identifier}.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Structured resume or job description data. For resumes, include fields like 'name' (with 'first', 'last', 'raw'), 'profession', 'skills' (array of objects with 'name'), 'summary', 'workExperience', 'education', 'emails', 'phoneNumbers', etc. For job descriptions, include 'jobTitle', 'organizationName', 'location', 'skills', 'yearsExperience', 'languages', etc. All fields are optional within the data object. |
| `wait` | boolean | No | If true, waits for processing to complete before returning. If false, returns immediately. |
| `fileName` | string | No | Optional filename to assign to the created document for display purposes. |
| `language` | string | No | ISO 639-1 language code for the document content. |
| `workspace` | string | No | Workspace identifier where the document will be created. Defaults to the user's primary workspace if omitted. |
| `collection` | string | No | Collection identifier to add the document to. Obtain from get_collections action. Either 'collection' or 'document_type' must be provided. Use this when you want to add the document to a specific collection for Search & Match functionality. |
| `expiryTime` | string | No | ISO 8601 datetime when the document should be automatically deleted. |
| `identifier` | string | No | Custom identifier for tracking this document. Not required to be unique. |
| `snake_case` | boolean | No | If true, returns the response with snake_case field names instead of camelCase. Defaults to false. |
| `document_type` | string | No | Document type identifier. Obtain valid identifiers using the get_document_types action. Either 'document_type' or 'collection' must be provided. Use this when you want to specify the type of document being created (e.g., resume, job description). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Index

**Slug:** `AFFINDA_CREATE_INDEX`

Tool to create a new index for search and match functionality. Use when you need to set up a new index for organizing and searching documents like resumes or job descriptions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Unique name for the index. This will be used to identify and reference the index in future operations. |
| `docType` | string ("resumes" | "job_descriptions") | No | Document type enumeration for index creation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Invitation

**Slug:** `AFFINDA_CREATE_INVITATION`

Tool to create a new organization invitation. Use when you need to invite a user to join an organization with a specific role.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `role` | string ("admin" | "member") | Yes | The role the invited user will have in the organization. Must be either 'admin' or 'member'. |
| `email` | string | Yes | The email address which the invitation is sent to. |
| `organization` | string | Yes | Uniquely identify an organization. This is the organization identifier. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Job Description Search

**Slug:** `AFFINDA_CREATE_JOB_DESCRIPTION_SEARCH`

Search through parsed job descriptions using custom criteria or resume matching. Use this action when you need to find job postings that match specific requirements such as skills, experience, location, education, or to find jobs matching a candidate's resume. Returns ranked results with detailed match scores.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum number of job description results to return. |
| `offset` | integer | No | Number of results to skip before starting to collect the result set (for pagination). |
| `resume` | string | No | Resume identifier to match against job descriptions. Use this to find jobs that match a candidate's resume. |
| `skills` | array | No | List of skills to filter by with optional required flags. |
| `degrees` | array | No | List of specific degree names to filter by (e.g., ['Computer Science', 'Business Administration']). |
| `indices` | array | Yes | List of index names to search within. Use 'all-job-descriptions' to search all available job descriptions. |
| `socCodes` | array | No | List of SOC (Standard Occupational Classification) codes to filter by. |
| `jobTitles` | array | No | List of job titles to filter by (e.g., ['Software Engineer', 'Data Scientist']). |
| `languages` | array | No | List of languages to filter by with optional required flags. |
| `locations` | array | No | List of locations to filter by with optional distance radius. |
| `customData` | array | No | List of custom data filters for advanced search criteria beyond standard fields. |
| `degreeTypes` | array | No | List of degree types to filter by (e.g., bachelors, masters). |
| `skillsWeight` | number | No | Weight for skills in the overall search score (0.0 to 1.0). |
| `socCodesWeight` | number | No | Weight for SOC codes in the overall search score (0.0 to 1.0). |
| `degreesRequired` | boolean | No | If true, degrees must match. If false, used for scoring only. |
| `educationWeight` | number | No | Weight for education in the overall search score (0.0 to 1.0). |
| `jobTitlesWeight` | number | No | Weight for job titles in the overall search score (0.0 to 1.0). |
| `languagesWeight` | number | No | Weight for languages in the overall search score (0.0 to 1.0). |
| `locationsWeight` | number | No | Weight for locations in the overall search score (0.0 to 1.0). |
| `managementLevel` | string ("None" | "Low" | "Mid" | "Upper") | No | Enumeration of management level types for filtering job descriptions. |
| `searchExpression` | string | No | Free-text search expression to filter job descriptions (e.g., 'remote work' or 'startup environment'). |
| `socCodesRequired` | boolean | No | If true, SOC codes must match. If false, used for scoring only. |
| `jobTitlesRequired` | boolean | No | If true, job titles must match. If false, used for scoring only. |
| `locationsRequired` | boolean | No | If true, locations must match. If false, used for scoring only. |
| `degreeTypesRequired` | boolean | No | If true, degree types must match. If false, used for scoring only. |
| `totalYearsExperience` | number | No | Total years of experience requirement for job descriptions. |
| `managementLevelWeight` | number | No | Weight for management level in the overall search score (0.0 to 1.0). |
| `yearsExperienceWeight` | number | No | Weight for years of experience in the overall search score (0.0 to 1.0). |
| `searchExpressionWeight` | number | No | Weight for search expression in the overall search score (0.0 to 1.0). |
| `managementLevelRequired` | boolean | No | If true, management level must match. If false, used for scoring only. |
| `yearsExperienceRequired` | boolean | No | If true, years of experience must match. If false, used for scoring only. |
| `searchExpressionRequired` | boolean | No | If true, search expression must match. If false, used for scoring only. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Job Description Search Embed URL

**Slug:** `AFFINDA_CREATE_JOB_DESCRIPTION_SEARCH_EMBED_URL`

Tool to create and return a signed URL for the embeddable job description search tool. Use this when you need to generate a URL that can be embedded on a web page to provide job description search functionality. Optionally pass config_override to customize display settings, field weights, and theme.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `configOverride` | object | No | Configuration overrides for the embeddable job description search tool. All fields are optional and override the user-level configurations. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Mapping

**Slug:** `AFFINDA_CREATE_MAPPING`

Tool to create a custom mapping for a data source. Use when you need to configure specific lookup settings for a MappingDataSource. Note: This endpoint is deprecated.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `orderBy` | string | No | The field to order the results by. Leave blank for ordering by relevance. |
| `dataSource` | string | Yes | The mapping data source this mapping applies to. This is a required identifier for the data source. |
| `scoreCutoff` | number | No | Higher values will result in more strict matching. |
| `organization` | string | No | The organization that this mapping belongs to. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Organization

**Slug:** `AFFINDA_CREATE_ORGANIZATION`

Tool to create a new organization. Use when you have a unique organization name and want to group resources under it.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name of the organization to be created |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create RESTHook Subscription

**Slug:** `AFFINDA_CREATE_RESTHOOK_SUBSCRIPTION`

Tool to create a new RESTHook subscription. Use after confirming your webhook endpoint is ready to receive document event notifications.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `event` | string ("document.parse.completed" | "document.parse.succeeded" | "document.parse.failed" | "document.validate.completed" | "document.classify.completed" | "document.classify.succeeded" | "document.classify.failed" | "document.rejected") | Yes | The event to subscribe to. |
| `targetUrl` | string | Yes | The URL where webhook notifications will be sent. |
| `organization` | string | Yes | The organization identifier for which the subscription is created. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Resume Search

**Slug:** `AFFINDA_CREATE_RESUME_SEARCH`

Tool to search through parsed resumes using three methods: match to a job description, match to a resume, or custom criteria. Use when you need to find candidates matching specific requirements.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | The number of results to return per page. Use for pagination. |
| `offset` | integer | No | The number of documents to skip before starting to collect the result set. Use for pagination. |
| `resume` | string | No | Identifier of a parsed resume to find similar candidates. Use this option to find candidates with similar attributes. Do not use with 'job_description' or custom criteria. |
| `skills` | array | No | List of skills to search for. |
| `degrees` | array | No | List of specific degree names to search for (e.g., 'Bachelor of Science', 'MBA'). |
| `indices` | array | Yes | List of index names to search through. Must provide at least one index. Use 'all-resumes' to search all available resume indices. |
| `socCodes` | array | No | List of occupation group IDs (SOC codes, 1-9999). Get details from the occupation_groups endpoint. |
| `jobTitles` | array | No | List of job titles to search for (e.g., 'Software Engineer', 'Data Scientist'). |
| `languages` | array | No | List of languages to search for. |
| `locations` | array | No | List of locations to search by. Can specify by name or coordinates with distance radius. |
| `customData` | array | No | List of custom data filters for advanced search criteria. |
| `institutions` | array | No | List of educational institutions to search for (e.g., 'Stanford University', 'MIT'). |
| `skillsWeight` | number | No | Weight for skills in search ranking (0.0-1.0). |
| `jobDescription` | string | No | Identifier of a parsed job description to match candidates against. Use this option to find candidates that suit a specific job. Do not use with 'resume' or custom criteria. |
| `socCodesWeight` | number | No | Weight for SOC codes in search ranking (0.0-1.0). |
| `degreesRequired` | boolean | No | Whether specific degrees are required. |
| `educationWeight` | number | No | Weight for education in search ranking (0.0-1.0). |
| `jobTitlesWeight` | number | No | Weight for job titles in search ranking (0.0-1.0). |
| `languagesWeight` | number | No | Weight for languages in search ranking (0.0-1.0). |
| `locationsWeight` | number | No | Weight for location in search ranking (0.0-1.0). |
| `managementLevel` | string ("None" | "Low" | "Mid" | "Upper") | No | Enumeration for management levels. |
| `isCurrentStudent` | boolean | No | Search for student candidates currently enrolled in education. |
| `isRecentGraduate` | boolean | No | Search for candidates that graduated less than a year ago. |
| `searchExpression` | string | No | Search through resumes' raw text using a keyword expression. |
| `socCodesRequired` | boolean | No | Whether SOC codes are required. |
| `jobTitlesRequired` | boolean | No | Whether job titles are required. If true, only resumes with matching job titles will be returned. |
| `locationsRequired` | boolean | No | Whether location match is required. |
| `highestDegreeTypes` | array | No | List of highest degree types to filter by. |
| `yearsExperienceMax` | integer | No | Maximum years of total work experience allowed. |
| `yearsExperienceMin` | integer | No | Minimum years of total work experience required. |
| `institutionsRequired` | boolean | No | Whether institutions are required. |
| `jobTitlesCurrentOnly` | boolean | No | If true, search only through the candidate's current job title. |
| `managementLevelWeight` | number | No | Weight for management level in search ranking (0.0-1.0). |
| `yearsExperienceWeight` | number | No | Weight for years of experience in search ranking (0.0-1.0). |
| `searchExpressionWeight` | number | No | Weight for search expression in search ranking (0.0-1.0). |
| `managementLevelRequired` | boolean | No | Whether management level is required. |
| `yearsExperienceRequired` | boolean | No | Whether years of experience filter is required. |
| `isCurrentStudentRequired` | boolean | No | Whether current student status is required. |
| `isRecentGraduateRequired` | boolean | No | Whether recent graduate status is required. |
| `searchExpressionRequired` | boolean | No | Whether search expression match is required. |
| `highestDegreeTypesRequired` | boolean | No | Whether highest degree types are required. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Resume Search Embed URL

**Slug:** `AFFINDA_CREATE_RESUME_SEARCH_EMBED_URL`

Tool to create and return a signed URL for the embeddable resume search tool. Use this when you need to generate a URL that can be embedded on a web page to provide resume search functionality. Optionally pass config_override to customize display settings, field weights, and theme.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `configOverride` | object | No | Configuration overrides for the embeddable resume search tool. All fields are optional and override the user-level configurations. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Tag

**Slug:** `AFFINDA_CREATE_TAG`

Creates a new tag in the specified workspace. Tags can be used to categorize and label documents for organization and filtering. Each tag name must be unique within its workspace. Returns the created tag with its ID and metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The name of the tag to create. Must be unique within the workspace. Supports Unicode characters and emojis. |
| `workspace` | string | Yes | The unique identifier of the workspace where the tag will be created. Obtain this from the Get Workspaces action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Validation Result

**Slug:** `AFFINDA_CREATE_VALIDATION_RESULT`

Create a validation result for document annotations in Affinda. Use this tool to record validation outcomes after parsing a document. Validation results track whether specific annotations (extracted data fields) pass or fail business rules. Prerequisites: 1. Get a document identifier from Get Documents or Create Document 2. Get annotation IDs from Get Annotations for that document 3. Define a kebab-case rule slug that identifies your validation rule Example use cases: - Recording that an invoice total matches the sum of line items - Marking that a required field is present and valid - Logging validation failures for review workflows

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `passed` | boolean | No | Whether the validation passed (true), failed (false), or is not applicable (null/omitted). |
| `message` | string | Yes | Human-readable message explaining why the validation passed or failed. |
| `document` | string | Yes | Unique identifier of the document being validated. Obtain from Get Documents or Create Document actions. |
| `ruleSlug` | string | Yes | The kebab-case slug identifier of the validation rule being applied. Must match pattern: lowercase letters, numbers, and hyphens only (e.g., 'field-is-required', 'amount-is-positive'). |
| `annotations` | array | Yes | List of annotation IDs that this validation result applies to. Obtain annotation IDs from the Get Annotations action for a specific document. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Batch Create Validation Results

**Slug:** `AFFINDA_CREATE_VALIDATION_RESULTS_BATCH`

Batch create multiple validation results for document annotations in a single API call. Use this action to efficiently record validation outcomes for multiple documents or rules at once, rather than making individual create requests for each validation result. This is particularly useful for bulk validation workflows or when validating multiple rules across many documents. Prerequisites: - Obtain document identifiers from Get Documents or Create Document actions - Get annotation IDs from Get Annotations for those documents - Define kebab-case rule slugs that identify your validation rules Common use cases: - Bulk recording of validation results across multiple documents - Validating multiple business rules on the same document - Automated validation workflows for large document batches

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `validation_results` | array | Yes | List of validation result objects to create. Each object must include annotations, ruleSlug, message, and document. Maximum recommended batch size is 100 validation results per request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Workspace

**Slug:** `AFFINDA_CREATE_WORKSPACE`

Tool to create a new workspace. Use when you need to programmatically create a workspace container within an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Name of the workspace to create. |
| `visibility` | string ("organization" | "private") | No | Visibility setting of the workspace. Use 'organization' for org-wide visibility or 'private' for restricted access. Defaults to 'organization' if not specified. |
| `organization` | string | Yes | Identifier of the organization to which the workspace will belong. Obtain this from the get_organizations action. |
| `rejectInvalidDocuments` | boolean | No | If true, documents that fail validation will be automatically rejected. Defaults to false. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Workspace Membership

**Slug:** `AFFINDA_CREATE_WORKSPACE_MEMBERSHIP`

Tool to add a user to a workspace by creating a membership. Use when you need to grant a user access to a specific workspace.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | integer | Yes | Unique numeric identifier of the user to add to the workspace. Must be a valid user ID from the Affinda system. Obtain this from the 'Get All API Users' action. |
| `workspace` | string | Yes | Unique alphanumeric identifier of the workspace to add the user to. Obtain this from the 'Get Workspaces' action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Batch Delete Annotations

**Slug:** `AFFINDA_DELETE_ANNOTATIONS_BATCH`

Batch delete multiple document annotations in a single API call. Use this action to efficiently remove multiple annotations at once rather than making individual delete requests for each annotation. Prerequisites: - Obtain annotation IDs using the 'Get Annotations' action with a document filter - Annotations must exist in documents that have been processed by Affinda Common use cases: - Removing incorrect or unwanted annotations in bulk - Cleaning up annotations after document reprocessing - Deleting specific extracted data fields programmatically

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `annotation_ids` | array | Yes | Array of annotation IDs to be deleted. Each ID must be a positive integer representing an existing annotation. Obtain annotation IDs from the 'Get Annotations' action. Must contain at least one annotation ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Collection

**Slug:** `AFFINDA_DELETE_COLLECTION`

Permanently delete a collection from Affinda by its identifier. This is a destructive operation that cannot be undone. Use Get Collections first to verify the collection ID before deletion. Note: Documents in the collection may also be affected.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `collection_id` | string | Yes | The unique identifier of the collection to delete. Get this ID from the 'identifier' field in Get Collections or Create Collection responses. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Data Point

**Slug:** `AFFINDA_DELETE_DATA_POINT`

Tool to permanently delete a data point by its identifier. Use when you need to remove a data point from the database after confirming the identifier. Note: This endpoint is deprecated but still functional.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the data point to delete. This is an 8-character alphanumeric string. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Data Source

**Slug:** `AFFINDA_DELETE_DATA_SOURCE`

Permanently delete a mapping data source from the database by its identifier. This is a destructive operation that cannot be undone. Use when you need to remove a data source that is no longer needed or was created in error.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the mapping data source to delete. This is an 8-character alphanumeric string obtained from data source creation or listing operations. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Data Source Value

**Slug:** `AFFINDA_DELETE_DATA_SOURCE_VALUE`

Tool to delete a specific value from a mapping data source. Use when you need to remove an incorrect or outdated value from a data source mapping.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `value` | string | Yes | The specific data source value to delete from the mapping data source. |
| `identifier` | string | Yes | The unique identifier of the mapping data source. This identifies which data source contains the value to delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Document

**Slug:** `AFFINDA_DELETE_DOCUMENT`

Tool to delete a specific document by its ID. Use when you need to remove a document that is incorrect or no longer needed, after confirming the document ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the document to delete. Must match an existing document ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Document Type

**Slug:** `AFFINDA_DELETE_DOCUMENT_TYPE`

Tool to permanently delete a document type by its identifier. Use when you need to remove a document type that is no longer needed. This is a destructive operation that cannot be undone.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the document type to delete. Get this ID from the 'identifier' field in Get Document Types or Get Document Type responses. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Extractor

**Slug:** `AFFINDA_DELETE_EXTRACTOR`

Permanently delete an extractor from Affinda by its identifier. This is a destructive operation that cannot be undone. Use Get Extractors first to verify the extractor ID before deletion. Note: This action is deprecated by the API.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the extractor to delete. Get this ID from the 'identifier' field in Get Extractors response. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Index

**Slug:** `AFFINDA_DELETE_INDEX`

Tool to permanently delete an index from Affinda by its name. Use when you need to remove an index that is no longer needed. This is a destructive operation that cannot be undone.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The unique name of the index to delete. This is the identifier used when creating the index. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Invitation

**Slug:** `AFFINDA_DELETE_INVITATION`

Tool to delete an invitation by its identifier. Use when you need to remove or revoke an invitation after confirming the invitation identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the invitation to delete. Can be obtained from invitation-related actions. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Mapping

**Slug:** `AFFINDA_DELETE_MAPPING`

Tool to delete a specific mapping by its identifier. Use when you need to remove an unused or incorrect mapping from the database. Note: This endpoint is deprecated.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the mapping to delete. This is typically an 8-character alphanumeric string (e.g., 'QKpOMDll', 'mEFayXdO'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Organization

**Slug:** `AFFINDA_DELETE_ORGANIZATION`

Permanently deletes an organization from Affinda. This action is destructive and cannot be undone. All workspaces, collections, and documents associated with the organization will also be deleted. Use the get_organizations action first to confirm the organization identifier before deletion.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier (8-character alphanumeric string) of the organization to delete. Can be obtained from the get_organizations or create_organization actions. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Resthook Subscription

**Slug:** `AFFINDA_DELETE_RESTHOOK_SUBSCRIPTION`

Tool to delete a specific resthook subscription by ID. Use after confirming the subscription identifier when the webhook is no longer needed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | integer | Yes | The unique identifier of the resthook subscription to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Tag

**Slug:** `AFFINDA_DELETE_TAG`

Permanently delete a tag from Affinda by its ID. This is a destructive operation that cannot be undone. Use Get Tags first to verify the tag ID before deletion.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | The unique identifier of the tag to delete. Get this ID from the 'id' field in Get Tags or Create Tag responses. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Validation Results

**Slug:** `AFFINDA_DELETE_VALIDATION_RESULTS`

Delete multiple validation results in a single API call. Use this action to efficiently remove multiple validation results at once rather than making individual delete requests for each validation result. Prerequisites: - Obtain validation result IDs using the 'Get All Validation Results' action Common use cases: - Removing obsolete validation results in bulk - Cleaning up validation results after reprocessing documents - Deleting validation results for specific documents programmatically

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ids` | array | Yes | List of validation result IDs to delete. Each ID must be a positive integer representing an existing validation result. Obtain validation result IDs from the 'Get All Validation Results' action. Must contain at least one ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Workspace

**Slug:** `AFFINDA_DELETE_WORKSPACE`

Tool to delete a specific workspace by its ID. Use when you need to remove an unused workspace after confirming the workspace ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `workspace_id` | string | Yes | The unique identifier (8-character alphanumeric string) of the workspace to delete. This can be obtained from the 'identifier' field when listing or creating workspaces. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Workspace Membership

**Slug:** `AFFINDA_DELETE_WORKSPACE_MEMBERSHIP`

Tool to remove a user from a workspace by membership ID. Use after confirming the workspace membership ID to revoke access.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the workspace membership to delete. Obtain this from the 'Get Workspace Memberships' action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get All API Users

**Slug:** `AFFINDA_GET_ALL_API_USERS`

Tool to retrieve a list of all API users. Use when you need to list API users, optionally filtered by organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | No | Filter by organization identifier. If provided, returns only API users belonging to the specified organization. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get All Document Splitters

**Slug:** `AFFINDA_GET_ALL_DOCUMENT_SPLITTERS`

Tool to get a list of all document splitters. Use when you need to retrieve document splitters, optionally filtered by organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | The numbers of results to return. |
| `offset` | integer | No | The number of documents to skip before starting to collect the result set. |
| `organization` | string | No | Filter by organization. |
| `includePublic` | boolean | No | Allows you to include public splitters in the response when you're filtering by organization. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get All Invitations

**Slug:** `AFFINDA_GET_ALL_INVITATIONS`

Tool to retrieve all invitations you created or sent to you. Use when you need to list organization invitations with optional filtering by status, role, or organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `role` | string ("admin" | "member") | No | Role assigned to the invitee. |
| `limit` | integer | No | The numbers of results to return. |
| `offset` | integer | No | The number of documents to skip before starting to collect the result set. |
| `status` | string ("pending" | "accepted" | "declined") | No | Status of an invitation. |
| `organization` | string | No | Filter by organization. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Organization Memberships

**Slug:** `AFFINDA_GET_ALL_ORGANIZATION_MEMBERSHIPS`

Retrieve all organization memberships across the account. Returns paginated results showing which users belong to which organizations. Use to audit organization access or find specific user memberships.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `role` | string ("admin" | "member") | No | Role of a user in an organization. |
| `limit` | integer | No | The numbers of results to return. |
| `offset` | integer | No | The number of documents to skip before starting to collect the result set. |
| `organization` | string | No | Filter by organization identifier. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Tags

**Slug:** `AFFINDA_GET_ALL_TAGS`

Tool to list all tags. Use after confirming authentication to fetch tags across workspaces.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Filter tags by name (partial match). |
| `limit` | integer | No | Maximum number of tags to return per page. |
| `offset` | integer | No | Zero-based index of the first tag to return. |
| `workspace` | string | No | Filter tags by a specific workspace identifier. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get All Validation Results

**Slug:** `AFFINDA_GET_ALL_VALIDATION_RESULTS`

Tool to list validation results for documents. Use after processing documents to inspect validation outcomes.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document` | string | Yes | Identifier of the document to retrieve validation results for. This is the document's unique identifier returned when creating or listing documents. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Workspace Memberships

**Slug:** `AFFINDA_GET_ALL_WORKSPACE_MEMBERSHIPS`

Retrieve all workspace memberships across the account. Returns paginated results showing which users belong to which workspaces. Use to audit workspace access or find specific user memberships.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | string | No | Partial, case-insensitive match on user's email or username. |
| `limit` | integer | No | Maximum number of items to return. |
| `offset` | integer | No | Number of items to skip before starting to collect the result set (pagination offset). |
| `workspace` | string | No | Filter results by a specific workspace identifier (8-character alphanumeric string). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Annotations

**Slug:** `AFFINDA_GET_ANNOTATIONS`

Retrieves all annotations for a specific document. Annotations are extracted data fields (text, dates, numbers, tables, etc.) from parsed documents. Use this after a document has been processed to access the extracted data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document` | string | Yes | Unique identifier of the document to retrieve annotations for. This is required. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Collection

**Slug:** `AFFINDA_GET_COLLECTION`

Tool to retrieve details of a specific collection by its ID. Use when you need full metadata about a collection after confirming its identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `collection_id` | string | Yes | The unique identifier (8-character alphanumeric string) of the collection to retrieve. Get this from the 'get_collections' action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Collection Data Field

**Slug:** `AFFINDA_GET_COLLECTION_FIELDS`

Tool to retrieve data field configuration for a collection associated with a data point. Use when you need to understand the structure and validation rules of a specific field in a collection. Note: This endpoint is deprecated.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the collection. This is an 8-character alphanumeric string that identifies the collection containing the data field. |
| `datapoint_identifier` | string | Yes | The unique identifier of the datapoint/field. This is an 8-character alphanumeric string that identifies the specific data point field within the collection. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Collections

**Slug:** `AFFINDA_GET_COLLECTIONS`

Tool to retrieve a list of all collections. Use when you need to list collections in your Affinda workspace after authentication.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum number of items to return. |
| `offset` | integer | No | Number of items to skip before starting the result set (pagination offset). |
| `workspace` | string | Yes | Identifier of the workspace to retrieve collections from. Obtain workspace identifiers using the Get Workspaces action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Collection Usage

**Slug:** `AFFINDA_GET_COLLECTION_USAGE`

Retrieves monthly credits consumption statistics for a specific collection. Returns a list of usage records showing how many credits were consumed each month. Use this to track collection activity, monitor consumption trends, or generate usage reports. Note: This endpoint is deprecated.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end` | string | No | End date of the period to retrieve (inclusive) in YYYY-MM format. If omitted, returns data up to the current month. |
| `start` | string | No | Start date of the period to retrieve (inclusive) in YYYY-MM format. If omitted, returns data from the earliest available month. |
| `identifier` | string | Yes | Unique identifier of the collection to retrieve usage for. Obtain this from the Get Collections action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Data Point

**Slug:** `AFFINDA_GET_DATA_POINT`

Tool to retrieve details of a specific data point by its identifier. Use when you need to inspect a data point's configuration, type, or structure. Data points represent individual fields that can be extracted from documents (e.g., 'name', 'email', 'date'). This endpoint is deprecated but still functional for retrieving data point metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the data point to retrieve. This is an 8-character alphanumeric string. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Data Point Choice

**Slug:** `AFFINDA_GET_DATA_POINT_CHOICE`

Tool to return a specific data point choice by its ID. Use when you need details about a particular data point choice option. Note: This endpoint is deprecated but still functional.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | Data point choice's ID |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Data Source

**Slug:** `AFFINDA_GET_DATA_SOURCE`

Tool to retrieve details of a specific mapping data source by its identifier. Use when you need to fetch mapping data source metadata and schema configuration.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the mapping data source to retrieve. This is an 8-character alphanumeric string. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Data Source Value

**Slug:** `AFFINDA_GET_DATA_SOURCE_VALUE`

Tool to retrieve a specific value from a mapping data source. Use when you need to get details about a particular value in a data source.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `value` | string | Yes | The specific data source value to retrieve from the mapping data source. |
| `identifier` | string | Yes | Unique identifier of the mapping data source to retrieve the value from. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Data Source Values

**Slug:** `AFFINDA_GET_DATA_SOURCE_VALUES`

Tool to retrieve all values from a mapping data source. Use when you need to list or search values in a specific data source after authentication.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum number of values to return (pagination limit). |
| `offset` | integer | No | Number of values to skip before starting to collect the result set (pagination offset). |
| `search` | string | No | Search string to filter values. Performs partial, case-insensitive matching. |
| `document` | string | No | Identifier of the document to apply filter lookups on, if available. |
| `annotation` | integer | No | Filter values based on a specific annotation ID. |
| `identifier` | string | Yes | Unique identifier of the mapping data source to retrieve values from. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Document

**Slug:** `AFFINDA_GET_DOCUMENT`

Retrieve full details and parsed data for a specific document by its identifier. Use this tool to get comprehensive information about a document including: - Processing status (ready/failed) - Document metadata (file name, page count, language) - Parsed/extracted data results - URLs for PDF, original file, and review page - Collection and workspace information The document identifier can be either a system-generated ID or a custom identifier set during document upload.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the document to retrieve. Can be a system-generated ID (e.g., 'abc123XY') or a custom identifier set during upload. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Document Redacted

**Slug:** `AFFINDA_GET_DOCUMENT_REDACTED`

Tool to retrieve the redacted version of a document as a PDF file. Use when you need to get a document with sensitive information removed. The original document is not modified by this operation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the document to retrieve in redacted form. Must match an existing document ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Documents

**Slug:** `AFFINDA_GET_DOCUMENTS`

Tool to retrieve a list of all documents. Use when you need to list documents in your Affinda workspace after authentication.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `count` | boolean | No | If false, skip computing document count for faster response on large collections. Default is true. |
| `limit` | integer | No | Maximum number of documents to return (1-100). |
| `ready` | boolean | No | Filter by ready status. True for documents that have finished processing. |
| `state` | string | No | Filter by document state. Options: uploaded, review, validated, archived, rejected. |
| `failed` | boolean | No | Filter by failed processing status. True for failed documents only. |
| `offset` | integer | No | Number of items to skip before starting to collect the result set (pagination). |
| `search` | string | No | Partial, case-insensitive match with file name or tag name. |
| `compact` | boolean | No | If true, compact response to annotations' parsed data only. Default is false. |
| `ordering` | string | No | Sort the result set. Use '-' prefix for DESC order. Options: file_name, extractor, created_dt, validated_dt, archived_dt. |
| `workspace` | string | No | Identifier of the workspace to filter documents by. Recommended for performance. |
| `collection` | string | No | Identifier of the collection to filter documents by. |
| `include_data` | boolean | No | If true, include parsed data summary in the response. Default is false. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Document Splitter

**Slug:** `AFFINDA_GET_DOCUMENT_SPLITTER`

Tool to retrieve details of a specific document splitter by its identifier. Use when you need to fetch metadata about a document splitter configuration.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | Document splitter's unique identifier (8-character alphanumeric string). Use this to specify which document splitter to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Document Type

**Slug:** `AFFINDA_GET_DOCUMENT_TYPE`

Tool to retrieve details of a specific document type by its ID. Use when you need to confirm the configuration or metadata of a document type before processing documents.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the document type. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Document Type JSON Schema

**Slug:** `AFFINDA_GET_DOCUMENT_TYPE_JSON_SCHEMA`

Tool to generate a JSON schema from a document type by its identifier. Use when you need the structured schema definition for a document type to understand its field structure and validation rules.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `title` | string | No | Optional title for the JSON schema. |
| `identifier` | string | Yes | The unique identifier of the document type. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Document Type Pydantic Models

**Slug:** `AFFINDA_GET_DOCUMENT_TYPE_PYDANTIC_MODELS`

Tool to generate Pydantic model code from a document type's schema. Use when you need type-safe Python models for parsing documents of a specific type.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the document type to generate Pydantic models for. |
| `model_name` | string | No | Optional custom name for the generated Pydantic model. If not provided, a default name will be used. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Document Types

**Slug:** `AFFINDA_GET_DOCUMENT_TYPES`

Retrieve all document types accessible to the authenticated user. Returns a list containing each document type's identifier, name, description, ingest email, and organization. Use this to discover available document types before uploading or processing documents.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Extractor

**Slug:** `AFFINDA_GET_EXTRACTOR`

Tool to retrieve detailed information about a specific extractor by its identifier. Use when you need complete metadata about an extractor's configuration, fields, and capabilities.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | Unique identifier of the extractor to retrieve. Common identifiers include 'resume', 'invoice', 'job-description', etc. Get available identifiers from the Get Extractors action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Extractors

**Slug:** `AFFINDA_GET_EXTRACTORS`

Retrieve all extractors available for an organization. Extractors are document parsing configurations that define what data to extract from documents. This includes both Affinda's built-in extractors (resumes, invoices, etc.) and any custom extractors created for the organization. Use this action to: - List available extractors before creating a collection - Find the identifier of a specific extractor type - Check if custom extractors exist for the organization

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `organization` | string | Yes | The unique identifier of the organization to retrieve extractors for. Obtain this from the Get Organizations action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Index Documents

**Slug:** `AFFINDA_GET_INDEX_DOCUMENTS`

Tool to retrieve all indexed documents for a specific index. Use when you need to list documents in a search index after creating or accessing an index.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The name of the index to retrieve documents from. This identifies the specific search index. |
| `limit` | integer | No | The maximum number of results to return per page. |
| `offset` | integer | No | The number of documents to skip before starting to collect the result set (pagination offset). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Invitation

**Slug:** `AFFINDA_GET_INVITATION`

Tool to retrieve details of a specific organization invitation by its identifier. Use when you need to check invitation status or get invitation metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the invitation to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Job Description Search Config

**Slug:** `AFFINDA_GET_JOB_DESCRIPTION_SEARCH_CONFIG`

Tool to get the configuration for the logged in user's embeddable job description search tool. Returns display settings, field weights, and maximum results limits.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Mapping

**Slug:** `AFFINDA_GET_MAPPING`

Tool to retrieve a specific mapping by its identifier. Use when you need to fetch mapping configuration details for a lookup against a MappingDataSource.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the mapping to retrieve. This is an 8-character alphanumeric string (e.g., 'mEFayXdO'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Organization

**Slug:** `AFFINDA_GET_ORGANIZATION`

Tool to retrieve details of a specific organization by its ID. Use when you need to fetch an organization's metadata after confirming its identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique string identifier of the organization to retrieve. This is an 8-character alphanumeric string (e.g., 'EEWNFHDg'). Use the Get Organizations action to list available organization identifiers. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Organization Membership

**Slug:** `AFFINDA_GET_ORGANIZATION_MEMBERSHIP`

Tool to retrieve details of a specific organization membership by its ID. Use when you need to confirm a user's role and details within an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique alphanumeric identifier of the organization membership to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Organizations

**Slug:** `AFFINDA_GET_ORGANIZATIONS`

Retrieves all organizations accessible to the authenticated user. Returns a list of organizations with details including identifier, name, user role, trial status, and configuration settings. Use the 'identifier' field from the response when calling other organization-related endpoints.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Resthook Subscription

**Slug:** `AFFINDA_GET_RESTHOOK_SUBSCRIPTION`

Tool to retrieve details of a specific resthook subscription by its ID. Use after confirming its creation to verify its settings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | integer | Yes | The unique identifier of the resthook subscription to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get RESTHook Subscriptions

**Slug:** `AFFINDA_GET_RESTHOOK_SUBSCRIPTIONS`

Tool to retrieve a list of all RESTHook subscriptions. Use after authenticating to list all webhook subscriptions associated with your account.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum number of items to return per page. Defaults to all if not specified. |
| `offset` | integer | No | Number of items to skip before starting the result set (for pagination). Defaults to 0. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Tag

**Slug:** `AFFINDA_GET_TAG`

Tool to retrieve details of a specific tag by its ID. Use when you need to fetch information about a particular tag.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag_id` | integer | Yes | Unique identifier of the tag to retrieve. Must be a positive integer. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Usage by Workspace

**Slug:** `AFFINDA_GET_USAGE_BY_WORKSPACE`

Retrieves monthly document processing usage statistics for a specific workspace. Returns a list of usage records showing how many documents were processed each month. Use this to track workspace activity, monitor consumption trends, or generate usage reports.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end` | string | No | End month for filtering usage data (inclusive) in YYYY-MM format. If omitted, returns data up to the current month. |
| `start` | string | No | Start month for filtering usage data (inclusive) in YYYY-MM format. If omitted, returns data from the earliest available month. |
| `workspace_id` | string | Yes | Unique identifier of the workspace to retrieve usage for. Obtain this from the Get Workspaces action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Workspace

**Slug:** `AFFINDA_GET_WORKSPACE`

Tool to retrieve details of a specific workspace by its ID. Use when you need full workspace metadata after confirming its identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique identifier of the workspace to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Workspace Membership

**Slug:** `AFFINDA_GET_WORKSPACE_MEMBERSHIP`

Tool to retrieve details of a specific workspace membership by its ID. Use when you need to confirm a user's role and details within a workspace after obtaining the membership identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `identifier` | string | Yes | The unique 8-character alphanumeric identifier of the workspace membership to retrieve. Obtain this from the 'Get Workspace Memberships' action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Workspaces

**Slug:** `AFFINDA_GET_WORKSPACES`

Tool to retrieve a list of all workspaces. Use when you need to list workspaces filtered by organization and optional name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Optional filter to search workspaces by name (case-insensitive partial match). |
| `organization` | string | Yes | The unique identifier of the organization to filter workspaces by. Get this from GET_ORGANIZATIONS action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Data Point Choices

**Slug:** `AFFINDA_LIST_DATA_POINT_CHOICES`

Tool to retrieve available choices for a specific enum data point. Use when you need to discover valid options for dropdown/enum fields in a collection's data schema. Note: This endpoint is deprecated but still functional for accessing data point choice metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum number of choices to return per page. |
| `offset` | integer | No | Number of items to skip before starting to collect the result set (pagination offset). |
| `search` | string | No | Filter choices by searching for a substring match in labels or values. |
| `collection` | string | Yes | Identifier of the collection to get choices for. Data point choices are collection-specific. |
| `data_point` | string | Yes | Identifier of the data point to get choices for. This specifies which field's enum values to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Data Points

**Slug:** `AFFINDA_LIST_DATA_POINTS`

Tool to retrieve all data points. Returns both custom data points and Affinda's off-the-shelf data points. Use when you need to list available data points for extractors.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `slug` | string | No | Filter by slug. A camelCase string that is used as the key in API responses. |
| `limit` | integer | No | The numbers of results to return. |
| `offset` | integer | No | The number of documents to skip before starting to collect the result set (pagination offset). |
| `extractor` | string | No | Filter by extractor identifier (e.g., 'resume', 'invoice'). |
| `identifier` | array | No | Filter by specific data point identifiers. Provide a list of identifier strings. |
| `description` | string | No | Filter by description text. |
| `organization` | string | No | Filter by organization identifier. Use to retrieve data points for a specific organization. |
| `include_public` | boolean | No | Allows you to include public data points in the response when you're filtering by organization. |
| `annotation_content_type` | string | No | Filter by annotation content type (e.g., 'text', 'integer', 'float', 'date', 'boolean'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Data Sources

**Slug:** `AFFINDA_LIST_DATA_SOURCES`

Tool to retrieve the list of all custom mapping data sources. Use when you need to list or search for mapping data sources in your Affinda workspace.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Filter data sources by name. |
| `limit` | integer | No | Maximum number of results to return. |
| `offset` | integer | No | Number of documents to skip before starting to collect the result set (pagination offset). |
| `workspace` | string | No | Filter data sources by workspace identifier. |
| `identifier` | string | No | Filter data sources by identifier. |
| `organization` | string | No | Filter data sources by organization identifier. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Indexes

**Slug:** `AFFINDA_LIST_INDEXES`

Tool to retrieve a list of all search indexes. Use when you need to view available indexes for searching and matching documents in Affinda.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Filter indices by name. |
| `limit` | integer | No | The number of results to return. |
| `offset` | integer | No | The number of documents to skip before starting to collect the result set. |
| `document_type` | string ("resumes" | "job_descriptions") | No | Document types for index filtering. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Mappings

**Slug:** `AFFINDA_LIST_MAPPINGS`

Tool to retrieve the list of all custom data mappings. Use when you need to list mappings for a specific data source.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | The numbers of results to return. |
| `offset` | integer | No | The number of documents to skip before starting to collect the result set. |
| `mappingDataSource` | string | Yes | Data source's identifier. Required to filter mappings by data source. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Occupation Groups

**Slug:** `AFFINDA_LIST_OCCUPATION_GROUPS`

Tool to retrieve the list of searchable occupation groups. Use when you need to get available occupation categories for job matching or classification.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Resume Search Config

**Slug:** `AFFINDA_LIST_RESUME_SEARCH_CONFIG`

Tool to get the configuration for the logged in user's embeddable resume search tool. Use this to retrieve display field settings, search weights, maximum results, and theme customization options for the resume search interface.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Resume Search Job Title Suggestions

**Slug:** `AFFINDA_LIST_RESUME_SEARCH_JOB_TITLE_SUGGESTIONS`

Tool to get job title suggestions based on provided job title(s). Use when you need to find related job titles for resume search.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `job_titles` | array | Yes | One or more job titles to query suggestions for. Provide at least one job title to get related suggestions. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Resume Search Skill Suggestions

**Slug:** `AFFINDA_LIST_RESUME_SEARCH_SKILL_SUGGESTIONS`

Tool to get skill suggestions based on provided skills. Use when you need to find related skills to expand or refine resume search queries.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skills` | array | Yes | List of skills to query suggestions for. Provide one or more skills to get related skill recommendations that can help refine your resume search queries. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Remove Tag from Documents

**Slug:** `AFFINDA_REMOVE_TAG_FROM_DOCUMENTS`

Remove a tag from multiple documents in a single batch operation. Use this action to efficiently untag many documents at once rather than making individual remove requests. The operation is idempotent - removing a tag that isn't present on a document will not cause an error.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | integer | Yes | The unique identifier (ID) of the tag to remove from the specified documents. Get this ID from the 'id' field in Get Tags or Create Tag responses. |
| `identifiers` | array | Yes | List of document identifiers (UUIDs) to remove the tag from. Obtain document identifiers from Get Documents or Create Document responses. Maximum recommended batch size is 100 documents per request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Replace Data Point Choices

**Slug:** `AFFINDA_REPLACE_DATA_POINT_CHOICES`

Tool to completely replace all choices for a data point. Use when you need to bulk update enum options - existing choices are matched by value, new values are created, updated values are modified, and values not in the incoming list are deleted. Note: This is a deprecated endpoint but still functional. Either collection or organization must be specified to scope the replacement.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `choices` | array | Yes | List of choices to set for this data point. Existing choices are matched by their 'value' field - matching values will be updated, new values will be created, and values not in this list will be deleted. This is a complete replacement operation. |
| `dataPoint` | string | Yes | Identifier of the data point whose choices will be replaced. This specifies which enum field's options to update. |
| `collection` | string | No | Identifier of the collection to scope this replacement to. Either collection or organization must be provided. |
| `organization` | string | No | Identifier of the organization to scope this replacement to. Either collection or organization must be provided. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Replace Data Source Values

**Slug:** `AFFINDA_REPLACE_DATA_SOURCE_VALUES`

Tool to completely replace all values in a mapping data source. Use when you need to bulk update or refresh an entire data source's value list. Note: For large data sources (>1000 values), new values may take a few minutes to become searchable after the operation completes.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `values` | array | Yes | Complete list of values to set for this data source. This replaces ALL existing values - any values not in this list will be removed. For large data sources (>1000 values), it may take a few minutes after the request completes for new values to be searchable. |
| `identifier` | string | Yes | Unique identifier of the mapping data source whose values will be completely replaced. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Split Document Pages

**Slug:** `AFFINDA_SPLIT_DOCUMENT_PAGES`

Split a document into multiple documents by dividing its pages. Use when you need to separate a multi-page document into distinct documents based on page groupings. Prerequisites: - Obtain the document identifier from create_document or get_document actions - Use get_document to retrieve page IDs for the pages you want to split Important notes: - Each page can only be assigned to one split - All pages should be accounted for across all splits - One split can optionally use the original document identifier to maintain the root document

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `splits` | array | Yes | Array of split specifications. Each split defines which pages should be grouped into a new document. All pages must be accounted for across splits. |
| `identifier` | string | Yes | Document's identifier to split. Obtain this from the create_document or get_document actions. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Annotation

**Slug:** `AFFINDA_UPDATE_ANNOTATION`

Tool to update data of a single annotation in Affinda. Use when you need to correct extracted values, verify annotations, or modify annotation metadata after document processing. Prerequisites: - Obtain the annotation ID using the 'Get Annotations' action with a document filter - Annotations must exist in documents that have been processed by Affinda Common use cases: - Correcting OCR or extraction errors in individual fields - Marking annotations as verified after manual review (set isClientVerified=true) - Updating parsed values to fix incorrect data extraction - Modifying annotation coordinates or page references Note: For bulk updates across multiple annotations, use the 'Batch Update Annotations' action instead for better efficiency.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | Unique identifier of the annotation to update. Obtain annotation IDs from the 'Get Annotations' action by filtering on a specific document. |
| `raw` | string | No | Raw text extracted from the document before any post-processing. This is the original OCR or text extraction result. |
| `field` | string | No | Field identifier to categorize this annotation. Can be null if not associated with a specific field. |
| `parent` | integer | No | The parent annotation's ID if this annotation is nested or hierarchical. Set to null if this is a top-level annotation. |
| `parsed` | string | No | The parsed/processed value for the annotation. This is the extracted or corrected data value after processing. Type varies based on the annotation's content type (string, integer, number, boolean, object, or array). |
| `document` | string | No | Unique identifier (UUID) for the document this annotation belongs to. |
| `dataPoint` | string | No | Data point identifier to update. This links the annotation to a specific field in the document schema. |
| `pageIndex` | integer | No | The page number within the document where this annotation appears, starting from 0. |
| `rectangles` | array | No | Array of x/y coordinate rectangles containing the annotation data on the document. An annotation can span multiple rectangles (e.g., text wrapping across lines). |
| `isClientVerified` | boolean | No | Set to true to mark the annotation as verified by a human. Use this after manual review to confirm the extracted data is correct. |
| `validationResults` | array | No | The validation results created, changed or deleted as a result of updating the annotation. Typically managed by the system automatically. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Collection

**Slug:** `AFFINDA_UPDATE_COLLECTION`

Tool to update specific fields of a collection. Use when you need to rename or reassign a collection after creation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | New name for the collection. |
| `identifier` | string | Yes | Unique identifier of the collection to update (e.g., 'parntEfc'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Data Field For Collection

**Slug:** `AFFINDA_UPDATE_DATA_FIELD_FOR_COLLECTION`

Tool to update a data field configuration for a collection's data point. Use when you need to modify field properties such as label, type, mandatory status, or validation settings after the field has been created.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `label` | string | No | The display label for this data field. Use this to change how the field appears in the UI. |
| `mapping` | string | No | Defines how the data point is mapped to the data source. Specifies the field mapping path or transformation logic. |
| `fieldType` | string ("text" | "integer" | "float" | "decimal" | "date" | "datetime" | "daterange" | "boolean" | "enum" | "location" | "phonenumber" | "json" | "table" | "expectedremuneration" | "jobtitle" | "language" | "skill" | "yearsexperience" | "group" | "table_deprecated" | "url" | "image" | "docclf") | No | Field types for data point annotations. |
| `mandatory` | boolean | No | Whether this field is required. If true, documents must have a value for this field to be considered complete. |
| `dataSource` | string | No | Data source mapping identifier. Links this field to an external data source for validation or enrichment. |
| `identifier` | string | Yes | Collection's identifier (e.g., 'mEFayXdO'). This is the unique identifier for the collection containing the data field. |
| `showDropdown` | boolean | No | If true, displays a dropdown selector for this field in the validation UI. Useful for fields with predefined value sets. |
| `displayRawText` | string | No | Defines how the data point is mapped to the data source for display purposes. Controls what text is shown in the validation UI. |
| `displayEnumValue` | boolean | No | If true, both the value and the label for enums will appear in the dropdown in the validation tool. Only applicable when fieldType is 'enum'. |
| `datapoint_identifier` | string | Yes | Datapoint's identifier (e.g., 'XprEvgai'). This is the unique identifier for the specific data point/field within the collection. |
| `autoValidationThreshold` | number | No | Threshold for automatic validation (between 0.0 and 1.0). If null, uses the collection's default autoValidationThreshold. Higher values require more confidence before auto-validating. |
| `enableAutoValidationThreshold` | boolean | No | If true, enables auto validation using the threshold from this field (if specified) or from the collection. When enabled, documents with confidence above threshold are automatically validated. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Data Point

**Slug:** `AFFINDA_UPDATE_DATA_POINT`

Tool to update data of a data point by its identifier. Use when you need to modify a data point's name, description, slug, parent, or mapping data source. Note: This endpoint is deprecated but still functional.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Name of the data point. |
| `slug` | string | No | A camelCase string that will be used as the key in the API response. |
| `parent` | string | No | The identifier of the parent data point if applicable. |
| `identifier` | string | Yes | The unique identifier of the data point to update. This is an 8-character alphanumeric string. |
| `description` | string | No | Description of the data point. |
| `mappingDataSource` | string | No | If populated, the model will learn to predict this field using the data source, rather than relying on fuzzy string matching. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Data Point Choice

**Slug:** `AFFINDA_UPDATE_DATA_POINT_CHOICE`

Tool to update data of a data point choice by its ID. Use when you need to modify label, value, description, synonyms, or associated collection/organization for an existing data point choice. Note: This endpoint is deprecated but still functional.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | Data point choice's ID |
| `label` | string | No | Label of the data point choice |
| `value` | string | No | Value of the data point choice |
| `synonyms` | array | No | List of synonyms for the data point choice |
| `dataPoint` | string | No | Uniquely identify a data point |
| `collection` | string | No | Uniquely identify a collection |
| `description` | string | No | Description of the data point choice |
| `organization` | string | No | Uniquely identify an organization |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Data Source Value

**Slug:** `AFFINDA_UPDATE_DATA_SOURCE_VALUE`

Tool to update an existing value in a mapping data source. Use when you need to modify the label or description of an existing data source value. The value identifier itself cannot be changed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `label` | string | No | Optional updated human-readable label for the value. Provides a display name for the value in the UI. |
| `value` | string | Yes | The value identifier to update. This must match an existing value in the data source. |
| `identifier` | string | Yes | Unique identifier of the mapping data source containing the value to update. Obtain this from the list_data_sources action. |
| `description` | string | No | Optional updated description providing additional context or details about the value. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Document

**Slug:** `AFFINDA_UPDATE_DOCUMENT`

Tool to update specific fields of a document. Use when you need to rename, reassign, or adjust expiry and storage settings after document creation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fileName` | string | No | New file name for the document. |
| `language` | string | No | ISO 639-1 language code (e.g., 'en', 'fr', 'zh-cn'). |
| `workspace` | string | No | Identifier of the workspace to move the document to. |
| `collection` | string | No | Identifier of the collection to move the document to. |
| `expiryTime` | string | No | Expiry time in ISO 8601 format when the document will be automatically deleted. |
| `identifier` | string | Yes | The unique identifier of the document to update. |
| `regionBias` | object | No | Geographic bias parameters to influence geocoding or location-based parsing. |
| `customIdentifier` | string | No | Custom identifier for your own reference. |
| `deleteAfterParse` | boolean | No | If true, no data will be stored after parsing. Only valid with synchronous parsing. |
| `enableValidationTool` | boolean | No | If false, validation UI is disabled to speed up parsing. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Document Data

**Slug:** `AFFINDA_UPDATE_DOCUMENT_DATA`

Update parsed data for a resume or job description document in Affinda. This endpoint is ONLY applicable for documents that have been processed with 'resume' or 'job-description' extractors. For other document types, use the batch_update_annotations endpoint instead. Use this tool when you need to correct or add parsed fields to an existing resume or job description document after it has been uploaded and processed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Structured resume/job data fields to update. Only include fields you wish to change. For resumes, common fields include: name, emails, phoneNumbers, skills, education, workExperience, etc. |
| `identifier` | string | Yes | The unique identifier of the resume or job description document to update. This endpoint only works for documents in collections with 'resume' or 'job-description' extractors. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Document Type

**Slug:** `AFFINDA_UPDATE_DOCUMENT_TYPE`

Tool to update a document type by its identifier. Use when you need to modify the name or description of an existing document type.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The new name of the document type. |
| `identifier` | string | Yes | The unique identifier of the document type to update. Get this ID from the 'identifier' field in Get Document Types or Get Document Type responses. |
| `description` | string | No | A new description of the document type. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Extractor

**Slug:** `AFFINDA_UPDATE_EXTRACTOR`

Tool to update specific fields of an extractor. Use when you need to modify an extractor's name, category, validation settings, or field groups after creation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | New name for the extractor. |
| `category` | string | No | Category of the extractor (e.g., 'Recruitment', 'Finance'). |
| `identifier` | string | Yes | Unique identifier of the extractor to update. Common identifiers include 'resume', 'invoice', 'job-description', etc. |
| `namePlural` | string | No | New plural form of the extractor name. |
| `fieldGroups` | array | No | List of field groups for the extractor. Each group should have a 'label' and 'fields' array. |
| `validatable` | boolean | No | Whether documents using this extractor can be validated. |
| `baseExtractor` | string | No | Identifier of the base extractor to derive from. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Index

**Slug:** `AFFINDA_UPDATE_INDEX`

Tool to update the name of an existing search index. Use when you need to rename an index after creation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The current unique name of the index to update. This is the path parameter identifying which index to modify. |
| `new_name` | string | No | New unique name for the index. If provided, the index will be renamed. If not provided, no changes will be made. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Invitation

**Slug:** `AFFINDA_UPDATE_INVITATION`

Tool to update an organization invitation's role. Use when you need to change the role assigned to an invitation before it is accepted.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `role` | string ("admin" | "member") | No | Role types for organization invitations. |
| `identifier` | string | Yes | The unique identifier of the invitation to update. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Job Description Search Config

**Slug:** `AFFINDA_UPDATE_JOB_DESCRIPTION_SEARCH_CONFIG`

Tool to update the configuration for the logged in user's embeddable job description search tool. Use to configure display fields, field weights, maximum results, and UI customization options.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `userId` | integer | No | ID of the logged in user. |
| `actions` | array | No | A list of actions to show in the dropdown in the embedded search tool. |
| `indices` | array | No | List of index names. |
| `username` | string | No | Username of the logged in user. |
| `maxResults` | integer | No | Maximum number of results that can be returned. Setting to null means no limitation. |
| `hideToolbar` | boolean | No | Hide the reset/import toolbar. |
| `distanceUnit` | string ("mi" | "km") | No | Unit of distance for location-based searches. |
| `weightSkills` | number | No | Weight for skills in search. |
| `displaySkills` | boolean | No | Whether to display skills field. |
| `hideSidePanel` | boolean | No | Hide the entire side panel. |
| `weightJobTitle` | number | No | Weight for job title in search. |
| `weightKeywords` | number | No | Weight for keywords in search. |
| `weightLocation` | number | No | Weight for location in search. |
| `displayJobTitle` | boolean | No | Whether to display job title field. |
| `displayKeywords` | boolean | No | Whether to display keywords field. |
| `displayLocation` | boolean | No | Whether to display location field. |
| `searchToolTheme` | object | No | Theme configuration for the embedded search tool. |
| `weightEducation` | number | No | Weight for education in search. |
| `weightLanguages` | number | No | Weight for languages in search. |
| `allowPdfDownload` | boolean | No | Whether PDF downloads are allowed. |
| `displayEducation` | boolean | No | Whether to display education field. |
| `displayLanguages` | boolean | No | Whether to display languages field. |
| `showIndexDropdown` | boolean | No | Controls whether or not the index dropdown is displayed to the user. |
| `customFieldsConfig` | array | No | Configuration for custom fields with their weights. |
| `weightManagementLevel` | number | No | Weight for management level in search. |
| `weightOccupationGroup` | number | No | Weight for occupation group in search. |
| `weightYearsExperience` | number | No | Weight for years experience in search. |
| `displayManagementLevel` | boolean | No | Whether to display management level field. |
| `displayOccupationGroup` | boolean | No | Whether to display occupation group field. |
| `displayYearsExperience` | boolean | No | Whether to display years experience field. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Mapping

**Slug:** `AFFINDA_UPDATE_MAPPING`

Tool to update a specific mapping's settings. Use when you need to adjust score cutoff or ordering for a lookup against a MappingDataSource.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `orderBy` | string | No | The field to order the results by. Leave blank for ordering by relevance. |
| `identifier` | string | Yes | Unique identifier of the mapping to update (e.g., 'mEFayXdO'). |
| `scoreCutoff` | number | No | Higher values will result in more strict matching. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Organization

**Slug:** `AFFINDA_UPDATE_ORGANIZATION`

Tool to update specific fields of an organization. Use when you need to modify an organization's name, avatar, or webhook and validation settings after creation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | New name for the organization. |
| `avatar` | string | No | Binary content of the new avatar image (e.g., PNG or JPEG). |
| `identifier` | string | Yes | Unique string identifier of the organization to update. Obtain this from the Get Organizations action. |
| `resthook_signature_key` | string | No | New key for signing resthook notifications. |
| `validation_tool_config` | object | No | New configuration settings for the organization's validation tool. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Organization Membership

**Slug:** `AFFINDA_UPDATE_ORGANIZATION_MEMBERSHIP`

Tool to update an organization membership's role. Use when you need to change a user's role within an organization.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `role` | string ("admin" | "member") | No | Role enum for organization membership. |
| `identifier` | string | Yes | The unique alphanumeric identifier of the organization membership to update. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update RESTHook Subscription

**Slug:** `AFFINDA_UPDATE_RESTHOOK_SUBSCRIPTION`

Tool to update an existing RESTHook subscription. Use after confirming the subscription identifier to modify its URL, event, or activation status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `event` | string | No | The event type to subscribe to. Valid events: 'document.parse.completed', 'document.parse.succeeded', 'document.parse.failed', 'document.validate.completed', 'document.classify.completed', 'document.classify.succeeded', 'document.classify.failed', 'document.rejected'. |
| `active` | boolean | No | Whether the subscription should be active |
| `targetUrl` | string | No | The new URL where webhook notifications will be sent |
| `identifier` | integer | Yes | The unique numeric ID of the resthook subscription to update. Obtain this from the 'Get RESTHook Subscriptions' or 'Create RESTHook Subscription' actions. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Resume Search Config

**Slug:** `AFFINDA_UPDATE_RESUME_SEARCH_CONFIG`

Tool to update the configuration for the logged in user's embeddable resume search tool. Use this to modify which fields are displayed, their search weights, maximum results limit, distance units, custom actions, and theme settings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `userId` | integer | No | ID of the logged in user. |
| `actions` | array | No | List of custom actions to display in a dropdown menu in the search tool. |
| `indices` | array | No | List of index names to search within. |
| `username` | string | No | Username of the logged in user. |
| `maxResults` | integer | No | Maximum number of results that can be returned. Set to null to remove limitation. |
| `hideToolbar` | boolean | No | Whether to hide the reset/import toolbar at the top. |
| `distanceUnit` | string ("mi" | "km") | No | Unit of distance for location-based searches. |
| `weightSkills` | number | No | Weight for skills matching in search ranking. Higher values increase importance. |
| `displaySkills` | boolean | No | Whether to display the skills search field. |
| `hideSidePanel` | boolean | No | Whether to hide the entire side panel in the search interface. |
| `weightJobTitle` | number | No | Weight for job title matching in search ranking. Higher values increase importance. |
| `weightKeywords` | number | No | Weight for keywords matching in search ranking. Higher values increase importance. |
| `weightLocation` | number | No | Weight for location matching in search ranking. Higher values increase importance. |
| `displayJobTitle` | boolean | No | Whether to display the job title search field. |
| `displayKeywords` | boolean | No | Whether to display the keywords search field. |
| `displayLocation` | boolean | No | Whether to display the location search field. |
| `searchToolTheme` | object | No | Theme customization for the embedded search tool. |
| `weightEducation` | number | No | Weight for education matching in search ranking. Higher values increase importance. |
| `weightLanguages` | number | No | Weight for languages matching in search ranking. Higher values increase importance. |
| `allowPdfDownload` | boolean | No | Whether to allow users to download resume PDFs from the search results. |
| `displayEducation` | boolean | No | Whether to display the education search field. |
| `displayLanguages` | boolean | No | Whether to display the languages search field. |
| `showIndexDropdown` | boolean | No | Controls whether the index selection dropdown is displayed to users. |
| `customFieldsConfig` | array | No | Configuration for custom fields with their respective weights in search. |
| `weightManagementLevel` | number | No | Weight for management level in search ranking. Higher values increase importance. |
| `weightOccupationGroup` | number | No | Weight for occupation group matching in search ranking. Higher values increase importance. |
| `weightYearsExperience` | number | No | Weight for years of experience in search ranking. Higher values increase importance. |
| `displayManagementLevel` | boolean | No | Whether to display the management level search field. |
| `displayOccupationGroup` | boolean | No | Whether to display the occupation group search field. |
| `displayYearsExperience` | boolean | No | Whether to display the years of experience search field. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Tag

**Slug:** `AFFINDA_UPDATE_TAG`

Tool to update data of a tag. Use when you need to modify a tag's name or reassign it to a different workspace. Only provide the fields you want to change; other fields will remain unchanged.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | integer | Yes | The unique identifier of the tag to update. Get this ID from the 'id' field in Get Tags or Create Tag responses. |
| `name` | string | No | The new name for the tag. Must be unique within the workspace if provided. |
| `workspace` | string | No | The unique identifier of the workspace to reassign this tag to. Obtain this from the Get Workspaces action. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Workspace

**Slug:** `AFFINDA_UPDATE_WORKSPACE`

Tool to update specific fields of a workspace. Use when you need to modify a workspace's name, visibility, document rejection policy, or other settings. Only provide the fields you want to change; other fields will remain unchanged.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The new name for the workspace. |
| `visibility` | string ("organization" | "private") | No | The visibility setting. Use 'organization' for access by all organization members, or 'private' for access only by explicitly added members. |
| `workspace_id` | string | Yes | The unique identifier (8-character string) of the workspace to update. |
| `documentTypes` | array | No | List of document type identifiers to associate with this workspace. |
| `documentSplitter` | string | No | Identifier of the document splitter configuration to use. |
| `rejectDuplicates` | boolean | No | If true, duplicate documents will be rejected. |
| `rejectInvalidDocuments` | boolean | No | If true, documents that don't match the workspace's document types will be rejected. |
| `whitelistIngestAddresses` | array | No | List of email addresses allowed to ingest documents via email. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
