# Clay API Docs ## Docs - [Disclaimer](https://claydocs.claygenius.io/disclaimer-1920885m0.md): ## API Docs - Authentication [Fetch Clay Cookies](https://claydocs.claygenius.io/fetch-clay-cookies-16552072e0.md): Authenticates user credentials and returns session cookies via response headers. Extract the claysession cookie from the Set-Cookie header and include it in the Cookie header for all subsequent API requests (e.g., Cookie: claysession=your_session_token). Session cookies expire after 24 hours and should be refreshed at the beginning of each workflow or daily automation cycle. - Workspaces [Get All Workspaces in your account](https://claydocs.claygenius.io/get-all-workspaces-in-your-account-16551999e0.md): Get all workspaces in your Clay account - Folders [Create a folder](https://claydocs.claygenius.io/create-a-folder-17226945e0.md): - Folders [Delete a folder](https://claydocs.claygenius.io/delete-a-folder-19585245e0.md): - Resources [Fetch all resources](https://claydocs.claygenius.io/fetch-all-resources-19580087e0.md): Retrieves all top-level resources in a Clay workspace (folders, workbooks, individual tables). Does not include tables nested within folders/workbooks. - Resources [Search a resource in workspace](https://claydocs.claygenius.io/search-a-resource-in-workspace-19606764e0.md): Search for specific resources (tables, workbooks, folders) within your Clay workspace using query filters. This endpoint allows you to find resources by name, content, or other searchable attributes within a specific workspace. - Workbooks [Create a Workbook](https://claydocs.claygenius.io/create-a-workbook-19593765e0.md): Creates a new workbook in your Clay workspace. This endpoint allows you to programmatically generate a new workbook with a specified name and workspace association, with optional settings like auto-run functionality enabled. - Workbooks [Delete a Workbook](https://claydocs.claygenius.io/delete-a-workbook-19593775e0.md): Deletes a specific workbook from your Clay workspace. This endpoint moves the workbook to trash (soft delete) by default, allowing for potential recovery, or can permanently delete it based on the isPermanentDelete parameter. - Tables [Fetch all record ids in a table](https://claydocs.claygenius.io/fetch-all-record-ids-in-a-table-26382941e0.md): - Tables [Add a row in the table](https://claydocs.claygenius.io/add-a-row-in-the-table-26379600e0.md): Adds a new row to the specified table. This endpoint creates a new record in the table with a custom row ID that you provide. - Tables [Delete a row from the table](https://claydocs.claygenius.io/delete-a-row-from-the-table-26383819e0.md): Deletes one or more rows from the specified table. This endpoint removes records permanently based on the provided record IDs. - Tables [Delete all rows from a table](https://claydocs.claygenius.io/delete-all-rows-from-a-table-26384498e0.md): Deletes all rows from a specific view in the table. This endpoint removes all records that are visible in the specified view, based on the view's filters. - Tables [Run an enrichment column](https://claydocs.claygenius.io/run-an-enrichment-column-26384723e0.md): Runs an enrichment column on specified records in the table. This endpoint executes the enrichment for a specific field/column on a set of records. - Tables [Count number of row in a Table](https://claydocs.claygenius.io/count-number-of-row-in-a-table-26762656e0.md): Count number of rows in a table in real time. - Credit Usage [Get a list of owners](https://claydocs.claygenius.io/get-a-list-of-owners-19606937e0.md): Retrieves a list of all users and their permission levels within the specified Clay workspace. This endpoint returns user access rights, roles, and authorization details for workspace management and security auditing. - Credit Usage [Get User-Specific Credit Usage Report](https://claydocs.claygenius.io/get-user-specific-credit-usage-report-19608894e0.md): Retrieves detailed credit usage and consumption reports for a specific user within a workspace over a defined time range. This endpoint filters credit spending data by user ID to show individual user consumption patterns and costs. - Credit Usage [Get User-Created Resources](https://claydocs.claygenius.io/get-user-created-resources-19606977e0.md): Retrieves a list of all resources (tables, workbooks, folders) created by a specific user within the Clay workspace. This endpoint filters resources based on owner ID to show only items created by the specified user. - Credit Usage [Get Workspace Credit Usage Report](https://claydocs.claygenius.io/get-workspace-credit-usage-report-19608836e0.md): Retrieves detailed credit usage and consumption reports for a specific workspace within a defined time range. This endpoint provides insights into credit spending patterns, usage analytics, and cost tracking for workspace billing and optimization. - Credit Usage [List all integrations](https://claydocs.claygenius.io/list-all-integrations-19610526e0.md): Retrieves a comprehensive list of all connected integrations and app accounts within your Clay workspace. This endpoint returns all third-party service connections, their status, and configuration details. - Credit Usage [Get Integration Type Details](https://claydocs.claygenius.io/get-integration-type-details-19611142e0.md): Retrieves detailed information about a specific integration type (e.g., Ocean.io) available in Clay. This endpoint returns metadata about the integration, including configuration options, capabilities, required fields, and general integration specifications - Credit Usage [Get Integration-Specific Credit Usage](https://claydocs.claygenius.io/get-integration-specific-credit-usage-19610992e0.md): Retrieves workspace credit usage data filtered by specific integrations within a defined time range. This endpoint allows you to focus on credit consumption for particular integration IDs rather than all workspace activity, providing targeted cost analysis. - Credit Usage [Get Integration Credit Usage Report](https://claydocs.claygenius.io/get-integration-credit-usage-report-19610927e0.md): Retrieves detailed credit usage breakdown by all integrations/service types within a workspace over a specified time range. This endpoint returns credit consumption data for every integration used in the workspace, showing which Clay integrations consumed the most credits. ## Schemas - Sample Schemas [Pet](https://claydocs.claygenius.io/pet-6592946d0.md): - Sample Schemas [Category](https://claydocs.claygenius.io/category-6592947d0.md): - Sample Schemas [Tag](https://claydocs.claygenius.io/tag-6592948d0.md):