# Lists ## Create a list (app/CRM) `client.Prism.Lists.New(ctx, params) (*List, error)` **post** `/v2/prism/{teamId}/lists` Creates a list from a template. Seeds properties, pipeline stages (when applicable), and default views — identical to the session-auth `/default_app/create` path. API-key callers are fully supported; `type` is derived from `template_id` and must not be supplied. ### Parameters - `params PrismListNewParams` - `TeamID param.Field[string]` Path param - `ListCreate param.Field[ListCreate]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) for an authenticated POST, PUT, or PATCH request. The server retains the initial claim for 24 hours and replays a completed non-5xx response only when the method, path, and request body all match. Reusing a non-expired key with a different method, path, or body returns 409 `idempotency_key_mismatch`; reusing it after expiry returns 409 `idempotency_key_stale`, so use a new key. Replays include the `idempotent-replay: true` response header. ### Returns - `type List struct{…}` - `ID string` - `Name string` - `ObjectType ListObjectType` Prism object type this list holds. - `const ListObjectTypeOrganization ListObjectType = "organization"` - `const ListObjectTypeIdentity ListObjectType = "identity"` - `const ListObjectTypeAction ListObjectType = "action"` - `const ListObjectTypeDocument ListObjectType = "document"` - `const ListObjectTypeDeal ListObjectType = "deal"` - `TeamID string` - `CreatedAt Time` - `Description string` - `Icon string` Emoji or icon key for the list. - `Type string` Internal template type (e.g. dealFlow, hiring). Derived from template_id on create. - `Views []ListView` - `ID string` - `Name string` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) list, err := client.Prism.Lists.New(context.TODO(), micro.PrismListNewParams{ ListCreate: micro.ListCreateParam{ TemplateID: micro.F(micro.ListCreateTemplateIDSalesDeals), }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", list.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "x", "object_type": "organization", "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "description": "description", "icon": "icon", "type": "type", "views": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ] } ``` ## List apps/CRMs in a workspace `client.Prism.Lists.List(ctx, query) (*PrismListListResponse, error)` **get** `/v2/prism/{teamId}/lists` Returns non-core lists the caller can access in the workspace. Core system apps (Messages, All Inbox) are excluded. ### Parameters - `query PrismListListParams` - `TeamID param.Field[string]` ### Returns - `type PrismListListResponse struct{…}` - `Data []List` - `ID string` - `Name string` - `ObjectType ListObjectType` Prism object type this list holds. - `const ListObjectTypeOrganization ListObjectType = "organization"` - `const ListObjectTypeIdentity ListObjectType = "identity"` - `const ListObjectTypeAction ListObjectType = "action"` - `const ListObjectTypeDocument ListObjectType = "document"` - `const ListObjectTypeDeal ListObjectType = "deal"` - `TeamID string` - `CreatedAt Time` - `Description string` - `Icon string` Emoji or icon key for the list. - `Type string` Internal template type (e.g. dealFlow, hiring). Derived from template_id on create. - `Views []ListView` - `ID string` - `Name string` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) lists, err := client.Prism.Lists.List(context.TODO(), micro.PrismListListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", lists.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "x", "object_type": "organization", "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "description": "description", "icon": "icon", "type": "type", "views": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ] } ] } ``` ## Get a list by id `client.Prism.Lists.Get(ctx, listID, query) (*List, error)` **get** `/v2/prism/{teamId}/lists/{listId}` Get a list by id ### Parameters - `listID string` - `query PrismListGetParams` - `TeamID param.Field[string]` ### Returns - `type List struct{…}` - `ID string` - `Name string` - `ObjectType ListObjectType` Prism object type this list holds. - `const ListObjectTypeOrganization ListObjectType = "organization"` - `const ListObjectTypeIdentity ListObjectType = "identity"` - `const ListObjectTypeAction ListObjectType = "action"` - `const ListObjectTypeDocument ListObjectType = "document"` - `const ListObjectTypeDeal ListObjectType = "deal"` - `TeamID string` - `CreatedAt Time` - `Description string` - `Icon string` Emoji or icon key for the list. - `Type string` Internal template type (e.g. dealFlow, hiring). Derived from template_id on create. - `Views []ListView` - `ID string` - `Name string` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) list, err := client.Prism.Lists.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismListGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", list.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "x", "object_type": "organization", "team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "description": "description", "icon": "icon", "type": "type", "views": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ] } ``` ## Domain Types ### List - `type List struct{…}` - `ID string` - `Name string` - `ObjectType ListObjectType` Prism object type this list holds. - `const ListObjectTypeOrganization ListObjectType = "organization"` - `const ListObjectTypeIdentity ListObjectType = "identity"` - `const ListObjectTypeAction ListObjectType = "action"` - `const ListObjectTypeDocument ListObjectType = "document"` - `const ListObjectTypeDeal ListObjectType = "deal"` - `TeamID string` - `CreatedAt Time` - `Description string` - `Icon string` Emoji or icon key for the list. - `Type string` Internal template type (e.g. dealFlow, hiring). Derived from template_id on create. - `Views []ListView` - `ID string` - `Name string` ### List Create - `type ListCreate struct{…}` - `TemplateID ListCreateTemplateID` Template to seed the list from. `type` is derived server-side from this template. - `const ListCreateTemplateIDSalesDeals ListCreateTemplateID = "sales_deals"` - `const ListCreateTemplateIDRecruiting ListCreateTemplateID = "recruiting"` - `const ListCreateTemplateIDPartnerships ListCreateTemplateID = "partnerships"` - `const ListCreateTemplateIDFundraising ListCreateTemplateID = "fundraising"` - `const ListCreateTemplateIDKnowledgeBase ListCreateTemplateID = "knowledge_base"` - `const ListCreateTemplateIDIssueTracker ListCreateTemplateID = "issue_tracker"` - `const ListCreateTemplateIDContentCalendar ListCreateTemplateID = "content_calendar"` - `const ListCreateTemplateIDJobApplications ListCreateTemplateID = "job_applications"` - `const ListCreateTemplateIDProjectTracker ListCreateTemplateID = "project_tracker"` - `const ListCreateTemplateIDFeedback ListCreateTemplateID = "feedback"` - `const ListCreateTemplateIDPortcoTracker ListCreateTemplateID = "portco_tracker"` - `const ListCreateTemplateIDDealFlow ListCreateTemplateID = "deal_flow"` - `const ListCreateTemplateIDLpFundraising ListCreateTemplateID = "lp_fundraising"` - `const ListCreateTemplateIDCustom ListCreateTemplateID = "custom"` - `Icon string` Emoji or icon override. - `Name string` - `ObjectType ListCreateObjectType` Required only when template_id is `custom`. - `const ListCreateObjectTypeOrganization ListCreateObjectType = "organization"` - `const ListCreateObjectTypeIdentity ListCreateObjectType = "identity"` - `const ListCreateObjectTypeAction ListCreateObjectType = "action"` - `const ListCreateObjectTypeDocument ListCreateObjectType = "document"` - `const ListCreateObjectTypeDeal ListCreateObjectType = "deal"`