Skip to main content
A table is a group-owned list of guests you keep for operations work. It is not a marketing segment. Campaign audiences live in a downstream ESP. Each table has a fixed grain and a type: Use a dynamic table for this recipe. Save a filter on marketing_email_consent. Casa Layer then keeps members whose effective marketing-email status is granted. Partner credentials are read-only. An operator creates the table in the Casa Layer app. The partner then reads members over the public API.

What you need

An operator with access to the Casa Layer app creates and saves the table. The partner credential needs these scopes: write:tables is session-only. Partner credentials cannot create or save a table.

What a table is

A table holds members in one property group. Member rows are directory projections: name, email, phone, and when the member entered the table. Each member also returns: On a guest table, id and guest_profile_id are the same. Use guest_profile_id on other endpoints. On a master table:
  • A clustered row has master_profile_id set and guest_profile_id null. Load member guests from GET /v1/master-profiles/{id}.
  • A singleton row is an unclustered guest. guest_profile_id is set. master_profile_id is null.
consents is the effective rollup. When more than one observation exists for the same contact method and purpose, Casa Layer keeps the most restrictive status: withdrawn, then denied, then granted. No consent row means unknown. Unknown is not granted. A guest with an empty consents array has not provided marketing consent. See Tables and Consents.

1. Create the table in the app

Do this in the Casa Layer app. Do not call create from a partner credential.
  1. Open Tables.
  2. Click Create table.
  3. Enter a name, for example Marketing email granted.
  4. Set Type to Dynamic.
  5. Set Guest profile type:
    • Guest profiles — one row per source record
    • Master profiles (default) — one row per resolved guest
  6. Click Create table.
Type and guest profile type cannot change after create. For most partner reads, pick Guest profiles. Each member then has a guest_profile_id you can send to other endpoints. Pick Master profiles when the partner wants one row per real guest. The new table opens with no members. Add the filter, then save it.
  1. Click Filter.
  2. Set Field to Marketing email consent.
  3. Set Condition to is.
  4. Set Value to Granted.
  5. Click Save.
Save writes the filter and refreshes membership. Wait until the run finishes. Then members are the current match set. The saved filter is this document:
marketing_email_consent is the effective marketing-email status for the member. Allowed values are granted, denied, and withdrawn. A static table does not apply this filter. If you add members by hand, validate consents on every row. Do not trust membership alone.
Tables are not marketing segments. A destination still needs its own consent check. Membership is an operations list, not a send licence.

3. Create partner credentials

Create the credential in the Casa Layer app. See Partner API credentials for the full steps.
  1. Open Integrations → Partner credentials → Custom Integration.
  2. Name the credential.
  3. Select read:tables. Add read:consents and read:guests if the partner will run the extra checks below.
  4. Click Create credentials.
  5. Copy the client ID and client secret.
Casa Layer shows the client secret once. Store it with the partner.

4. Get an access token

Exchange the client ID and client secret for a short-lived access token.
Read access_token from the response. Cache it until exp. Send the token as a bearer credential on every request below:

5. Find the table

Table list uses offset pages. Default limit is 100. The maximum is 500. Match the table by name, or store id when the operator creates it.
Confirm type is dynamic and member_type is the grain you chose. Read the saved filter:
Confirm filter_doc includes marketing_email_consent with value granted. You can also preview a filter without a saved table:
The preview returns a count. It does not return members. Use it to check the filter before the operator saves.

6. Retrieve members

Member list uses offset pages. When has_more is true, send offset equal to next_offset. Repeat until has_more is false.
On a clustered master member the same page looks like this:
A property-pinned personal API key narrows visible members. Partner credentials are group-scoped. They see every member in the group. Treat each member as granted only when consents contains a row that matches all three fields: Reject the member when:
  • consents is missing or empty
  • the marketing-email row is denied or withdrawn
  • the only granted row is a different purpose or contact method
Email and SMS are separate. A granted SMS row is not email consent. On a clustered master, consents already rolls up member guests. You do not need a guest profile ID to validate that row.

Optional — load member guests of a clustered master

When guest_profile_id is null, load the master:
Read guest_profile_ids. Each value is a Casa Layer guest profile ID.

Optional — list stored observations

GET /v1/consents returns individual observations. It does not return the effective rollup. guest_profile_id on that route is ingest-time provenance only.
Use this to inspect source rows. Use member consents to decide eligibility. This search has no master_profile_id filter. For a clustered master, validate consents on the member, or call the search once per guest profile ID.

If the member list is empty

Work through this list:
  1. Confirm the operator clicked Save after the filter.
  2. Confirm GET /v1/tables/{id}/filters shows marketing_email_consent is granted.
  3. Confirm ingest has stored consent observations.
  4. Confirm you did not expect unknown guests. No row means unknown.
  5. Confirm member_type matches the grain you want.
  6. For a static table, add members by hand. The filter does not run.

Errors

An empty member page is not 404. The list is empty.

Partner API credentials

Create, rotate, and revoke the credential.

Data model

Tables, members, and consents.

Browse table members

GET /v1/tables/{id}/members reference.

Search consents

Stored consent observations.