Get a client's marketing consent history Run in API Explorer

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://apidocs.plannrcrm.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "PlannrCRM MCP server": {
    "url": "https://apidocs.plannrcrm.com/mcp"
  }
}

Close
GET /api/v1/account/{account_uuid}/marketing-consent

Every consent decision recorded against the client, newest first.

Headers

  • X-PLANNR-ACCOUNT-UUID string

Path parameters

  • account_uuid string Required

    The UUID of the client account.

Query parameters

  • filter[channel] string

    Filter by a comma separated list of channels. One of email, phone, letter, sms.

  • filter[status] string

    Filter by the decision recorded. One of opted_in, opted_out.

  • filter[effective_from] string

    Only decisions that took effect at or after this ISO 8601 datetime.

  • filter[effective_to] string

    Only decisions that took effect at or before this ISO 8601 datetime.

  • sort string

    Field to sort by. Valid fields are [effective_at]. Negative sign to denote DESC. Defaults to '-effective_at'.

  • per_page integer

    Number of results to return with pagination (Default 15. Max 500).

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • data array[object]
      Hide data attributes Show data attributes object
      • uuid string
      • channel string
      • status string
      • method string
      • statement_version string
      • recorded_by object
        Hide recorded_by attributes Show recorded_by attributes object
        • uuid string
        • created_at string
        • updated_at string
        • type string
        • role string
        • first_name string
        • last_name string
        • name string
        • email string
        • photo_url string
        • external_references object
          Hide external_references attributes Show external_references attributes object
          • uuid

            The UUID of the resource.

          • created_at

            The timestamp of when the resource was created.

          • updated_at

            The timestamp of when the resource was updated.

          • third_party

            The third party provider with the reference.

          • reference

            The third party reference.

      • effective_at string
      • created_at string
  • 400 application/json

    Account is not a client

    Hide response attribute Show response attribute object
    • message string Required

      A human-readable description of the error.

  • 422 application/json

    Validation error

    Hide response attributes Show response attributes object
    • message string Required

      A human-readable description of the error.

    • errors object

      Validation messages keyed by the field that failed.

      Hide errors attribute Show errors attribute object
      • * array[string] Additional properties
GET /api/v1/account/{account_uuid}/marketing-consent
curl \
 --request GET 'https://api.plannrcrm.com/api/v1/account/53f22fe4-3731-4cdc-aa12-e65bd0b15e52/marketing-consent' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}"
Response examples (200)
{
  "data": [
    {
      "uuid": "f80e1104-f768-475c-8ac2-7b718739bd06",
      "channel": "email",
      "status": "opted_in",
      "method": "verbal",
      "statement_version": "v1",
      "recorded_by": {
        "uuid": "80418f81-3d60-4087-bea1-649e187ebc0e",
        "created_at": "2026-10-12T11:34:43+01:00",
        "updated_at": "2026-10-12T11:34:43+01:00",
        "type": "client",
        "role": "client",
        "first_name": "Gareth",
        "last_name": "Thompson",
        "name": "Gareth Thompson",
        "email": "gareth@codepotato.co.uk",
        "photo_url": "https://eu.ui-avatars.com/api/?name=Gareth+Thompson",
        "external_references": {
          "uuid": "92917585-6a80-4274-be19-9d29171ad33b",
          "created_at": "2026-10-12T11:34:51+01:00",
          "updated_at": "2026-10-12T11:34:51+01:00",
          "third_party": "nucleus",
          "reference": "AB123456"
        }
      },
      "effective_at": "2026-10-12T11:34:43+01:00",
      "created_at": "2026-10-12T11:34:43+01:00"
    }
  ]
}
Response examples (400)
{
  "message": "Marketing consent is only recorded for client accounts."
}
Response examples (422)
{
  "message": "The selected status is invalid.",
  "errors": {
    "filter.status": [
      "The selected status is invalid."
    ]
  }
}
{
  "message": "The effective from is not a valid date.",
  "errors": {
    "filter.effective_from": [
      "The effective from is not a valid date."
    ]
  }
}
{
  "message": "The effective to must be a date after or equal to effective from.",
  "errors": {
    "filter.effective_to": [
      "The effective to must be a date after or equal to effective from."
    ]
  }
}