> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# affinda-workspace

> Affinda Workspace - organizations, workspaces, data sources, tags, and webhooks

**Server path:** `/affinda-workspace` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                                                                            | Description                                         |
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| [`affinda_workspace_add_mapping_data_source_value`](#affinda_workspace_add_mapping_data_source_value)           | Add value for a data source                         |
| [`affinda_workspace_batch_add_tag`](#affinda_workspace_batch_add_tag)                                           | Add a tag to documents                              |
| [`affinda_workspace_batch_remove_tag`](#affinda_workspace_batch_remove_tag)                                     | Remove a tag from documents                         |
| [`affinda_workspace_create_invitation`](#affinda_workspace_create_invitation)                                   | Create a new invitation                             |
| [`affinda_workspace_create_mapping_data_source`](#affinda_workspace_create_mapping_data_source)                 | Create a data source                                |
| [`affinda_workspace_create_resthook_subscription`](#affinda_workspace_create_resthook_subscription)             | Create a resthook subscription                      |
| [`affinda_workspace_create_tag`](#affinda_workspace_create_tag)                                                 | Create a tag                                        |
| [`affinda_workspace_create_workspace`](#affinda_workspace_create_workspace)                                     | Create a workspace                                  |
| [`affinda_workspace_create_workspace_membership`](#affinda_workspace_create_workspace_membership)               | Create a workspace membership                       |
| [`affinda_workspace_delete_invitation`](#affinda_workspace_delete_invitation)                                   | Delete an invitation                                |
| [`affinda_workspace_delete_mapping_data_source`](#affinda_workspace_delete_mapping_data_source)                 | Delete specific data source                         |
| [`affinda_workspace_delete_mapping_data_source_value`](#affinda_workspace_delete_mapping_data_source_value)     | Delete specific data source value                   |
| [`affinda_workspace_delete_membership`](#affinda_workspace_delete_membership)                                   | Delete a workspace membership                       |
| [`affinda_workspace_delete_resthook_subscription`](#affinda_workspace_delete_resthook_subscription)             | Delete a resthook subscription                      |
| [`affinda_workspace_delete_tag`](#affinda_workspace_delete_tag)                                                 | Delete an tag                                       |
| [`affinda_workspace_delete_workspace`](#affinda_workspace_delete_workspace)                                     | Delete a workspace                                  |
| [`affinda_workspace_get_all_invitations`](#affinda_workspace_get_all_invitations)                               | Get list of all invitations                         |
| [`affinda_workspace_get_all_organizations`](#affinda_workspace_get_all_organizations)                           | Get list of all organizations                       |
| [`affinda_workspace_get_all_resthook_subscriptions`](#affinda_workspace_get_all_resthook_subscriptions)         | Get list of all resthook subscriptions              |
| [`affinda_workspace_get_all_tags`](#affinda_workspace_get_all_tags)                                             | Get list of all tags                                |
| [`affinda_workspace_get_all_workspace_memberships`](#affinda_workspace_get_all_workspace_memberships)           | Get list of all workspace memberships               |
| [`affinda_workspace_get_all_workspaces`](#affinda_workspace_get_all_workspaces)                                 | Get list of all workspaces                          |
| [`affinda_workspace_get_invitation`](#affinda_workspace_get_invitation)                                         | Get detail of an invitation                         |
| [`affinda_workspace_get_invitation_by_token`](#affinda_workspace_get_invitation_by_token)                       | Get detail of an invitation by token                |
| [`affinda_workspace_get_mapping_data_source`](#affinda_workspace_get_mapping_data_source)                       | Get specific data source                            |
| [`affinda_workspace_get_mapping_data_source_value`](#affinda_workspace_get_mapping_data_source_value)           | Get specific data source value                      |
| [`affinda_workspace_get_membership`](#affinda_workspace_get_membership)                                         | Get specific workspace membership                   |
| [`affinda_workspace_get_organization`](#affinda_workspace_get_organization)                                     | Get detail of an organization                       |
| [`affinda_workspace_get_resthook_subscription`](#affinda_workspace_get_resthook_subscription)                   | Get specific resthook subscription                  |
| [`affinda_workspace_get_tag`](#affinda_workspace_get_tag)                                                       | Get specific tag                                    |
| [`affinda_workspace_get_usage`](#affinda_workspace_get_usage)                                                   | Get usage                                           |
| [`affinda_workspace_get_usage_by_workspace`](#affinda_workspace_get_usage_by_workspace)                         | Get usage by workspace                              |
| [`affinda_workspace_get_workspace`](#affinda_workspace_get_workspace)                                           | Get specific workspace                              |
| [`affinda_workspace_list_mapping_data_source_values`](#affinda_workspace_list_mapping_data_source_values)       | List values for a data source                       |
| [`affinda_workspace_list_mapping_data_sources`](#affinda_workspace_list_mapping_data_sources)                   | List data sources                                   |
| [`affinda_workspace_replace_mapping_data_source_values`](#affinda_workspace_replace_mapping_data_source_values) | Replace values for a data source                    |
| [`affinda_workspace_respond_to_invitation`](#affinda_workspace_respond_to_invitation)                           | Respond to an invitation                            |
| [`affinda_workspace_update_invitation`](#affinda_workspace_update_invitation)                                   | Update an invitation                                |
| [`affinda_workspace_update_mapping_data_source_value`](#affinda_workspace_update_mapping_data_source_value)     | Update specific data source value                   |
| [`affinda_workspace_update_resthook_subscription`](#affinda_workspace_update_resthook_subscription)             | Update a resthook subscription                      |
| [`affinda_workspace_update_tag`](#affinda_workspace_update_tag)                                                 | Update a tag                                        |
| [`affinda_workspace_update_workspace`](#affinda_workspace_update_workspace)                                     | Update a workspace                                  |
| [`affinda-workspace_get_all_resthook_results`](#affinda-workspace_get_all_resthook_results)                     | Get list of webhook delivery results for a document |
| [`affinda-workspace_resend_resthook_results`](#affinda-workspace_resend_resthook_results)                       | Re-trigger webhooks for a document                  |

***

## affinda\_workspace\_add\_mapping\_data\_source\_value

Add value for a data source

**Parameters:**

| Parameter    | Type   | Required | Default | Description              |
| ------------ | ------ | -------- | ------- | ------------------------ |
| `identifier` | string | Yes      | —       | Data source's identifier |
| `body`       | object | Yes      | —       | Request body             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Data source's identifier"
      },
      "body": {
        "type": "object",
        "description": "Request body"
      }
    },
    "required": [
      "PCID",
      "identifier",
      "body"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_batch\_add\_tag

Add a tag to documents

**Parameters:**

| Parameter     | Type      | Required | Default | Description              |
| ------------- | --------- | -------- | ------- | ------------------------ |
| `identifiers` | string\[] | No       | —       | List of documents to tag |
| `tag`         | integer   | No       | —       | The tag's ID             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifiers": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "List of documents to tag"
      },
      "tag": {
        "type": "integer",
        "description": "The tag's ID"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_batch\_remove\_tag

Remove a tag from documents

**Parameters:**

| Parameter     | Type      | Required | Default | Description                          |
| ------------- | --------- | -------- | ------- | ------------------------------------ |
| `identifiers` | string\[] | No       | —       | List of documents to remove tag from |
| `tag`         | integer   | No       | —       | The tag's ID                         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifiers": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "List of documents to remove tag from"
      },
      "tag": {
        "type": "integer",
        "description": "The tag's ID"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_create\_invitation

Create a new invitation

**Parameters:**

| Parameter      | Type   | Required | Default | Description                                |
| -------------- | ------ | -------- | ------- | ------------------------------------------ |
| `email`        | string | Yes      | —       | The email which the invitation is sent to. |
| `organization` | string | Yes      | —       | Uniquely identify an organization.         |
| `role`         | string | Yes      | —       | The role value                             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "email": {
        "type": "string",
        "description": "The email which the invitation is sent to."
      },
      "organization": {
        "type": "string",
        "description": "Uniquely identify an organization."
      },
      "role": {
        "type": "string",
        "description": "The role value",
        "enum": [
          "admin",
          "member"
        ]
      }
    },
    "required": [
      "PCID",
      "email",
      "organization",
      "role"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_create\_mapping\_data\_source

Create a data source

**Parameters:**

| Parameter         | Type      | Required | Default | Description                                                  |                                                            |
| ----------------- | --------- | -------- | ------- | ------------------------------------------------------------ | ---------------------------------------------------------- |
| `displayProperty` | string    | No       | —       | Attribute in the schema which is used to display the value   |                                                            |
| `keyProperty`     | string    | No       | —       | Attribute in the schema which uniquely identifiers the value |                                                            |
| `name`            | string    | null     | No      | —                                                            | The name value                                             |
| `organization`    | string    | null     | No      | —                                                            | The organization that this mapping data source belongs to. |
| `schema`          | object    | No       | —       | The schema of the mapping data source.                       |                                                            |
| `values`          | object\[] | No       | —       | The values value                                             |                                                            |
| `workspace`       | string    | null     | No      | —                                                            | The workspace that this mapping data source belongs to.    |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "displayProperty": {
        "type": "string",
        "description": "Attribute in the schema which is used to display the value"
      },
      "keyProperty": {
        "type": "string",
        "description": "Attribute in the schema which uniquely identifiers the value"
      },
      "name": {
        "type": [
          "string",
          "null"
        ],
        "description": "The name value"
      },
      "organization": {
        "type": [
          "string",
          "null"
        ],
        "description": "The organization that this mapping data source belongs to."
      },
      "schema": {
        "type": "object",
        "description": "The schema of the mapping data source."
      },
      "values": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "The values value"
      },
      "workspace": {
        "type": [
          "string",
          "null"
        ],
        "description": "The workspace that this mapping data source belongs to."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_create\_resthook\_subscription

Create a resthook subscription

**Parameters:**

| Parameter      | Type   | Required | Default | Description                                                                     |
| -------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------- |
| `event`        | string | Yes      | —       | The event name to subscribe to.                                                 |
| `organization` | string | No       | —       | The organization value                                                          |
| `targetUrl`    | string | Yes      | —       | URL of the resthook's receiver.                                                 |
| `version`      | string | No       | —       | Version of the resthook subscription. Determines the resthook body being fired. |
| `workspace`    | string | No       | —       | The workspace value                                                             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "event": {
        "type": "string",
        "description": "The event name to subscribe to.",
        "enum": [
          "resume.parse.succeeded",
          "resume.parse.failed",
          "resume.parse.completed",
          "invoice.parse.succeeded",
          "invoice.parse.failed",
          "invoice.parse.completed",
          "invoice.validate.completed",
          "document.parse.succeeded",
          "document.parse.failed",
          "document.parse.completed",
          "document.validate.completed",
          "document.classify.succeeded",
          "document.classify.failed",
          "document.classify.completed",
          "document.rejected",
          "annotation.validated"
        ]
      },
      "organization": {
        "type": "string",
        "description": "The organization value"
      },
      "targetUrl": {
        "type": "string",
        "description": "URL of the resthook's receiver."
      },
      "version": {
        "type": "string",
        "description": "Version of the resthook subscription. Determines the resthook body being fired.",
        "enum": [
          "v1",
          "v2",
          "v3"
        ]
      },
      "workspace": {
        "type": "string",
        "description": "The workspace value"
      }
    },
    "required": [
      "PCID",
      "event",
      "targetUrl"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_create\_tag

Create a tag

**Parameters:**

| Parameter   | Type   | Required | Default | Description                    |
| ----------- | ------ | -------- | ------- | ------------------------------ |
| `name`      | string | Yes      | —       | The name value                 |
| `workspace` | string | Yes      | —       | Uniquely identify a workspace. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "name": {
        "type": "string",
        "description": "The name value"
      },
      "workspace": {
        "type": "string",
        "description": "Uniquely identify a workspace."
      }
    },
    "required": [
      "PCID",
      "name",
      "workspace"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_create\_workspace

Create a workspace

**Parameters:**

| Parameter                  | Type      | Required | Default | Description                                                                                                                                                              |                                                                                                                                                                                                                                                                   |
| -------------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `documentSplitter`         | string    | No       | —       | Uniquely identify a document splitter.                                                                                                                                   |                                                                                                                                                                                                                                                                   |
| `documentTypes`            | string\[] | No       | —       | Document types to associate with this workspace                                                                                                                          |                                                                                                                                                                                                                                                                   |
| `name`                     | string    | Yes      | —       | The name value                                                                                                                                                           |                                                                                                                                                                                                                                                                   |
| `organization`             | string    | Yes      | —       | Uniquely identify an organization.                                                                                                                                       |                                                                                                                                                                                                                                                                   |
| `rejectDuplicates`         | boolean   | null     | No      | —                                                                                                                                                                        | If "true", parsing will fail when the uploaded document is duplicate of an existing document, no credits will be consumed. If "false", will parse the document normally whether its a duplicate or not. If not provided, will fallback to the workspace settings. |
| `rejectInvalidDocuments`   | boolean   | No       | —       | If true, the uploaded document will be rejected if it's of the wrong document type, or if its document type cannot be determined. No credits will be consumed.           |                                                                                                                                                                                                                                                                   |
| `visibility`               | string    | No       | —       | Visibility "organization" means everyone in the organization can access the workspace. Visibility "private" means only people explicitly added can access the workspace. |                                                                                                                                                                                                                                                                   |
| `whitelistIngestAddresses` | string\[] | No       | —       | If specified, only emails from these addresses will be ingested for parsing. Wild cards are allowed, e.g. "\*@eyefind.info".                                             |                                                                                                                                                                                                                                                                   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "documentSplitter": {
        "type": "string",
        "description": "Uniquely identify a document splitter."
      },
      "documentTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Document types to associate with this workspace"
      },
      "name": {
        "type": "string",
        "description": "The name value"
      },
      "organization": {
        "type": "string",
        "description": "Uniquely identify an organization."
      },
      "rejectDuplicates": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "If \"true\", parsing will fail when the uploaded document is duplicate of an existing document, no credits will be consumed. If \"false\", will parse the document normally whether its a duplicate or not. If not provided, will fallback to the workspace settings."
      },
      "rejectInvalidDocuments": {
        "type": "boolean",
        "description": "If true, the uploaded document will be rejected if it's of the wrong document type, or if its document type cannot be determined. No credits will be consumed."
      },
      "visibility": {
        "type": "string",
        "description": "Visibility \"organization\" means everyone in the organization can access the workspace. Visibility \"private\" means only people explicitly added can access the workspace.",
        "enum": [
          "organization",
          "private"
        ]
      },
      "whitelistIngestAddresses": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "If specified, only emails from these addresses will be ingested for parsing. Wild cards are allowed, e.g. \"*@eyefind.info\"."
      }
    },
    "required": [
      "PCID",
      "name",
      "organization"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_create\_workspace\_membership

Create a workspace membership

**Parameters:**

| Parameter   | Type    | Required | Default | Description                    |
| ----------- | ------- | -------- | ------- | ------------------------------ |
| `user`      | integer | No       | —       | Uniquely identify a user.      |
| `workspace` | string  | No       | —       | Uniquely identify a workspace. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "user": {
        "type": "integer",
        "description": "Uniquely identify a user."
      },
      "workspace": {
        "type": "string",
        "description": "Uniquely identify a workspace."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_delete\_invitation

Delete an invitation

**Parameters:**

| Parameter    | Type   | Required | Default | Description            |
| ------------ | ------ | -------- | ------- | ---------------------- |
| `identifier` | string | Yes      | —       | Invitation identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Invitation identifier."
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_delete\_mapping\_data\_source

Delete specific data source

**Parameters:**

| Parameter    | Type   | Required | Default | Description              |
| ------------ | ------ | -------- | ------- | ------------------------ |
| `identifier` | string | Yes      | —       | Data source's identifier |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Data source's identifier"
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_delete\_mapping\_data\_source\_value

Delete specific data source value

**Parameters:**

| Parameter    | Type   | Required | Default | Description               |
| ------------ | ------ | -------- | ------- | ------------------------- |
| `identifier` | string | Yes      | —       | Data source's identifier  |
| `value`      | string | Yes      | —       | Data Source Value's value |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Data source's identifier"
      },
      "value": {
        "type": "string",
        "description": "Data Source Value's value"
      }
    },
    "required": [
      "PCID",
      "identifier",
      "value"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_delete\_membership

Delete a workspace membership

**Parameters:**

| Parameter    | Type   | Required | Default | Description                        |
| ------------ | ------ | -------- | ------- | ---------------------------------- |
| `identifier` | string | Yes      | —       | Workspace membership's identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Workspace membership's identifier."
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_delete\_resthook\_subscription

Delete a resthook subscription

**Parameters:**

| Parameter | Type    | Required | Default | Description               |
| --------- | ------- | -------- | ------- | ------------------------- |
| `id`      | integer | Yes      | —       | ResthookSubscription's ID |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "ResthookSubscription's ID"
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_delete\_tag

Delete an tag

**Parameters:**

| Parameter | Type    | Required | Default | Description |
| --------- | ------- | -------- | ------- | ----------- |
| `id`      | integer | Yes      | —       | Tag's ID    |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "Tag's ID"
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_delete\_workspace

Delete a workspace

**Parameters:**

| Parameter    | Type   | Required | Default | Description            |
| ------------ | ------ | -------- | ------- | ---------------------- |
| `identifier` | string | Yes      | —       | Workspace's identifier |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Workspace's identifier"
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_all\_invitations

Get list of all invitations

**Parameters:**

| Parameter      | Type    | Required | Default | Description                                                                |
| -------------- | ------- | -------- | ------- | -------------------------------------------------------------------------- |
| `offset`       | integer | No       | —       | The number of documents to skip before starting to collect the result set. |
| `limit`        | integer | No       | —       | The numbers of results to return.                                          |
| `organization` | string  | No       | —       | Filter by organization.                                                    |
| `status`       | string  | No       | —       | Filter by status.                                                          |
| `role`         | string  | No       | —       | Filter by role.                                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "offset": {
        "type": "integer",
        "description": "The number of documents to skip before starting to collect the result set."
      },
      "limit": {
        "type": "integer",
        "description": "The numbers of results to return."
      },
      "organization": {
        "type": "string",
        "description": "Filter by organization."
      },
      "status": {
        "type": "string",
        "description": "Filter by status.",
        "enum": [
          "pending",
          "accepted",
          "declined"
        ]
      },
      "role": {
        "type": "string",
        "description": "Filter by role.",
        "enum": [
          "admin",
          "member"
        ]
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_all\_organizations

Get list of all organizations

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_all\_resthook\_subscriptions

Get list of all resthook subscriptions

**Parameters:**

| Parameter | Type    | Required | Default | Description                                                                |
| --------- | ------- | -------- | ------- | -------------------------------------------------------------------------- |
| `offset`  | integer | No       | —       | The number of documents to skip before starting to collect the result set. |
| `limit`   | integer | No       | —       | The numbers of results to return.                                          |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "offset": {
        "type": "integer",
        "description": "The number of documents to skip before starting to collect the result set."
      },
      "limit": {
        "type": "integer",
        "description": "The numbers of results to return."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_all\_tags

Get list of all tags

**Parameters:**

| Parameter   | Type    | Required | Default | 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. |
| `workspace` | string  | No       | —       | Filter by workspace.                                                       |
| `name`      | string  | No       | —       | Filter by name.                                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "limit": {
        "type": "integer",
        "description": "The numbers of results to return."
      },
      "offset": {
        "type": "integer",
        "description": "The number of documents to skip before starting to collect the result set."
      },
      "workspace": {
        "type": "string",
        "description": "Filter by workspace."
      },
      "name": {
        "type": "string",
        "description": "Filter by name."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_all\_workspace\_memberships

Get list of all workspace memberships

**Parameters:**

| Parameter   | Type    | Required | Default | Description                                                                |
| ----------- | ------- | -------- | ------- | -------------------------------------------------------------------------- |
| `offset`    | integer | No       | —       | The number of documents to skip before starting to collect the result set. |
| `limit`     | integer | No       | —       | The numbers of results to return.                                          |
| `workspace` | string  | No       | —       | Filter by workspace.                                                       |
| `user`      | string  | No       | —       | Partial text match on user's email, case-insensitive.                      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "offset": {
        "type": "integer",
        "description": "The number of documents to skip before starting to collect the result set."
      },
      "limit": {
        "type": "integer",
        "description": "The numbers of results to return."
      },
      "workspace": {
        "type": "string",
        "description": "Filter by workspace."
      },
      "user": {
        "type": "string",
        "description": "Partial text match on user's email, case-insensitive."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_all\_workspaces

Get list of all workspaces

**Parameters:**

| Parameter      | Type   | Required | Default | Description             |
| -------------- | ------ | -------- | ------- | ----------------------- |
| `organization` | string | Yes      | —       | Filter by organization. |
| `name`         | string | No       | —       | Filter by name.         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "organization": {
        "type": "string",
        "description": "Filter by organization."
      },
      "name": {
        "type": "string",
        "description": "Filter by name."
      }
    },
    "required": [
      "PCID",
      "organization"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_invitation

Get detail of an invitation

**Parameters:**

| Parameter    | Type   | Required | Default | Description            |
| ------------ | ------ | -------- | ------- | ---------------------- |
| `identifier` | string | Yes      | —       | Invitation identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Invitation identifier."
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_invitation\_by\_token

Get detail of an invitation by token

**Parameters:**

| Parameter | Type   | Required | Default | Description       |
| --------- | ------ | -------- | ------- | ----------------- |
| `token`   | string | Yes      | —       | Invitation token. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "token": {
        "type": "string",
        "description": "Invitation token."
      }
    },
    "required": [
      "PCID",
      "token"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_mapping\_data\_source

Get specific data source

**Parameters:**

| Parameter    | Type   | Required | Default | Description              |
| ------------ | ------ | -------- | ------- | ------------------------ |
| `identifier` | string | Yes      | —       | Data source's identifier |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Data source's identifier"
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_mapping\_data\_source\_value

Get specific data source value

**Parameters:**

| Parameter    | Type   | Required | Default | Description               |
| ------------ | ------ | -------- | ------- | ------------------------- |
| `identifier` | string | Yes      | —       | Data source's identifier  |
| `value`      | string | Yes      | —       | Data Source Value's value |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Data source's identifier"
      },
      "value": {
        "type": "string",
        "description": "Data Source Value's value"
      }
    },
    "required": [
      "PCID",
      "identifier",
      "value"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_membership

Get specific workspace membership

**Parameters:**

| Parameter    | Type   | Required | Default | Description                        |
| ------------ | ------ | -------- | ------- | ---------------------------------- |
| `identifier` | string | Yes      | —       | Workspace membership's identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Workspace membership's identifier."
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_organization

Get detail of an organization

**Parameters:**

| Parameter    | Type   | Required | Default | Description              |
| ------------ | ------ | -------- | ------- | ------------------------ |
| `identifier` | string | Yes      | —       | Organization identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Organization identifier."
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_resthook\_subscription

Get specific resthook subscription

**Parameters:**

| Parameter | Type    | Required | Default | Description                |
| --------- | ------- | -------- | ------- | -------------------------- |
| `id`      | integer | Yes      | —       | Resthook subscription's ID |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "Resthook subscription's ID"
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_tag

Get specific tag

**Parameters:**

| Parameter | Type    | Required | Default | Description |
| --------- | ------- | -------- | ------- | ----------- |
| `id`      | integer | Yes      | —       | Tag's ID    |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "Tag's ID"
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_usage

Get usage

**Parameters:**

| Parameter       | Type   | Required | Default | Description                                                                         |
| --------------- | ------ | -------- | ------- | ----------------------------------------------------------------------------------- |
| `organization`  | string | Yes      | —       | Organization to report usage for. The caller must be an admin or owner.             |
| `workspace`     | string | No       | —       | Optionally scope the report to a single workspace within the organization.          |
| `document_type` | string | No       | —       | Optionally scope the report to a single document type within the organization.      |
| `start`         | string | No       | —       | Inclusive start date of the report (YYYY-MM-DD). Defaults to 365 days before `end`. |
| `end`           | string | No       | —       | Inclusive end date of the report (YYYY-MM-DD). Defaults to today.                   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "organization": {
        "type": "string",
        "description": "Organization to report usage for. The caller must be an admin or owner."
      },
      "workspace": {
        "type": "string",
        "description": "Optionally scope the report to a single workspace within the organization."
      },
      "document_type": {
        "type": "string",
        "description": "Optionally scope the report to a single document type within the organization."
      },
      "start": {
        "type": "string",
        "description": "Inclusive start date of the report (YYYY-MM-DD). Defaults to 365 days before `end`."
      },
      "end": {
        "type": "string",
        "description": "Inclusive end date of the report (YYYY-MM-DD). Defaults to today."
      }
    },
    "required": [
      "PCID",
      "organization"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_usage\_by\_workspace

Get usage by workspace

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                           |
| ------------ | ------ | -------- | ------- | ----------------------------------------------------- |
| `identifier` | string | Yes      | —       | Workspace's identifier                                |
| `start`      | string | No       | —       | Start date of the period to retrieve. Format: YYYY-MM |
| `end`        | string | No       | —       | End date of the period to retrieve. Format: YYYY-MM   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Workspace's identifier"
      },
      "start": {
        "type": "string",
        "description": "Start date of the period to retrieve. Format: YYYY-MM"
      },
      "end": {
        "type": "string",
        "description": "End date of the period to retrieve. Format: YYYY-MM"
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_get\_workspace

Get specific workspace

**Parameters:**

| Parameter    | Type   | Required | Default | Description            |
| ------------ | ------ | -------- | ------- | ---------------------- |
| `identifier` | string | Yes      | —       | Workspace's identifier |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Workspace's identifier"
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_list\_mapping\_data\_source\_values

List values for a data source

**Parameters:**

| Parameter    | Type    | Required | Default | 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. |
| `search`     | string  | No       | —       | Search for specific values                                                 |
| `annotation` | integer | No       | —       | Filter based on annotation ID                                              |
| `document`   | string  | No       | —       | Identifier of the document to apply filter lookups on if available         |
| `identifier` | string  | Yes      | —       | Data source's identifier                                                   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "limit": {
        "type": "integer",
        "description": "The numbers of results to return."
      },
      "offset": {
        "type": "integer",
        "description": "The number of documents to skip before starting to collect the result set."
      },
      "search": {
        "type": "string",
        "description": "Search for specific values"
      },
      "annotation": {
        "type": "integer",
        "description": "Filter based on annotation ID"
      },
      "document": {
        "type": "string",
        "description": "Identifier of the document to apply filter lookups on if available"
      },
      "identifier": {
        "type": "string",
        "description": "Data source's identifier"
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_list\_mapping\_data\_sources

List data sources

**Parameters:**

| Parameter      | Type    | Required | Default | Description                                                                |
| -------------- | ------- | -------- | ------- | -------------------------------------------------------------------------- |
| `offset`       | integer | No       | —       | The number of documents to skip before starting to collect the result set. |
| `limit`        | integer | No       | —       | The numbers of results to return.                                          |
| `name`         | string  | No       | —       | Filter by name.                                                            |
| `organization` | string  | No       | —       | Filter by organization.                                                    |
| `workspace`    | string  | No       | —       | Filter by workspace.                                                       |
| `identifier`   | string  | No       | —       | Filter by identifier.                                                      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "offset": {
        "type": "integer",
        "description": "The number of documents to skip before starting to collect the result set."
      },
      "limit": {
        "type": "integer",
        "description": "The numbers of results to return."
      },
      "name": {
        "type": "string",
        "description": "Filter by name."
      },
      "organization": {
        "type": "string",
        "description": "Filter by organization."
      },
      "workspace": {
        "type": "string",
        "description": "Filter by workspace."
      },
      "identifier": {
        "type": "string",
        "description": "Filter by identifier."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_replace\_mapping\_data\_source\_values

Replace values for a data source

**Parameters:**

| Parameter    | Type      | Required | Default | Description              |
| ------------ | --------- | -------- | ------- | ------------------------ |
| `identifier` | string    | Yes      | —       | Data source's identifier |
| `body`       | object\[] | Yes      | —       | Request body             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Data source's identifier"
      },
      "body": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "Request body"
      }
    },
    "required": [
      "PCID",
      "identifier",
      "body"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_respond\_to\_invitation

Respond to an invitation

**Parameters:**

| Parameter | Type   | Required | Default | Description       |
| --------- | ------ | -------- | ------- | ----------------- |
| `token`   | string | Yes      | —       | Invitation token. |
| `status`  | string | No       | —       | The status value  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "token": {
        "type": "string",
        "description": "Invitation token."
      },
      "status": {
        "type": "string",
        "description": "The status value",
        "enum": [
          "accepted",
          "declined"
        ]
      }
    },
    "required": [
      "PCID",
      "token"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_update\_invitation

Update an invitation

**Parameters:**

| Parameter    | Type   | Required | Default | Description            |
| ------------ | ------ | -------- | ------- | ---------------------- |
| `identifier` | string | Yes      | —       | Invitation identifier. |
| `role`       | string | No       | —       | The role value         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Invitation identifier."
      },
      "role": {
        "type": "string",
        "description": "The role value",
        "enum": [
          "admin",
          "member"
        ]
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_update\_mapping\_data\_source\_value

Update specific data source value

**Parameters:**

| Parameter    | Type   | Required | Default | Description              |
| ------------ | ------ | -------- | ------- | ------------------------ |
| `identifier` | string | Yes      | —       | Data source's identifier |
| `value`      | string | Yes      | —       | Data Source's value      |
| `body`       | object | Yes      | —       | Request body             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Data source's identifier"
      },
      "value": {
        "type": "string",
        "description": "Data Source's value"
      },
      "body": {
        "type": "object",
        "description": "Request body"
      }
    },
    "required": [
      "PCID",
      "identifier",
      "value",
      "body"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_update\_resthook\_subscription

Update a resthook subscription

**Parameters:**

| Parameter      | Type    | Required | Default | Description                                                                     |
| -------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------- |
| `id`           | integer | Yes      | —       | ResthookSubscription's ID                                                       |
| `event`        | string  | No       | —       | The event name to subscribe to.                                                 |
| `organization` | string  | No       | —       | Uniquely identify an organization.                                              |
| `version`      | string  | No       | —       | Version of the resthook subscription. Determines the resthook body being fired. |
| `workspace`    | string  | No       | —       | Uniquely identify a workspace.                                                  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "ResthookSubscription's ID"
      },
      "event": {
        "type": "string",
        "description": "The event name to subscribe to.",
        "enum": [
          "resume.parse.succeeded",
          "resume.parse.failed",
          "resume.parse.completed",
          "invoice.parse.succeeded",
          "invoice.parse.failed",
          "invoice.parse.completed",
          "invoice.validate.completed",
          "document.parse.succeeded",
          "document.parse.failed",
          "document.parse.completed",
          "document.validate.completed",
          "document.classify.succeeded",
          "document.classify.failed",
          "document.classify.completed",
          "document.rejected",
          "annotation.validated"
        ]
      },
      "organization": {
        "type": "string",
        "description": "Uniquely identify an organization."
      },
      "version": {
        "type": "string",
        "description": "Version of the resthook subscription. Determines the resthook body being fired.",
        "enum": [
          "v1",
          "v2",
          "v3"
        ]
      },
      "workspace": {
        "type": "string",
        "description": "Uniquely identify a workspace."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_update\_tag

Update a tag

**Parameters:**

| Parameter   | Type    | Required | Default | Description                    |
| ----------- | ------- | -------- | ------- | ------------------------------ |
| `id`        | integer | Yes      | —       | Tag's ID                       |
| `name`      | string  | No       | —       | The name value                 |
| `workspace` | string  | No       | —       | Uniquely identify a workspace. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "Tag's ID"
      },
      "name": {
        "type": "string",
        "description": "The name value"
      },
      "workspace": {
        "type": "string",
        "description": "Uniquely identify a workspace."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## affinda\_workspace\_update\_workspace

Update a workspace

**Parameters:**

| Parameter                  | Type      | Required | Default | Description                                                                                                                                                              |                                                                                                                                                                                                                                                                   |
| -------------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `identifier`               | string    | Yes      | —       | Workspace's identifier                                                                                                                                                   |                                                                                                                                                                                                                                                                   |
| `documentSplitter`         | string    | No       | —       | Uniquely identify a document splitter.                                                                                                                                   |                                                                                                                                                                                                                                                                   |
| `documentTypes`            | string\[] | No       | —       | Document types to associate with this workspace                                                                                                                          |                                                                                                                                                                                                                                                                   |
| `name`                     | string    | No       | —       | The name value                                                                                                                                                           |                                                                                                                                                                                                                                                                   |
| `rejectDuplicates`         | boolean   | null     | No      | —                                                                                                                                                                        | If "true", parsing will fail when the uploaded document is duplicate of an existing document, no credits will be consumed. If "false", will parse the document normally whether its a duplicate or not. If not provided, will fallback to the workspace settings. |
| `rejectInvalidDocuments`   | boolean   | No       | —       | If true, the uploaded document will be rejected if it's of the wrong document type, or if its document type cannot be determined. No credits will be consumed.           |                                                                                                                                                                                                                                                                   |
| `visibility`               | string    | No       | —       | Visibility "organization" means everyone in the organization can access the workspace. Visibility "private" means only people explicitly added can access the workspace. |                                                                                                                                                                                                                                                                   |
| `whitelistIngestAddresses` | string\[] | No       | —       | If specified, only emails from these addresses will be ingested for parsing. Wild cards are allowed, e.g. "\*@eyefind.info".                                             |                                                                                                                                                                                                                                                                   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "identifier": {
        "type": "string",
        "description": "Workspace's identifier"
      },
      "documentSplitter": {
        "type": "string",
        "description": "Uniquely identify a document splitter."
      },
      "documentTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Document types to associate with this workspace"
      },
      "name": {
        "type": "string",
        "description": "The name value"
      },
      "rejectDuplicates": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "If \"true\", parsing will fail when the uploaded document is duplicate of an existing document, no credits will be consumed. If \"false\", will parse the document normally whether its a duplicate or not. If not provided, will fallback to the workspace settings."
      },
      "rejectInvalidDocuments": {
        "type": "boolean",
        "description": "If true, the uploaded document will be rejected if it's of the wrong document type, or if its document type cannot be determined. No credits will be consumed."
      },
      "visibility": {
        "type": "string",
        "description": "Visibility \"organization\" means everyone in the organization can access the workspace. Visibility \"private\" means only people explicitly added can access the workspace.",
        "enum": [
          "organization",
          "private"
        ]
      },
      "whitelistIngestAddresses": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "If specified, only emails from these addresses will be ingested for parsing. Wild cards are allowed, e.g. \"*@eyefind.info\"."
      }
    },
    "required": [
      "PCID",
      "identifier"
    ]
  }
  ```
</Expandable>

***

## affinda-workspace\_get\_all\_resthook\_results

Get list of webhook delivery results for a document

**Parameters:**

| Parameter  | Type    | Required | Default | Description                                                                |
| ---------- | ------- | -------- | ------- | -------------------------------------------------------------------------- |
| `offset`   | integer | No       | —       | The number of documents to skip before starting to collect the result set. |
| `limit`    | integer | No       | —       | The numbers of results to return.                                          |
| `document` | string  | Yes      | —       | Identifier of the document to return webhook delivery results for.         |
| `event`    | string  | No       | —       | Filter results by event.                                                   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "offset": {
        "type": "integer",
        "description": "The number of documents to skip before starting to collect the result set."
      },
      "limit": {
        "type": "integer",
        "description": "The numbers of results to return."
      },
      "document": {
        "type": "string",
        "description": "Identifier of the document to return webhook delivery results for."
      },
      "event": {
        "type": "string",
        "description": "Filter results by event.",
        "enum": [
          "resume.parse.succeeded",
          "resume.parse.failed",
          "resume.parse.completed",
          "invoice.parse.succeeded",
          "invoice.parse.failed",
          "invoice.parse.completed",
          "invoice.validate.completed",
          "document.parse.succeeded",
          "document.parse.failed",
          "document.parse.completed",
          "document.validate.completed",
          "document.classify.succeeded",
          "document.classify.failed",
          "document.classify.completed",
          "document.rejected",
          "annotation.validated"
        ]
      }
    },
    "required": [
      "PCID",
      "document"
    ]
  }
  ```
</Expandable>

***

## affinda-workspace\_resend\_resthook\_results

Re-trigger webhooks for a document

**Parameters:**

| Parameter  | Type   | Required | Default | Description                                         |
| ---------- | ------ | -------- | ------- | --------------------------------------------------- |
| `document` | string | Yes      | —       | Identifier of the document to replay the event for. |
| `event`    | string | Yes      | —       | The event name to subscribe to.                     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "document": {
        "type": "string",
        "description": "Identifier of the document to replay the event for."
      },
      "event": {
        "type": "string",
        "description": "The event name to subscribe to.",
        "enum": [
          "resume.parse.succeeded",
          "resume.parse.failed",
          "resume.parse.completed",
          "invoice.parse.succeeded",
          "invoice.parse.failed",
          "invoice.parse.completed",
          "invoice.validate.completed",
          "document.parse.succeeded",
          "document.parse.failed",
          "document.parse.completed",
          "document.validate.completed",
          "document.classify.succeeded",
          "document.classify.failed",
          "document.classify.completed",
          "document.rejected",
          "annotation.validated"
        ]
      }
    },
    "required": [
      "PCID",
      "document",
      "event"
    ]
  }
  ```
</Expandable>
