# Message ## Retrieve a message `client.Message.Get(ctx, id) (*MessageRetrieveResponse, error)` **get** `/v1/messages/{id}` Retrieves a single message by its ID. The message text is redacted based on the caller-specific channel-visibility resolution, and the response includes a read-only `accessLevel`. **[Required scope](/using-the-api/scopes/):** `messages:read` **[Rate limit category](/using-the-api/rate-limits/):** Read ### Parameters - `id string` Unique identifier of the message to retrieve. ### Returns - `type MessageRetrieveResponse struct{…}` - `ID string` Unique identifier for the entity. - `AccessLevel MessageRetrieveResponseAccessLevel` The caller's resolved access level for this message. - `const MessageRetrieveResponseAccessLevelFull MessageRetrieveResponseAccessLevel = "FULL"` - `const MessageRetrieveResponseAccessLevelMetadata MessageRetrieveResponseAccessLevel = "METADATA"` - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MessageRetrieveResponseField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MessageRetrieveResponseFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MessageRetrieveResponseFieldValueArray []string` - `type MessageRetrieveResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MessageRetrieveResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MessageRetrieveResponseFieldValueTypeAddress MessageRetrieveResponseFieldValueType = "ADDRESS"` - `const MessageRetrieveResponseFieldValueTypeCheckbox MessageRetrieveResponseFieldValueType = "CHECKBOX"` - `const MessageRetrieveResponseFieldValueTypeCurrency MessageRetrieveResponseFieldValueType = "CURRENCY"` - `const MessageRetrieveResponseFieldValueTypeDatetime MessageRetrieveResponseFieldValueType = "DATETIME"` - `const MessageRetrieveResponseFieldValueTypeEmail MessageRetrieveResponseFieldValueType = "EMAIL"` - `const MessageRetrieveResponseFieldValueTypeFullName MessageRetrieveResponseFieldValueType = "FULL_NAME"` - `const MessageRetrieveResponseFieldValueTypeMarkdown MessageRetrieveResponseFieldValueType = "MARKDOWN"` - `const MessageRetrieveResponseFieldValueTypeMultiSelect MessageRetrieveResponseFieldValueType = "MULTI_SELECT"` - `const MessageRetrieveResponseFieldValueTypeNumber MessageRetrieveResponseFieldValueType = "NUMBER"` - `const MessageRetrieveResponseFieldValueTypeSingleSelect MessageRetrieveResponseFieldValueType = "SINGLE_SELECT"` - `const MessageRetrieveResponseFieldValueTypeSocialHandle MessageRetrieveResponseFieldValueType = "SOCIAL_HANDLE"` - `const MessageRetrieveResponseFieldValueTypeTelephone MessageRetrieveResponseFieldValueType = "TELEPHONE"` - `const MessageRetrieveResponseFieldValueTypeText MessageRetrieveResponseFieldValueType = "TEXT"` - `const MessageRetrieveResponseFieldValueTypeURL MessageRetrieveResponseFieldValueType = "URL"` - `const MessageRetrieveResponseFieldValueTypeHTML MessageRetrieveResponseFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `ObjectType MessageRetrieveResponseObjectType` Always `message`. - `const MessageRetrieveResponseObjectTypeMessage MessageRetrieveResponseObjectType = "message"` - `Relationships map[string, MessageRetrieveResponseRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) messageRetrieveResponse, err := client.Message.Get(context.TODO(), "id") if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", messageRetrieveResponse.ID) } ``` #### Response ```json { "id": "msg_cm0abc456def789", "accessLevel": "FULL", "createdAt": "2026-05-01T09:00:00.000Z", "fields": { "$text": { "value": "Thanks — pushed the fix, should be live shortly.", "valueType": "TEXT" }, "$sentAt": { "value": "2026-05-01T08:59:30.000Z", "valueType": "DATETIME" }, "$provider": { "value": "SLACK", "valueType": "TEXT" }, "$providerThreadId": { "value": "1714553970.123456", "valueType": "TEXT" }, "$editedAt": { "value": "string", "valueType": "DATETIME" } }, "httpLink": null, "objectType": "message", "relationships": { "$channel": { "cardinality": "has_one", "objectType": "channel", "values": [ "chn_cm2def456ghi789" ] } }, "updatedAt": "2026-05-01T09:00:00.000Z", "externalId": "externalId" } ``` ## List messages `client.Message.List(ctx, query) (*MessageListResponse, error)` **get** `/v1/messages` Returns a paginated list of messages. Use `offset` and `limit` to paginate through results. Each message is filtered per caller to those whose channel they may see, and includes a read-only `accessLevel`. See [List endpoints](/using-the-api/list-endpoints/) for more information about pagination. **[Required scope](/using-the-api/scopes/):** `messages:read` **[Rate limit category](/using-the-api/rate-limits/):** Search ### Parameters - `query MessageListParams` - `Limit param.Field[int64]` Maximum number of records to return. Defaults to 25, maximum 25. - `Offset param.Field[int64]` Number of records to skip for pagination. Defaults to 0. ### Returns - `type MessageListResponse struct{…}` - `Data []MessageListResponseData` Array of message objects for the current page. - `ID string` Unique identifier for the entity. - `AccessLevel string` The caller's resolved access level for this message. - `const MessageListResponseDataAccessLevelFull MessageListResponseDataAccessLevel = "FULL"` - `const MessageListResponseDataAccessLevelMetadata MessageListResponseDataAccessLevel = "METADATA"` - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MessageListResponseDataField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MessageListResponseDataFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MessageListResponseDataFieldValueArray []string` - `type MessageListResponseDataFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MessageListResponseDataFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MessageListResponseDataFieldValueTypeAddress MessageListResponseDataFieldValueType = "ADDRESS"` - `const MessageListResponseDataFieldValueTypeCheckbox MessageListResponseDataFieldValueType = "CHECKBOX"` - `const MessageListResponseDataFieldValueTypeCurrency MessageListResponseDataFieldValueType = "CURRENCY"` - `const MessageListResponseDataFieldValueTypeDatetime MessageListResponseDataFieldValueType = "DATETIME"` - `const MessageListResponseDataFieldValueTypeEmail MessageListResponseDataFieldValueType = "EMAIL"` - `const MessageListResponseDataFieldValueTypeFullName MessageListResponseDataFieldValueType = "FULL_NAME"` - `const MessageListResponseDataFieldValueTypeMarkdown MessageListResponseDataFieldValueType = "MARKDOWN"` - `const MessageListResponseDataFieldValueTypeMultiSelect MessageListResponseDataFieldValueType = "MULTI_SELECT"` - `const MessageListResponseDataFieldValueTypeNumber MessageListResponseDataFieldValueType = "NUMBER"` - `const MessageListResponseDataFieldValueTypeSingleSelect MessageListResponseDataFieldValueType = "SINGLE_SELECT"` - `const MessageListResponseDataFieldValueTypeSocialHandle MessageListResponseDataFieldValueType = "SOCIAL_HANDLE"` - `const MessageListResponseDataFieldValueTypeTelephone MessageListResponseDataFieldValueType = "TELEPHONE"` - `const MessageListResponseDataFieldValueTypeText MessageListResponseDataFieldValueType = "TEXT"` - `const MessageListResponseDataFieldValueTypeURL MessageListResponseDataFieldValueType = "URL"` - `const MessageListResponseDataFieldValueTypeHTML MessageListResponseDataFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `ObjectType string` Always `message`. - `const MessageListResponseDataObjectTypeMessage MessageListResponseDataObjectType = "message"` - `Relationships map[string, MessageListResponseDataRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Object string` The object type, always `"list"`. - `TotalCount int64` Total number of entities matching the query. ### Example ```go package main import ( "context" "fmt" "github.com/Lightfld/lightfield-go" "github.com/Lightfld/lightfield-go/option" ) func main() { client := githubcomlightfldlightfieldgo.NewClient( option.WithAPIKey("My API Key"), ) messageListResponse, err := client.Message.List(context.TODO(), githubcomlightfldlightfieldgo.MessageListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", messageListResponse.Data) } ``` #### Response ```json { "data": [ { "id": "msg_cm0abc456def789", "accessLevel": "FULL", "createdAt": "2026-05-01T09:00:00.000Z", "fields": { "$text": { "value": "Thanks — pushed the fix, should be live shortly.", "valueType": "TEXT" }, "$sentAt": { "value": "2026-05-01T08:59:30.000Z", "valueType": "DATETIME" }, "$provider": { "value": "SLACK", "valueType": "TEXT" }, "$providerThreadId": { "value": "1714553970.123456", "valueType": "TEXT" }, "$editedAt": { "value": "string", "valueType": "DATETIME" } }, "httpLink": null, "objectType": "message", "relationships": { "$channel": { "cardinality": "has_one", "objectType": "channel", "values": [ "chn_cm2def456ghi789" ] } }, "updatedAt": "2026-05-01T09:00:00.000Z", "externalId": "externalId" }, { "id": "msg_cm1xyz123uvw456", "accessLevel": "FULL", "createdAt": "2026-04-29T15:12:00.000Z", "fields": { "$text": { "value": "Can we sync on pricing tomorrow?", "valueType": "TEXT" }, "$sentAt": { "value": "2026-04-29T15:11:30.000Z", "valueType": "DATETIME" }, "$provider": { "value": "SLACK", "valueType": "TEXT" }, "$providerThreadId": { "value": "string", "valueType": "TEXT" }, "$editedAt": { "value": "string", "valueType": "DATETIME" } }, "httpLink": null, "objectType": "message", "relationships": { "$channel": { "cardinality": "has_one", "objectType": "channel", "values": [ "chn_cm2def456ghi789" ] } }, "updatedAt": "2026-04-29T15:12:00.000Z", "externalId": "externalId" } ], "object": "list", "totalCount": 2 } ``` ## Domain Types ### Message List Response - `type MessageListResponse struct{…}` - `Data []MessageListResponseData` Array of message objects for the current page. - `ID string` Unique identifier for the entity. - `AccessLevel string` The caller's resolved access level for this message. - `const MessageListResponseDataAccessLevelFull MessageListResponseDataAccessLevel = "FULL"` - `const MessageListResponseDataAccessLevelMetadata MessageListResponseDataAccessLevel = "METADATA"` - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MessageListResponseDataField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MessageListResponseDataFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MessageListResponseDataFieldValueArray []string` - `type MessageListResponseDataFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MessageListResponseDataFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MessageListResponseDataFieldValueTypeAddress MessageListResponseDataFieldValueType = "ADDRESS"` - `const MessageListResponseDataFieldValueTypeCheckbox MessageListResponseDataFieldValueType = "CHECKBOX"` - `const MessageListResponseDataFieldValueTypeCurrency MessageListResponseDataFieldValueType = "CURRENCY"` - `const MessageListResponseDataFieldValueTypeDatetime MessageListResponseDataFieldValueType = "DATETIME"` - `const MessageListResponseDataFieldValueTypeEmail MessageListResponseDataFieldValueType = "EMAIL"` - `const MessageListResponseDataFieldValueTypeFullName MessageListResponseDataFieldValueType = "FULL_NAME"` - `const MessageListResponseDataFieldValueTypeMarkdown MessageListResponseDataFieldValueType = "MARKDOWN"` - `const MessageListResponseDataFieldValueTypeMultiSelect MessageListResponseDataFieldValueType = "MULTI_SELECT"` - `const MessageListResponseDataFieldValueTypeNumber MessageListResponseDataFieldValueType = "NUMBER"` - `const MessageListResponseDataFieldValueTypeSingleSelect MessageListResponseDataFieldValueType = "SINGLE_SELECT"` - `const MessageListResponseDataFieldValueTypeSocialHandle MessageListResponseDataFieldValueType = "SOCIAL_HANDLE"` - `const MessageListResponseDataFieldValueTypeTelephone MessageListResponseDataFieldValueType = "TELEPHONE"` - `const MessageListResponseDataFieldValueTypeText MessageListResponseDataFieldValueType = "TEXT"` - `const MessageListResponseDataFieldValueTypeURL MessageListResponseDataFieldValueType = "URL"` - `const MessageListResponseDataFieldValueTypeHTML MessageListResponseDataFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `ObjectType string` Always `message`. - `const MessageListResponseDataObjectTypeMessage MessageListResponseDataObjectType = "message"` - `Relationships map[string, MessageListResponseDataRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset. - `Object string` The object type, always `"list"`. - `TotalCount int64` Total number of entities matching the query. ### Message Retrieve Response - `type MessageRetrieveResponse struct{…}` - `ID string` Unique identifier for the entity. - `AccessLevel MessageRetrieveResponseAccessLevel` The caller's resolved access level for this message. - `const MessageRetrieveResponseAccessLevelFull MessageRetrieveResponseAccessLevel = "FULL"` - `const MessageRetrieveResponseAccessLevelMetadata MessageRetrieveResponseAccessLevel = "METADATA"` - `CreatedAt string` ISO 8601 timestamp of when the entity was created. - `Fields map[string, MessageRetrieveResponseField]` Map of field names to their typed values. System fields are prefixed with `$` (e.g. `$name`, `$email`); custom attributes use their bare slug. - `Value MessageRetrieveResponseFieldValueUnion` The field value, or null if unset. - `string` - `float64` - `bool` - `type MessageRetrieveResponseFieldValueArray []string` - `type MessageRetrieveResponseFieldValueAddress struct{…}` - `City string` City name. - `Country string` 2-letter ISO 3166-1 alpha-2 country code. - `Latitude float64` Latitude coordinate. - `Longitude float64` Longitude coordinate. - `PostalCode string` Postal or ZIP code. - `State string` State or province. - `Street string` Street address line 1. - `Street2 string` Street address line 2. - `type MessageRetrieveResponseFieldValueFullName struct{…}` - `FirstName string` The contact's first name. - `LastName string` The contact's last name. - `ValueType string` The data type of the field. - `const MessageRetrieveResponseFieldValueTypeAddress MessageRetrieveResponseFieldValueType = "ADDRESS"` - `const MessageRetrieveResponseFieldValueTypeCheckbox MessageRetrieveResponseFieldValueType = "CHECKBOX"` - `const MessageRetrieveResponseFieldValueTypeCurrency MessageRetrieveResponseFieldValueType = "CURRENCY"` - `const MessageRetrieveResponseFieldValueTypeDatetime MessageRetrieveResponseFieldValueType = "DATETIME"` - `const MessageRetrieveResponseFieldValueTypeEmail MessageRetrieveResponseFieldValueType = "EMAIL"` - `const MessageRetrieveResponseFieldValueTypeFullName MessageRetrieveResponseFieldValueType = "FULL_NAME"` - `const MessageRetrieveResponseFieldValueTypeMarkdown MessageRetrieveResponseFieldValueType = "MARKDOWN"` - `const MessageRetrieveResponseFieldValueTypeMultiSelect MessageRetrieveResponseFieldValueType = "MULTI_SELECT"` - `const MessageRetrieveResponseFieldValueTypeNumber MessageRetrieveResponseFieldValueType = "NUMBER"` - `const MessageRetrieveResponseFieldValueTypeSingleSelect MessageRetrieveResponseFieldValueType = "SINGLE_SELECT"` - `const MessageRetrieveResponseFieldValueTypeSocialHandle MessageRetrieveResponseFieldValueType = "SOCIAL_HANDLE"` - `const MessageRetrieveResponseFieldValueTypeTelephone MessageRetrieveResponseFieldValueType = "TELEPHONE"` - `const MessageRetrieveResponseFieldValueTypeText MessageRetrieveResponseFieldValueType = "TEXT"` - `const MessageRetrieveResponseFieldValueTypeURL MessageRetrieveResponseFieldValueType = "URL"` - `const MessageRetrieveResponseFieldValueTypeHTML MessageRetrieveResponseFieldValueType = "HTML"` - `HTTPLink string` URL to view the entity in the Lightfield web app, or null. - `ObjectType MessageRetrieveResponseObjectType` Always `message`. - `const MessageRetrieveResponseObjectTypeMessage MessageRetrieveResponseObjectType = "message"` - `Relationships map[string, MessageRetrieveResponseRelationship]` Map of relationship names to their associated entities. System relationships are prefixed with `$` (e.g. `$owner`, `$contact`). - `Cardinality string` Whether the relationship is `has_one` or `has_many`. - `ObjectType string` The type of the related object (e.g. `account`, `contact`). - `Values []string` IDs of the related entities. - `UpdatedAt string` ISO 8601 timestamp of when the entity was last updated, or null. - `ExternalID string` External identifier for the entity, or null if unset.