List deals

GET
/api/v1/orgs/{orgId}/deals

Returns a cursor-paginated list of deals for the API key bound user in the specified organization. Optionally filter by name or address with the search query parameter, or by catalog tag labels with the tags query parameter. Pass isTemplate=true to list deal templates; each item then carries templateSource.

Requires one of api_deals_list or api_deals_create.

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer token using a Clai API key secret (clai_live_*).

In: header

Path Parameters

NameTypeDescription
orgId
required
string

Organization ID the key is operating in

Query Parameters

NameTypeDescription
searchstring

Optional name/address filter. Non-empty values match deal name and property address; blank or whitespace-only values use the recents list. Without cursor, non-empty values try relevance ranking first: up to limit top matches (hasMore false, nextCursor null). If ranking finds nothing, falls back to substring matching with normal cursor pagination.

orderBystring

Sort column for the deal list

Allowed"created_at""updated_at"
ascendingstring

When true, sort ascending instead of descending

Allowed"true""false"
limitinteger

Maximum number of deals to return (1-100)

Range1 <= value <= 100
cursorstring

Opaque pagination cursor from a previous response. With search, bypasses relevance ranking and paginates substring matches ordered by orderBy instead.

tagsstring

Comma-separated catalog labels, up to 20. A deal matches when its tags array contains any of them. Labels match the stored casing exactly.

isTemplatestring

When true, list the org's deal templates (yours and the org library) instead of deals. Global templates are not included.

Allowed"true""false"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.goclai.com/api/v1/orgs/org_2abc123/deals"
{
  "deals": [
    {
      "dealId": "f480fdfe-5c44-458b-b537-f3d9f40f9678",
      "name": "string",
      "status": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "packageId": "471cc1d4-ec27-4504-b7c2-949af95662bc",
      "authorName": "string",
      "tags": [
        "string"
      ],
      "dealUrl": "string",
      "templateSource": "personal"
    }
  ],
  "hasMore": true,
  "nextCursor": "string"
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}