Clay API Docs
  1. Authentication
Clay API Docs
  • Disclaimer
  • Authentication
    • Fetch Clay Cookies
      POST
  • Workspaces
    • Get All Workspaces in your account
      GET
  • Folders
    • Create a folder
      POST
    • Delete a folder
      DELETE
  • Resources
    • Fetch all resources
      POST
    • Search a resource in workspace
      POST
  • Workbooks
    • Create a Workbook
      POST
    • Delete a Workbook
      DELETE
  • Tables
    • Fetch all record ids in a table
      GET
    • Add a row in the table
      POST
    • Delete a row from the table
      DELETE
    • Delete all rows from a table
      DELETE
    • Run an enrichment column
      PATCH
    • Count number of row in a Table
      GET
  • Credit Usage
    • Get a list of owners
      GET
    • Get User-Specific Credit Usage Report
      GET
    • Get User-Created Resources
      POST
    • Get Workspace Credit Usage Report
      GET
    • List all integrations
      GET
    • Get Integration Type Details
      GET
    • Get Integration-Specific Credit Usage
      GET
    • Get Integration Credit Usage Report
      GET
  • Schemas
    • Sample Schemas
      • Pet
      • Category
      • Tag
  1. Authentication

Fetch Clay Cookies

POST
https://api.clay.com/v3/auth/login
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.

Request

Body Params application/xml

Examples

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.clay.com/v3/auth/login' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<root>
  <password>string</password>
  <email>string</email>
  <source xsi:nil="true"/>
</root>'
Response Response Example
[
    {
        "body": {
            "success": true,
            "redirect_to": "https://app.clay.com/workspaces/123456"
        },
        "headers": {
            "date": "Wed, 25 Jun 2025 09:01:55 GMT",
            "content-type": "application/json; charset=utf-8",
            "content-length": "71",
            "connection": "keep-alive",
            "request-id": "req_example123456789",
            "vary": "Origin, Accept-Encoding",
            "access-control-allow-credentials": "true",
            "content-security-policy": "default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests",
            "cross-origin-opener-policy": "same-origin",
            "cross-origin-resource-policy": "same-origin",
            "origin-agent-cluster": "?1",
            "referrer-policy": "no-referrer",
            "strict-transport-security": "max-age=15552000; includeSubDomains",
            "x-content-type-options": "nosniff",
            "x-dns-prefetch-control": "off",
            "x-download-options": "noopen",
            "x-frame-options": "SAMEORIGIN",
            "x-permitted-cross-domain-policies": "none",
            "x-xss-protection": "0",
            "cache-control": "no-cache, no-store",
            "etag": "W/\"47-exampleEtagValue123\"",
            "set-cookie": [
                "claysession=s%3Aexample_session_token_abc123.mock_signature_xyz789;=/; Expires=Wed, y; Secure; SameSite=None"
            ]
        },
        "statusCode": 200,
        "statusMessage": "OK"
    }
]
Modified at 2026-01-15 19:21:12
Previous
Disclaimer
Next
Get All Workspaces in your account
Built with