# List Contacts

GET https://api.smobi.com/v1/contacts

Authentication: x-api-key header (brand-scoped API key).

Cursor-paginated list of the brand's contacts, newest first. Archived contacts are hidden by default (status=active).

## Operation

```json
{
  "description": "Cursor-paginated list of the brand's contacts, newest first. Archived contacts are hidden by default (status=active).",
  "operationId": "listContacts",
  "parameters": [
    {
      "name": "status",
      "required": false,
      "in": "query",
      "description": "Default: active",
      "schema": {
        "enum": [
          "active",
          "archived",
          "all"
        ],
        "type": "string",
        "default": "active"
      }
    },
    {
      "name": "tag",
      "required": false,
      "in": "query",
      "description": "Filter by tag; repeat the parameter to require multiple tags",
      "schema": {
        "oneOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ]
      }
    },
    {
      "name": "email",
      "required": false,
      "in": "query",
      "description": "Exact email lookup (case-insensitive)",
      "schema": {
        "type": "string",
        "format": "email"
      }
    },
    {
      "name": "phoneNumber",
      "required": false,
      "in": "query",
      "description": "Exact phone lookup (E.164 or digits-only)",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "cursor",
      "required": false,
      "in": "query",
      "description": "Opaque cursor from pagination.nextCursor",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "limit",
      "required": false,
      "in": "query",
      "description": "1-100, default 50",
      "schema": {
        "example": 50,
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "default": 50
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Page of contacts",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ContactListResponseDto"
          }
        }
      }
    },
    "400": {
      "description": "Invalid query parameter or cursor"
    },
    "401": {
      "description": "Missing or invalid API key",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "statusCode": {
                "type": "number",
                "example": 401
              },
              "message": {
                "type": "string",
                "example": "Invalid API key"
              },
              "error": {
                "type": "string",
                "example": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "403": {
      "description": "The API key is not scoped to a brand",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "statusCode": {
                "type": "number",
                "example": 403
              },
              "message": {
                "type": "string",
                "example": "This endpoint requires a brand-scoped API key"
              },
              "error": {
                "type": "string",
                "example": "Forbidden"
              }
            }
          }
        }
      }
    }
  },
  "summary": "List Contacts",
  "tags": [
    "Contacts"
  ],
  "security": [
    {
      "x-api-key": []
    }
  ]
}
```

## Referenced Schemas

```json
{
  "ContactListResponseDto": {
    "type": "object",
    "properties": {
      "data": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ContactDto"
        }
      },
      "pagination": {
        "$ref": "#/components/schemas/ContactListPaginationDto"
      }
    },
    "required": [
      "data",
      "pagination"
    ]
  },
  "ContactDto": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "example": "9b2f1c3e-8a4d-4f6b-9c2e-1d3f5a7b9c0e"
      },
      "phoneNumber": {
        "type": "string",
        "example": "+14155552222",
        "description": "Always returned in E.164 format"
      },
      "active": {
        "type": "boolean",
        "example": true,
        "description": "false when the contact has been archived (DELETE)"
      },
      "firstName": {
        "type": "string",
        "nullable": true,
        "example": "Jane"
      },
      "lastName": {
        "type": "string",
        "nullable": true,
        "example": "Doe"
      },
      "email": {
        "type": "string",
        "nullable": true,
        "example": "jane@example.com"
      },
      "state": {
        "type": "string",
        "nullable": true,
        "example": "CA"
      },
      "country": {
        "type": "string",
        "nullable": true,
        "example": "US"
      },
      "dob": {
        "type": "string",
        "nullable": true,
        "example": "1990-04-12",
        "description": "Date of birth (YYYY-MM-DD)"
      },
      "gender": {
        "type": "string",
        "nullable": true,
        "example": null
      },
      "preferredLanguage": {
        "type": "string",
        "nullable": true,
        "example": "en"
      },
      "tags": {
        "example": [
          "vip",
          "spring-sale"
        ],
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "customFields": {
        "type": "object",
        "additionalProperties": true,
        "example": {
          "loyaltyTier": "gold",
          "storeIds": [
            "s1",
            "s2"
          ]
        },
        "description": "Stored custom-field values keyed by field name. See create/update request schemas for accepted write types and limits."
      },
      "marketingConsent": {
        "$ref": "#/components/schemas/ContactMarketingConsentDto"
      },
      "createdAt": {
        "type": "string",
        "example": "2026-07-07T12:00:00.000Z"
      },
      "updatedAt": {
        "type": "string",
        "example": "2026-07-07T12:00:00.000Z"
      }
    },
    "required": [
      "id",
      "phoneNumber",
      "active",
      "firstName",
      "lastName",
      "email",
      "state",
      "country",
      "dob",
      "gender",
      "preferredLanguage",
      "tags",
      "customFields",
      "marketingConsent",
      "createdAt",
      "updatedAt"
    ]
  },
  "ContactMarketingConsentDto": {
    "type": "object",
    "properties": {
      "channel": {
        "type": "string",
        "enum": [
          "MOBILE"
        ],
        "example": "MOBILE"
      },
      "status": {
        "type": "string",
        "enum": [
          "UNKNOWN",
          "SENT",
          "OPTED_IN",
          "OPTED_OUT"
        ],
        "example": "OPTED_IN",
        "description": "Campaigns are only sent to OPTED_IN contacts. Contacts created via the API start as UNKNOWN until consent is set."
      },
      "updatedAt": {
        "type": "string",
        "nullable": true,
        "example": "2026-07-07T12:00:00.000Z"
      }
    },
    "required": [
      "channel",
      "status",
      "updatedAt"
    ]
  },
  "ContactListPaginationDto": {
    "type": "object",
    "properties": {
      "limit": {
        "type": "number",
        "example": 50
      },
      "hasMore": {
        "type": "boolean",
        "example": true
      },
      "nextCursor": {
        "type": "string",
        "nullable": true,
        "example": "eyJjIjoiMjAyNi0wNy0wN1QxMjowMDowMC4wMDBaIiwiaSI6IjliMmYifQ",
        "description": "Opaque cursor for the next page; null on the last page"
      }
    },
    "required": [
      "limit",
      "hasMore",
      "nextCursor"
    ]
  }
}
```
